From: Miguel Ojeda <ojeda@kernel.org>
To: stable@vger.kernel.org
Cc: Alice Ryhl <aliceryhl@google.com>, Gary Guo <gary@garyguo.net>,
Miguel Ojeda <ojeda@kernel.org>
Subject: [PATCH 6.12.y] rust: kasan: KASAN+RUST requires clang
Date: Thu, 9 Jul 2026 20:03:59 +0200 [thread overview]
Message-ID: <20260709180359.130168-1-ojeda@kernel.org> (raw)
In-Reply-To: <2026070939-unworldly-mantra-5611@gregkh>
From: Alice Ryhl <aliceryhl@google.com>
Kernel KASAN involves passing various llvm/gcc specific arguments to
the C and Rust compiler. Since these arguments differ between llvm and
gcc, it's not safe to mix an llvm-based rustc with a gcc build when
kasan is enabled.
Signed-off-by: Alice Ryhl <aliceryhl@google.com>
Reviewed-by: Gary Guo <gary@garyguo.net>
Cc: stable@vger.kernel.org
Fixes: e3117404b411 ("kbuild: rust: Enable KASAN support")
Link: https://patch.msgid.link/20260408-kasan-rust-sw-tags-v3-1-e07964d14363@google.com
Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
(cherry picked from commit 5b271543d0f08e9733d4732721e960e285f6448f)
Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
---
init/Kconfig | 1 +
1 file changed, 1 insertion(+)
diff --git a/init/Kconfig b/init/Kconfig
index f4b91b1857bf..53eba5cd88ff 100644
--- a/init/Kconfig
+++ b/init/Kconfig
@@ -1974,6 +1974,7 @@ config RUST
depends on !CFI_CLANG || HAVE_CFI_ICALL_NORMALIZE_INTEGERS_RUSTC
select CFI_ICALL_NORMALIZE_INTEGERS if CFI_CLANG
depends on !CALL_PADDING || RUSTC_VERSION >= 108100
+ depends on !KASAN || CC_IS_CLANG
depends on !KASAN_SW_TAGS
depends on !(MITIGATION_RETHUNK && KASAN) || RUSTC_VERSION >= 108300
help
--
2.55.0
next prev parent reply other threads:[~2026-07-09 18:04 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-09 17:36 FAILED: patch "[PATCH] rust: kasan: KASAN+RUST requires clang" failed to apply to 6.12-stable tree gregkh
2026-07-09 18:03 ` Miguel Ojeda [this message]
2026-07-10 21:03 ` [PATCH 6.12.y] rust: kasan: KASAN+RUST requires clang Sasha Levin
2026-07-09 18:05 ` FAILED: patch "[PATCH] rust: kasan: KASAN+RUST requires clang" failed to apply to 6.12-stable tree Miguel Ojeda
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=20260709180359.130168-1-ojeda@kernel.org \
--to=ojeda@kernel.org \
--cc=aliceryhl@google.com \
--cc=gary@garyguo.net \
--cc=stable@vger.kernel.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