Skip to content

Commit

Permalink
ubsan: Restore dependency on ARCH_HAS_UBSAN
Browse files Browse the repository at this point in the history
While removing CONFIG_UBSAN_SANITIZE_ALL, ARCH_HAS_UBSAN wasn't correctly
depended on. Restore this, as we do not want to attempt UBSAN builds
unless it's actually been tested on a given architecture.

Reported-by: Masahiro Yamada <masahiroy@kernel.org>
Closes: https://lore.kernel.org/all/20240514095427.541201-1-masahiroy@kernel.org
Fixes: 918327e ("ubsan: Remove CONFIG_UBSAN_SANITIZE_ALL")
Link: https://lore.kernel.org/r/20240514233747.work.441-kees@kernel.org
Signed-off-by: Kees Cook <keescook@chromium.org>
  • Loading branch information
kees committed May 18, 2024
1 parent ce0d73e commit 890a648
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lib/Kconfig.ubsan
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ config ARCH_HAS_UBSAN

menuconfig UBSAN
bool "Undefined behaviour sanity checker"
depends on ARCH_HAS_UBSAN
help
This option enables the Undefined Behaviour sanity checker.
Compile-time instrumentation is used to detect various undefined
Expand Down

0 comments on commit 890a648

Please sign in to comment.