Linux 5.19 Adding New Option For Easily Configuring An x86_64 Debug Kernel

Written by Michael Larabel in Linux Kernel on 23 May 2022 at 12:00 PM EDT. Add A Comment
LINUX KERNEL
The Linux 5.19 kernel is adding a new make x86_debug.config build target as a set of defaults in enabling a variety of recommended debugging features for x86/x86_64 kernel builds.

Back in Linux 5.17 was the generic effort to easily build a kernel with various debug features while for Linux 5.19 is the Intel-led contribution focused on more x86_64-minded debug features. The earlier addition was debug.config while for Linux 5.19 the new set of options is enabled under x86_debug.config.


Intel's Dave Hansen explained of the motivation with the new Linux x86_debug.config:
The kernel has a wide variety of debugging options to help catch and squash bugs. However, new debugging is added all the time and the existing options can be hard to find.

Add a Kconfig fragment with the debugging options which tip maintainers expect to be used to test contributions.

This should make it easier for contributors to test their code and find issues before submission.

At the moment what x86_debug.config enables over a default Linux kernel build includes:
CONFIG_X86_DEBUG_FPU=y
CONFIG_LOCK_STAT=y
CONFIG_DEBUG_VM=y
CONFIG_DEBUG_VM_VMACACHE=y
CONFIG_DEBUG_VM_RB=y
CONFIG_DEBUG_SLAB=y
CONFIG_DEBUG_KMEMLEAK=y
CONFIG_DEBUG_PAGEALLOC=y
CONFIG_SLUB_DEBUG_ON=y
CONFIG_KMEMCHECK=y
CONFIG_DEBUG_OBJECTS=y
CONFIG_DEBUG_OBJECTS_ENABLE_DEFAULT=1
CONFIG_GCOV_KERNEL=y
CONFIG_LOCKDEP=y
CONFIG_PROVE_LOCKING=y
CONFIG_SCHEDSTATS=y
CONFIG_VMLINUX_VALIDATION=y

This new debug option was sent in today as part of the x86 build updates for Linux 5.19. Also included with that pull is a GCC 12 build warnings fix in the x86 boot code.
Related News
About The Author
Michael Larabel

Michael Larabel is the principal author of Phoronix.com and founded the site in 2004 with a focus on enriching the Linux hardware experience. Michael has written more than 20,000 articles covering the state of Linux hardware support, Linux performance, graphics drivers, and other topics. Michael is also the lead developer of the Phoronix Test Suite, Phoromatic, and OpenBenchmarking.org automated benchmarking software. He can be followed via Twitter, LinkedIn, or contacted via MichaelLarabel.com.

Popular News This Week