On Sanitizer warnings, abort the running kernel code
configname: CONFIG_UBSAN_TRAP
Linux Kernel Configuration
└─>Kernel hacking
└─>Generic Kernel Debugging Instruments
└─>Undefined behaviour sanity checker
└─>On Sanitizer warnings, abort the running kernel code
In linux kernel since version 4.14.326 (release Date: 2023-09-23)
Building kernels with Sanitizer features enabled tends to grow
the kernel size by around 5%, due to adding all the debugging
text on failure paths. To avoid this, Sanitizer instrumentation
can just issue a trap. This reduces the kernel size overhead but
turns all warnings (including potentially harmless conditions)
into full exceptions that abort the running kernel code
(regardless of context, locks held, etc), which may destabilize
the system. For some system builders this is an acceptable
trade-off.
the kernel size by around 5%, due to adding all the debugging
text on failure paths. To avoid this, Sanitizer instrumentation
can just issue a trap. This reduces the kernel size overhead but
turns all warnings (including potentially harmless conditions)
into full exceptions that abort the running kernel code
(regardless of context, locks held, etc), which may destabilize
the system. For some system builders this is an acceptable
trade-off.