]> www.infradead.org Git - users/jedix/linux-maple.git/commit
ubsan/overflow: Rework integer overflow sanitizer option to turn on everything
authorKees Cook <kees@kernel.org>
Fri, 7 Mar 2025 04:19:09 +0000 (20:19 -0800)
committerKees Cook <kees@kernel.org>
Sat, 8 Mar 2025 03:58:05 +0000 (19:58 -0800)
commited2b548f1017586c44f50654ef9febb42d491f31
treed17aa3f3c788656de2f25f9ea31c8a30758fe9e9
parentd2cf8ccf5a1871058a083c00efe37d7eb91bf6bd
ubsan/overflow: Rework integer overflow sanitizer option to turn on everything

Since we're going to approach integer overflow mitigation a type at a
time, we need to enable all of the associated sanitizers, and then opt
into types one at a time.

Rename the existing "signed wrap" sanitizer to just the entire topic area:
"integer wrap". Enable the implicit integer truncation sanitizers, with
required callbacks and tests.

Notably, this requires features (currently) only available in Clang,
so we can depend on the cc-option tests to determine availability
instead of doing version tests.

Link: https://lore.kernel.org/r/20250307041914.937329-1-kees@kernel.org
Signed-off-by: Kees Cook <kees@kernel.org>
include/linux/compiler_types.h
kernel/configs/hardening.config
lib/Kconfig.ubsan
lib/test_ubsan.c
lib/ubsan.c
lib/ubsan.h
scripts/Makefile.lib
scripts/Makefile.ubsan