Skip to content

Commit b027471

Browse files
melvertorvalds
authored andcommitted
Revert "ubsan, kcsan: Don't combine sanitizer with kcov on clang"
This reverts commit ea91a1d. Since df05c0e ("Documentation: Raise the minimum supported version of LLVM to 11.0.0") the minimum Clang version is now 11.0, which fixed the UBSAN/KCSAN vs. KCOV incompatibilities. Link: https://bugs.llvm.org/show_bug.cgi?id=45831 Link: https://lkml.kernel.org/r/[email protected] Link: https://lkml.kernel.org/r/[email protected] Signed-off-by: Marco Elver <[email protected]> Reviewed-by: Nathan Chancellor <[email protected]> Reviewed-by: Kees Cook <[email protected]> Cc: Alexander Potapenko <[email protected]> Cc: Dmitry Vyukov <[email protected]> Cc: Nathan Chancellor <[email protected]> Cc: Nick Desaulniers <[email protected]> Cc: Arnd Bergmann <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
1 parent 0cbcc92 commit b027471

File tree

2 files changed

+0
-23
lines changed

2 files changed

+0
-23
lines changed

lib/Kconfig.kcsan

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -10,21 +10,10 @@ config HAVE_KCSAN_COMPILER
1010
For the list of compilers that support KCSAN, please see
1111
<file:Documentation/dev-tools/kcsan.rst>.
1212

13-
config KCSAN_KCOV_BROKEN
14-
def_bool KCOV && CC_HAS_SANCOV_TRACE_PC
15-
depends on CC_IS_CLANG
16-
depends on !$(cc-option,-Werror=unused-command-line-argument -fsanitize=thread -fsanitize-coverage=trace-pc)
17-
help
18-
Some versions of clang support either KCSAN and KCOV but not the
19-
combination of the two.
20-
See https://bugs.llvm.org/show_bug.cgi?id=45831 for the status
21-
in newer releases.
22-
2313
menuconfig KCSAN
2414
bool "KCSAN: dynamic data race detector"
2515
depends on HAVE_ARCH_KCSAN && HAVE_KCSAN_COMPILER
2616
depends on DEBUG_KERNEL && !KASAN
27-
depends on !KCSAN_KCOV_BROKEN
2817
select STACKTRACE
2918
help
3019
The Kernel Concurrency Sanitizer (KCSAN) is a dynamic

lib/Kconfig.ubsan

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -27,16 +27,6 @@ config UBSAN_TRAP
2727
the system. For some system builders this is an acceptable
2828
trade-off.
2929

30-
config UBSAN_KCOV_BROKEN
31-
def_bool KCOV && CC_HAS_SANCOV_TRACE_PC
32-
depends on CC_IS_CLANG
33-
depends on !$(cc-option,-Werror=unused-command-line-argument -fsanitize=bounds -fsanitize-coverage=trace-pc)
34-
help
35-
Some versions of clang support either UBSAN or KCOV but not the
36-
combination of the two.
37-
See https://bugs.llvm.org/show_bug.cgi?id=45831 for the status
38-
in newer releases.
39-
4030
config CC_HAS_UBSAN_BOUNDS
4131
def_bool $(cc-option,-fsanitize=bounds)
4232

@@ -46,7 +36,6 @@ config CC_HAS_UBSAN_ARRAY_BOUNDS
4636
config UBSAN_BOUNDS
4737
bool "Perform array index bounds checking"
4838
default UBSAN
49-
depends on !UBSAN_KCOV_BROKEN
5039
depends on CC_HAS_UBSAN_ARRAY_BOUNDS || CC_HAS_UBSAN_BOUNDS
5140
help
5241
This option enables detection of directly indexed out of bounds
@@ -72,7 +61,6 @@ config UBSAN_ARRAY_BOUNDS
7261
config UBSAN_LOCAL_BOUNDS
7362
bool "Perform array local bounds checking"
7463
depends on UBSAN_TRAP
75-
depends on !UBSAN_KCOV_BROKEN
7664
depends on $(cc-option,-fsanitize=local-bounds)
7765
help
7866
This option enables -fsanitize=local-bounds which traps when an

0 commit comments

Comments
 (0)