Kernel Memory Sanitizer Lands For Linux 6.1
The Kernel Memory Sanitizer is now in mainline as a dynamic error detector. KMSAN is focused on finding use of uninitialized values within the kernel code. KMSAN relies on compiler instrumentation like the other sanitizers to provide this capability.
While merged for Linux 6.1, the Kernel Memory Sanitizer documentation indicates that it isn't intended for production as it "drastically increases" the kernel memory footprint and has significant system performance implications.
In any event if wanting to run the Kernel Memory Sanitizer to look for uninitialized value use witin the kernel, KMSAN can enabled with CONFIG_KMSAN and requires using the LLVM Clang 14 compiler or newer.
See the new documentation for more details on KMSAN in Linux 6.1. KMSAN was merged as part of Andrew Morton's "mm" patches.