diff options
-rw-r--r-- | arch/parisc/Kconfig | 1 | ||||
-rw-r--r-- | arch/s390/Kconfig | 1 | ||||
-rw-r--r-- | lib/Kconfig.ubsan | 11 | ||||
-rw-r--r-- | scripts/Makefile.ubsan | 4 |
4 files changed, 0 insertions, 17 deletions
diff --git a/arch/parisc/Kconfig b/arch/parisc/Kconfig index 46f656b8fc23..e7705dde953f 100644 --- a/arch/parisc/Kconfig +++ b/arch/parisc/Kconfig | |||
@@ -11,7 +11,6 @@ config PARISC | |||
11 | select ARCH_HAS_ELF_RANDOMIZE | 11 | select ARCH_HAS_ELF_RANDOMIZE |
12 | select ARCH_HAS_STRICT_KERNEL_RWX | 12 | select ARCH_HAS_STRICT_KERNEL_RWX |
13 | select ARCH_HAS_UBSAN_SANITIZE_ALL | 13 | select ARCH_HAS_UBSAN_SANITIZE_ALL |
14 | select ARCH_WANTS_UBSAN_NO_NULL | ||
15 | select ARCH_SUPPORTS_MEMORY_FAILURE | 14 | select ARCH_SUPPORTS_MEMORY_FAILURE |
16 | select RTC_CLASS | 15 | select RTC_CLASS |
17 | select RTC_DRV_GENERIC | 16 | select RTC_DRV_GENERIC |
diff --git a/arch/s390/Kconfig b/arch/s390/Kconfig index 8a1863d9ed53..4fe5b2affa23 100644 --- a/arch/s390/Kconfig +++ b/arch/s390/Kconfig | |||
@@ -106,7 +106,6 @@ config S390 | |||
106 | select ARCH_USE_BUILTIN_BSWAP | 106 | select ARCH_USE_BUILTIN_BSWAP |
107 | select ARCH_USE_CMPXCHG_LOCKREF | 107 | select ARCH_USE_CMPXCHG_LOCKREF |
108 | select ARCH_WANTS_DYNAMIC_TASK_STRUCT | 108 | select ARCH_WANTS_DYNAMIC_TASK_STRUCT |
109 | select ARCH_WANTS_UBSAN_NO_NULL | ||
110 | select ARCH_WANT_IPC_PARSE_VERSION | 109 | select ARCH_WANT_IPC_PARSE_VERSION |
111 | select BUILDTIME_EXTABLE_SORT | 110 | select BUILDTIME_EXTABLE_SORT |
112 | select CLONE_BACKWARDS2 | 111 | select CLONE_BACKWARDS2 |
diff --git a/lib/Kconfig.ubsan b/lib/Kconfig.ubsan index 19d42ea75ec2..98fa559ebd80 100644 --- a/lib/Kconfig.ubsan +++ b/lib/Kconfig.ubsan | |||
@@ -1,9 +1,6 @@ | |||
1 | config ARCH_HAS_UBSAN_SANITIZE_ALL | 1 | config ARCH_HAS_UBSAN_SANITIZE_ALL |
2 | bool | 2 | bool |
3 | 3 | ||
4 | config ARCH_WANTS_UBSAN_NO_NULL | ||
5 | def_bool n | ||
6 | |||
7 | config UBSAN | 4 | config UBSAN |
8 | bool "Undefined behaviour sanity checker" | 5 | bool "Undefined behaviour sanity checker" |
9 | help | 6 | help |
@@ -39,14 +36,6 @@ config UBSAN_ALIGNMENT | |||
39 | Enabling this option on architectures that support unaligned | 36 | Enabling this option on architectures that support unaligned |
40 | accesses may produce a lot of false positives. | 37 | accesses may produce a lot of false positives. |
41 | 38 | ||
42 | config UBSAN_NULL | ||
43 | bool "Enable checking of null pointers" | ||
44 | depends on UBSAN | ||
45 | default y if !ARCH_WANTS_UBSAN_NO_NULL | ||
46 | help | ||
47 | This option enables detection of memory accesses via a | ||
48 | null pointer. | ||
49 | |||
50 | config TEST_UBSAN | 39 | config TEST_UBSAN |
51 | tristate "Module for testing for undefined behavior detection" | 40 | tristate "Module for testing for undefined behavior detection" |
52 | depends on m && UBSAN | 41 | depends on m && UBSAN |
diff --git a/scripts/Makefile.ubsan b/scripts/Makefile.ubsan index b593b36ccff8..38b2b4818e8e 100644 --- a/scripts/Makefile.ubsan +++ b/scripts/Makefile.ubsan | |||
@@ -14,10 +14,6 @@ ifdef CONFIG_UBSAN_ALIGNMENT | |||
14 | CFLAGS_UBSAN += $(call cc-option, -fsanitize=alignment) | 14 | CFLAGS_UBSAN += $(call cc-option, -fsanitize=alignment) |
15 | endif | 15 | endif |
16 | 16 | ||
17 | ifdef CONFIG_UBSAN_NULL | ||
18 | CFLAGS_UBSAN += $(call cc-option, -fsanitize=null) | ||
19 | endif | ||
20 | |||
21 | # -fsanitize=* options makes GCC less smart than usual and | 17 | # -fsanitize=* options makes GCC less smart than usual and |
22 | # increase number of 'maybe-uninitialized false-positives | 18 | # increase number of 'maybe-uninitialized false-positives |
23 | CFLAGS_UBSAN += $(call cc-option, -Wno-maybe-uninitialized) | 19 | CFLAGS_UBSAN += $(call cc-option, -Wno-maybe-uninitialized) |