]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
ubsan: disable UBSAN_TRAP for all*config
authorKees Cook <keescook@chromium.org>
Wed, 16 Dec 2020 04:46:31 +0000 (20:46 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Wed, 16 Dec 2020 06:46:18 +0000 (22:46 -0800)
Doing all*config builds attempts to build as much as possible. UBSAN_TRAP
effectively short-circuits lib/usban.c, so it should be disabled for
COMPILE_TEST so that the lib/ubsan.c code gets built.

Link: https://lkml.kernel.org/r/20201203004437.389959-5-keescook@chromium.org
Signed-off-by: Kees Cook <keescook@chromium.org>
Reviewed-by: Nathan Chancellor <natechancellor@gmail.com>
Cc: Andrey Ryabinin <aryabinin@virtuozzo.com>
Cc: Ard Biesheuvel <ardb@kernel.org>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: Dmitry Vyukov <dvyukov@google.com>
Cc: George Popescu <georgepope@android.com>
Cc: Herbert Xu <herbert@gondor.apana.org.au>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Marco Elver <elver@google.com>
Cc: Masahiro Yamada <masahiroy@kernel.org>
Cc: Michal Marek <michal.lkml@markovi.net>
Cc: Nick Desaulniers <ndesaulniers@google.com>
Cc: Peter Oberparleiter <oberpar@linux.ibm.com>
Cc: Randy Dunlap <rdunlap@infradead.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
lib/Kconfig.ubsan

index 4190a99b1eaadf67460c1bed4dee70165617e166..6e8b67d4b0d9be3cae6ceb5935ed84dbedf8f646 100644 (file)
@@ -14,6 +14,7 @@ if UBSAN
 
 config UBSAN_TRAP
        bool "On Sanitizer warnings, abort the running kernel code"
+       depends on !COMPILE_TEST
        depends on $(cc-option, -fsanitize-undefined-trap-on-error)
        help
          Building kernels with Sanitizer features enabled tends to grow