Revert "ubsan: enable for all*config builds"

This reverts commit d0a3ac549f as it
breaks allmodconfig builds on clang.

Cc: Kees Cook <keescook@chromium.org>
Cc: Stephen Rothwell <sfr@canb.auug.org.au>
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: Nathan Chancellor <natechancellor@gmail.com>
Cc: Nick Desaulniers <ndesaulniers@google.com>
Cc: Peter Oberparleiter <oberpar@linux.ibm.com>
Cc: Randy Dunlap <rdunlap@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: Ia7c51274268d1a64ed19837825a5fb1debaaeea1
This commit is contained in:
Greg Kroah-Hartman
2020-12-19 15:15:57 +01:00
parent c4966468f5
commit 6f38301bff
2 changed files with 2 additions and 5 deletions

View File

@@ -313,10 +313,6 @@ SECTIONS
#else
.data : AT(ADDR(.data) - LOAD_OFFSET) {
DATA_DATA
#ifdef CONFIG_UBSAN
*(.data..Lubsan_data*)
*(.data..Lubsan_type*)
#endif
*(.data.rel*)
*(.toc1)
*(.branch_lt)

View File

@@ -160,7 +160,7 @@ config UBSAN_ENUM
config UBSAN_ALIGNMENT
bool "Perform checking for misaligned pointer usage"
default !HAVE_EFFICIENT_UNALIGNED_ACCESS
depends on !UBSAN_TRAP && !COMPILE_TEST
depends on !UBSAN_TRAP
depends on $(cc-option,-fsanitize=alignment)
help
This option enables the check of unaligned memory accesses.
@@ -170,6 +170,7 @@ config UBSAN_ALIGNMENT
config UBSAN_SANITIZE_ALL
bool "Enable instrumentation for the entire kernel"
depends on ARCH_HAS_UBSAN_SANITIZE_ALL
depends on !COMPILE_TEST
default y
help
This option activates instrumentation for the entire kernel.