Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ubsan: remove cc-option test for UBSAN_TRAP

-fsanitize-undefined-trap-on-error has been supported since GCC 5.1 and
Clang 3.2. The minimum supported version of these according to
Documentation/process/changes.rst is 5.1 and 11.0.0 respectively. Drop
this cc-option check.

Signed-off-by: Nick Desaulniers <ndesaulniers@google.com>
Reviewed-by: Nathan Chancellor <nathan@kernel.org>
Signed-off-by: Kees Cook <keescook@chromium.org>
Link: https://lore.kernel.org/r/20230407215406.768464-1-ndesaulniers@google.com

authored by

Nick Desaulniers and committed by
Kees Cook
08e40442 55c84a5c

-1
-1
lib/Kconfig.ubsan
··· 15 15 config UBSAN_TRAP 16 16 bool "On Sanitizer warnings, abort the running kernel code" 17 17 depends on !COMPILE_TEST 18 - depends on $(cc-option, -fsanitize-undefined-trap-on-error) 19 18 help 20 19 Building kernels with Sanitizer features enabled tends to grow 21 20 the kernel size by around 5%, due to adding all the debugging