Linux 5.17 Making It Easier To Build A Kernel With All The Shiny Debug Features
What is being done for Linux 5.17 is introducing debug.config as a default kernel build configuration that is optimized for debugging. The debug.config will enable by default various features like the Kernel Address Sanitizer, Undefined Behavior Sanitizer, KMemLeak, and many other kernel features added over time meant to assist in debugging or tracking down of kernel problems. Thus with one command there is an officially recommended kernel configuration with the many different debugging features enabled.
Qian Cai who submitted the debug.config noted in the commit, "Some general debugging features like kmemleak, KASAN, lockdep, UBSAN etc help fix many viruses like a microscope. On the other hand, those features are scatter around and mixed up with more situational debugging options making them difficult to consume properly. This cold help amplify the general debugging/testing efforts and help establish sensitive default values for those options across the broad. This could also help different distros to collaborate on maintaining debug-flavored kernels. The config is based on years' experiences running daily CI inside the largest enterprise Linux distro company to seek regressions on linux-next builds on different bare-metal and virtual platforms."
Linux 5.17's debug.config provides recommended defaults for generating a new kernel configuration with the shiny debug features enabled... For dealing with software problems at least.
The features flipped on by debug.config are outlined here. with the many obvious DEBUG_* options, FTrace, KASAN, panic on oops, the soft lock-up detector, bug on data corruption, UBSAN, printk enhancements, and more.
Separately but along similar interest levels, Linux 5.17 also adds make mod2noconfig. This mod2noconfig option is intended to be used when transitioning a modular kernel to monolithic. This mod2noconfig allows for quickly disabling all the modules to be built prior to turning off the kernel's module support entirely. Thus this can be used for helping to speed-up build/test iterations.