From: Nathan Chancellor <nathan@kernel.org>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: Arnd Bergmann <arnd@arndb.de>, Kees Cook <kees@kernel.org>,
Nick Desaulniers <nick.desaulniers+lkml@gmail.com>,
Bill Wendling <morbo@google.com>,
Justin Stitt <justinstitt@google.com>,
linux-kernel@vger.kernel.org, llvm@lists.linux.dev,
patches@lists.linux.dev, Nathan Chancellor <nathan@kernel.org>,
Josh Poimboeuf <jpoimboe@kernel.org>,
Peter Zijlstra <peterz@infradead.org>,
Marco Elver <elver@google.com>,
Dmitry Vyukov <dvyukov@google.com>,
kasan-dev@googlegroups.com
Subject: [PATCH 09/10] objtool: Drop noinstr hack for KCSAN_WEAK_MEMORY
Date: Mon, 18 Aug 2025 11:57:25 -0700 [thread overview]
Message-ID: <20250818-bump-min-llvm-ver-15-v1-9-c8b1d0f955e0@kernel.org> (raw)
In-Reply-To: <20250818-bump-min-llvm-ver-15-v1-0-c8b1d0f955e0@kernel.org>
Now that the minimum supported version of LLVM for building the kernel
has been bumped to 15.0.0, __no_kcsan will always ensure that the thread
sanitizer functions are not generated, so remove the check for tsan
functions in is_profiling_func() and the always true depends and
unnecessary select lines in KCSAN_WEAK_MEMORY.
Signed-off-by: Nathan Chancellor <nathan@kernel.org>
---
Cc: Josh Poimboeuf <jpoimboe@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Marco Elver <elver@google.com>
Cc: Dmitry Vyukov <dvyukov@google.com>
Cc: kasan-dev@googlegroups.com
---
lib/Kconfig.kcsan | 6 ------
tools/objtool/check.c | 10 ----------
2 files changed, 16 deletions(-)
diff --git a/lib/Kconfig.kcsan b/lib/Kconfig.kcsan
index 609ddfc73de5..4ce4b0c0109c 100644
--- a/lib/Kconfig.kcsan
+++ b/lib/Kconfig.kcsan
@@ -185,12 +185,6 @@ config KCSAN_WEAK_MEMORY
bool "Enable weak memory modeling to detect missing memory barriers"
default y
depends on KCSAN_STRICT
- # We can either let objtool nop __tsan_func_{entry,exit}() and builtin
- # atomics instrumentation in .noinstr.text, or use a compiler that can
- # implement __no_kcsan to really remove all instrumentation.
- depends on !ARCH_WANTS_NO_INSTR || HAVE_NOINSTR_HACK || \
- CC_IS_GCC || CLANG_VERSION >= 140000
- select OBJTOOL if HAVE_NOINSTR_HACK
help
Enable support for modeling a subset of weak memory, which allows
detecting a subset of data races due to missing memory barriers.
diff --git a/tools/objtool/check.c b/tools/objtool/check.c
index d14f20ef1db1..efa4c060ff4e 100644
--- a/tools/objtool/check.c
+++ b/tools/objtool/check.c
@@ -2453,16 +2453,6 @@ static bool is_profiling_func(const char *name)
if (!strncmp(name, "__sanitizer_cov_", 16))
return true;
- /*
- * Some compilers currently do not remove __tsan_func_entry/exit nor
- * __tsan_atomic_signal_fence (used for barrier instrumentation) with
- * the __no_sanitize_thread attribute, remove them. Once the kernel's
- * minimum Clang version is 14.0, this can be removed.
- */
- if (!strncmp(name, "__tsan_func_", 12) ||
- !strcmp(name, "__tsan_atomic_signal_fence"))
- return true;
-
return false;
}
--
2.50.1
next prev parent reply other threads:[~2025-08-18 18:58 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-08-18 18:57 [PATCH 00/10] Bump minimum supported version of LLVM for building the kernel to 15.0.0 Nathan Chancellor
2025-08-18 18:57 ` [PATCH 01/10] kbuild: Bump minimum " Nathan Chancellor
2025-08-21 16:48 ` Nicolas Schier
2025-08-21 17:27 ` Arnd Bergmann
2025-08-18 18:57 ` [PATCH 02/10] arch/Kconfig: Drop always true condition from RANDOMIZE_KSTACK_OFFSET Nathan Chancellor
2025-08-18 18:57 ` [PATCH 03/10] ARM: Clean up definition of ARM_HAS_GROUP_RELOCS Nathan Chancellor
2025-08-18 18:57 ` [PATCH 04/10] arm64: Remove tautological LLVM Kconfig conditions Nathan Chancellor
2025-08-19 11:35 ` Will Deacon
2025-08-18 18:57 ` [PATCH 05/10] mips: Unconditionally select ARCH_HAS_CURRENT_STACK_POINTER Nathan Chancellor
2025-08-19 12:08 ` Thomas Bogendoerfer
2025-08-18 18:57 ` [PATCH 06/10] powerpc: Drop unnecessary initializations in __copy_inst_from_kernel_nofault() Nathan Chancellor
2025-08-18 18:57 ` [PATCH 07/10] riscv: Remove version check for LTO_CLANG selects Nathan Chancellor
2025-08-20 7:23 ` Alexandre Ghiti
2025-08-20 16:11 ` Nathan Chancellor
2025-08-18 18:57 ` [PATCH 08/10] lib/Kconfig.debug: Drop CLANG_VERSION check from DEBUG_INFO_DWARF_TOOLCHAIN_DEFAULT Nathan Chancellor
2025-08-18 18:57 ` Nathan Chancellor [this message]
2025-08-18 19:12 ` [PATCH 09/10] objtool: Drop noinstr hack for KCSAN_WEAK_MEMORY Peter Zijlstra
2025-08-19 10:35 ` Marco Elver
2025-08-18 18:57 ` [PATCH 10/10] KMSAN: Remove tautological checks Nathan Chancellor
2025-08-19 11:02 ` Marco Elver
2025-08-19 0:55 ` [PATCH 00/10] Bump minimum supported version of LLVM for building the kernel to 15.0.0 Kees Cook
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250818-bump-min-llvm-ver-15-v1-9-c8b1d0f955e0@kernel.org \
--to=nathan@kernel.org \
--cc=akpm@linux-foundation.org \
--cc=arnd@arndb.de \
--cc=dvyukov@google.com \
--cc=elver@google.com \
--cc=jpoimboe@kernel.org \
--cc=justinstitt@google.com \
--cc=kasan-dev@googlegroups.com \
--cc=kees@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=llvm@lists.linux.dev \
--cc=morbo@google.com \
--cc=nick.desaulniers+lkml@gmail.com \
--cc=patches@lists.linux.dev \
--cc=peterz@infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).