https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102317
--- Comment #8 from Jakub Jelinek <jakub at gcc dot gnu.org> --- So, instead (when building the kernel with sanitization) build with -fsanitize=signed-integer-overflow and no -fno-strict-overflow, and the routines where you want wrapv behavior and not runtime traps build with optimize ("wrapv", "wrapv-pointer") attribute?