All of lore.kernel.org
 help / color / mirror / Atom feed
* FAILED: patch "[PATCH] rust: kasan: KASAN+RUST requires clang" failed to apply to 6.12-stable tree
@ 2026-07-09 17:36 gregkh
  2026-07-09 18:03 ` [PATCH 6.12.y] rust: kasan: KASAN+RUST requires clang Miguel Ojeda
  2026-07-09 18:05 ` FAILED: patch "[PATCH] rust: kasan: KASAN+RUST requires clang" failed to apply to 6.12-stable tree Miguel Ojeda
  0 siblings, 2 replies; 4+ messages in thread
From: gregkh @ 2026-07-09 17:36 UTC (permalink / raw)
  To: aliceryhl, gary, ojeda; +Cc: stable


The patch below does not apply to the 6.12-stable tree.
If someone wants it applied there, or to any other stable or longterm
tree, then please email the backport, including the original git commit
id to <stable@vger.kernel.org>.

To reproduce the conflict and resubmit, you may use the following commands:

git fetch https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/ linux-6.12.y
git checkout FETCH_HEAD
git cherry-pick -x 5b271543d0f08e9733d4732721e960e285f6448f
# <resolve conflicts, build, test, etc.>
git commit -s
git send-email --to '<stable@vger.kernel.org>' --in-reply-to '2026070939-unworldly-mantra-5611@gregkh' --subject-prefix 'PATCH 6.12.y' 'HEAD^..'

Possible dependencies:



thanks,

greg k-h

------------------ original commit in Linus's tree ------------------

From 5b271543d0f08e9733d4732721e960e285f6448f Mon Sep 17 00:00:00 2001
From: Alice Ryhl <aliceryhl@google.com>
Date: Wed, 8 Apr 2026 08:32:16 +0000
Subject: [PATCH] rust: kasan: KASAN+RUST requires clang

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>

diff --git a/init/Kconfig b/init/Kconfig
index 2937c4d308ae..826a7d768ca3 100644
--- a/init/Kconfig
+++ b/init/Kconfig
@@ -2198,6 +2198,7 @@ config RUST
 	depends on !DEBUG_INFO_BTF || (PAHOLE_HAS_LANG_EXCLUDE && !LTO)
 	depends on !CFI || HAVE_CFI_ICALL_NORMALIZE_INTEGERS_RUSTC
 	select CFI_ICALL_NORMALIZE_INTEGERS if CFI
+	depends on !KASAN || CC_IS_CLANG
 	depends on !KASAN_SW_TAGS
 	help
 	  Enables Rust support in the kernel.


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH 6.12.y] rust: kasan: KASAN+RUST requires clang
  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
  2026-07-10 21:03   ` 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
  1 sibling, 1 reply; 4+ messages in thread
From: Miguel Ojeda @ 2026-07-09 18:03 UTC (permalink / raw)
  To: stable; +Cc: Alice Ryhl, Gary Guo, Miguel Ojeda

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


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: FAILED: patch "[PATCH] rust: kasan: KASAN+RUST requires clang" failed to apply to 6.12-stable tree
  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 ` [PATCH 6.12.y] rust: kasan: KASAN+RUST requires clang Miguel Ojeda
@ 2026-07-09 18:05 ` Miguel Ojeda
  1 sibling, 0 replies; 4+ messages in thread
From: Miguel Ojeda @ 2026-07-09 18:05 UTC (permalink / raw)
  To: gregkh; +Cc: aliceryhl, gary, ojeda, stable

On Thu, Jul 9, 2026 at 7:36 PM <gregkh@linuxfoundation.org> wrote:
>
> The patch below does not apply to the 6.12-stable tree.
> If someone wants it applied there, or to any other stable or longterm
> tree, then please email the backport, including the original git commit
> id to <stable@vger.kernel.org>.
>
> To reproduce the conflict and resubmit, you may use the following commands:
>
> git fetch https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/ linux-6.12.y
> git checkout FETCH_HEAD
> git cherry-pick -x 5b271543d0f08e9733d4732721e960e285f6448f
> # <resolve conflicts, build, test, etc.>
> git commit -s
> git send-email --to '<stable@vger.kernel.org>' --in-reply-to '2026070939-unworldly-mantra-5611@gregkh' --subject-prefix 'PATCH 6.12.y' 'HEAD^..'

Done as well.

Cheers,
Miguel

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH 6.12.y] rust: kasan: KASAN+RUST requires clang
  2026-07-09 18:03 ` [PATCH 6.12.y] rust: kasan: KASAN+RUST requires clang Miguel Ojeda
@ 2026-07-10 21:03   ` Sasha Levin
  0 siblings, 0 replies; 4+ messages in thread
From: Sasha Levin @ 2026-07-10 21:03 UTC (permalink / raw)
  To: stable; +Cc: Sasha Levin, Alice Ryhl, Gary Guo, Miguel Ojeda

On Thu, Jul 09, 2026 at 08:03:59PM +0200, Miguel Ojeda wrote:
> 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.

Queued for 6.12, thanks.

-- 
Thanks,
Sasha

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2026-07-10 21:03 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 ` [PATCH 6.12.y] rust: kasan: KASAN+RUST requires clang Miguel Ojeda
2026-07-10 21:03   ` 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

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.