* [PATCH] Revert "ubsan, kcsan: Don't combine sanitizer with kcov on clang"
@ 2022-01-28 10:56 Marco Elver
2022-01-28 17:58 ` Kees Cook
0 siblings, 1 reply; 2+ messages in thread
From: Marco Elver @ 2022-01-28 10:56 UTC (permalink / raw)
To: elver, Andrew Morton
Cc: Alexander Potapenko, Dmitry Vyukov, Nathan Chancellor,
Nick Desaulniers, Kees Cook, kasan-dev, linux-kernel, llvm,
linux-mm, Arnd Bergmann, linux-kbuild
This reverts commit ea91a1d45d19469001a4955583187b0d75915759.
Since df05c0e9496c ("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/YaodyZzu0MTCJcvO@elver.google.com
Signed-off-by: Marco Elver <elver@google.com>
Reviewed-by: Nathan Chancellor <nathan@kernel.org>
---
lib/Kconfig.kcsan | 11 -----------
lib/Kconfig.ubsan | 12 ------------
2 files changed, 23 deletions(-)
diff --git a/lib/Kconfig.kcsan b/lib/Kconfig.kcsan
index 63b70b8c5551..de022445fbba 100644
--- a/lib/Kconfig.kcsan
+++ b/lib/Kconfig.kcsan
@@ -10,21 +10,10 @@ config HAVE_KCSAN_COMPILER
For the list of compilers that support KCSAN, please see
<file:Documentation/dev-tools/kcsan.rst>.
-config KCSAN_KCOV_BROKEN
- def_bool KCOV && CC_HAS_SANCOV_TRACE_PC
- depends on CC_IS_CLANG
- depends on !$(cc-option,-Werror=unused-command-line-argument -fsanitize=thread -fsanitize-coverage=trace-pc)
- help
- Some versions of clang support either KCSAN and KCOV but not the
- combination of the two.
- See https://bugs.llvm.org/show_bug.cgi?id=45831 for the status
- in newer releases.
-
menuconfig KCSAN
bool "KCSAN: dynamic data race detector"
depends on HAVE_ARCH_KCSAN && HAVE_KCSAN_COMPILER
depends on DEBUG_KERNEL && !KASAN
- depends on !KCSAN_KCOV_BROKEN
select STACKTRACE
help
The Kernel Concurrency Sanitizer (KCSAN) is a dynamic
diff --git a/lib/Kconfig.ubsan b/lib/Kconfig.ubsan
index 236c5cefc4cc..f3c57ed51838 100644
--- a/lib/Kconfig.ubsan
+++ b/lib/Kconfig.ubsan
@@ -27,16 +27,6 @@ config UBSAN_TRAP
the system. For some system builders this is an acceptable
trade-off.
-config UBSAN_KCOV_BROKEN
- def_bool KCOV && CC_HAS_SANCOV_TRACE_PC
- depends on CC_IS_CLANG
- depends on !$(cc-option,-Werror=unused-command-line-argument -fsanitize=bounds -fsanitize-coverage=trace-pc)
- help
- Some versions of clang support either UBSAN or KCOV but not the
- combination of the two.
- See https://bugs.llvm.org/show_bug.cgi?id=45831 for the status
- in newer releases.
-
config CC_HAS_UBSAN_BOUNDS
def_bool $(cc-option,-fsanitize=bounds)
@@ -46,7 +36,6 @@ config CC_HAS_UBSAN_ARRAY_BOUNDS
config UBSAN_BOUNDS
bool "Perform array index bounds checking"
default UBSAN
- depends on !UBSAN_KCOV_BROKEN
depends on CC_HAS_UBSAN_ARRAY_BOUNDS || CC_HAS_UBSAN_BOUNDS
help
This option enables detection of directly indexed out of bounds
@@ -72,7 +61,6 @@ config UBSAN_ARRAY_BOUNDS
config UBSAN_LOCAL_BOUNDS
bool "Perform array local bounds checking"
depends on UBSAN_TRAP
- depends on !UBSAN_KCOV_BROKEN
depends on $(cc-option,-fsanitize=local-bounds)
help
This option enables -fsanitize=local-bounds which traps when an
--
2.35.0.rc0.227.g00780c9af4-goog
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] Revert "ubsan, kcsan: Don't combine sanitizer with kcov on clang"
2022-01-28 10:56 [PATCH] Revert "ubsan, kcsan: Don't combine sanitizer with kcov on clang" Marco Elver
@ 2022-01-28 17:58 ` Kees Cook
0 siblings, 0 replies; 2+ messages in thread
From: Kees Cook @ 2022-01-28 17:58 UTC (permalink / raw)
To: Marco Elver
Cc: Andrew Morton, Alexander Potapenko, Dmitry Vyukov,
Nathan Chancellor, Nick Desaulniers, kasan-dev, linux-kernel,
llvm, linux-mm, Arnd Bergmann, linux-kbuild
On Fri, Jan 28, 2022 at 11:56:31AM +0100, Marco Elver wrote:
> This reverts commit ea91a1d45d19469001a4955583187b0d75915759.
>
> Since df05c0e9496c ("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/YaodyZzu0MTCJcvO@elver.google.com
> Signed-off-by: Marco Elver <elver@google.com>
Yup, good to get rid of it.
Reviewed-by: Kees Cook <keescook@chromium.org>
--
Kees Cook
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-01-28 17:58 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-28 10:56 [PATCH] Revert "ubsan, kcsan: Don't combine sanitizer with kcov on clang" Marco Elver
2022-01-28 17:58 ` Kees Cook
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.