From: Nathan Chancellor <nathan@kernel.org>
To: Alice Ryhl <aliceryhl@google.com>
Cc: "Russell King" <linux@armlinux.org.uk>,
"Miguel Ojeda" <ojeda@kernel.org>,
"Boqun Feng" <boqun@kernel.org>, "Gary Guo" <gary@garyguo.net>,
"Björn Roy Baron" <bjorn3_gh@protonmail.com>,
"Benno Lossin" <lossin@kernel.org>,
"Andreas Hindborg" <a.hindborg@kernel.org>,
"Trevor Gross" <tmgross@umich.edu>,
"Danilo Krummrich" <dakr@kernel.org>,
"Christian Schrrefl" <chrisi.schrefl@gmail.com>,
linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org, rust-for-linux@vger.kernel.org,
stable@vger.kernel.org
Subject: Re: [PATCH] ARM: Do not select HAVE_RUST when KASAN is enabled
Date: Mon, 11 May 2026 18:09:43 +0900 [thread overview]
Message-ID: <20260511090943.GA1029560@ax162> (raw)
In-Reply-To: <agGRnHVTLiwobb9W@google.com>
On Mon, May 11, 2026 at 08:21:48AM +0000, Alice Ryhl wrote:
> On Mon, May 11, 2026 at 05:02:44PM +0900, Nathan Chancellor wrote:
> > When KASAN is enabled, such as with allmodconfig, the build fails when
> > building the Rust code with:
> >
> > error: kernel-address sanitizer is not supported for this target
> >
> > error: aborting due to 1 previous error
> >
> > make[4]: *** [rust/Makefile:654: rust/core.o] Error 1
> >
> > The arm-unknown-linux-gnueabi target does not support KASAN, so avoid
> > saying Rust is supported when it is enabled.
> >
> > Cc: stable@vger.kernel.org
> > Fixes: ccb8ce526807 ("ARM: 9441/1: rust: Enable Rust support for ARMv7")
> > Link: https://github.com/Rust-for-Linux/linux/issues/1234
> > Signed-off-by: Nathan Chancellor <nathan@kernel.org>
>
> I would probably suggest moving the conditions out to a separate
> RUSTC_SUPPORTS_ARM config option similar to what I did in commit
> d077242d68a3 ("rust: support for shadow call stack sanitizer").
>
> This way it will be simpler to adjust this logic when the target obtains
> support for this sanitizer.
Sure, I kept it simple for backporting purposes but I don't mind
breaking out the dependencies into their own symbol, even though it
feels like that could be done when support for the sanitizer is
re-enabled, which would truly mirror what you did. No strong opinion
though, so I will send a v2 after giving some time for other comments.
> Also, we may need the same change for CONFIG_CFI too.
I think the dependencies of HAVE_CFI_ICALL_NORMALIZE_INTEGERS_RUSTC
prevent RUST from being selected when CFI is enabled for ARM, so I don't
think there is a problem there.
--
Cheers,
Nathan
next prev parent reply other threads:[~2026-05-11 9:09 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-11 8:02 [PATCH] ARM: Do not select HAVE_RUST when KASAN is enabled Nathan Chancellor
2026-05-11 8:21 ` Alice Ryhl
2026-05-11 9:09 ` Nathan Chancellor [this message]
2026-05-11 9:58 ` Miguel Ojeda
2026-05-11 13:22 ` Christian Schrefl
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=20260511090943.GA1029560@ax162 \
--to=nathan@kernel.org \
--cc=a.hindborg@kernel.org \
--cc=aliceryhl@google.com \
--cc=bjorn3_gh@protonmail.com \
--cc=boqun@kernel.org \
--cc=chrisi.schrefl@gmail.com \
--cc=dakr@kernel.org \
--cc=gary@garyguo.net \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@armlinux.org.uk \
--cc=lossin@kernel.org \
--cc=ojeda@kernel.org \
--cc=rust-for-linux@vger.kernel.org \
--cc=stable@vger.kernel.org \
--cc=tmgross@umich.edu \
/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