diff --git a/arch/powerpc/kernel/vmlinux.lds.S b/arch/powerpc/kernel/vmlinux.lds.S index e184d17387f6..6db90cdf11da 100644 --- a/arch/powerpc/kernel/vmlinux.lds.S +++ b/arch/powerpc/kernel/vmlinux.lds.S @@ -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) diff --git a/lib/Kconfig.ubsan b/lib/Kconfig.ubsan index 8b635fd75fe4..14482cd85857 100644 --- a/lib/Kconfig.ubsan +++ b/lib/Kconfig.ubsan @@ -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.