* Re: [PATCH] rust: Makefile: apply fixed-x18 workaround only on arm64
2026-02-02 23:39 ` [PATCH] rust: Makefile: apply fixed-x18 workaround only on arm64 HeeSu Kim
@ 2026-02-02 14:41 ` Miguel Ojeda
0 siblings, 0 replies; 8+ messages in thread
From: Miguel Ojeda @ 2026-02-02 14:41 UTC (permalink / raw)
To: HeeSu Kim; +Cc: ojeda, charmitro, rust-for-linux, linux-kernel
On Mon, Feb 2, 2026 at 3:39 PM HeeSu Kim <mlksvender@gmail.com> wrote:
>
> On Tue, Feb 03, 2026, Miguel Ojeda wrote:
> > Could you please elaborate on the issues you are seeing, e.g. how to
> > reproduce them?
> >
> > The flag is only used to silence errors from checks that were added to
> > `rustc` and it is ignored otherwise (that is why the workaround was
> > written like that).
>
> After reviewing my build logs, I found that the error I encountered was
> "unknown codegen option: -Cunsafe-allow-abi-mismatch" because I was
> using rustc 1.85 at the time. The flag was added in rustc 1.88.
>
> So this was not an architecture-specific issue. I apologize for the
> confusion and would like to withdraw this patch.
Thanks for reporting and double-checking, and no worries, it happens! :)
Cheers,
Miguel
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] rust: Makefile: apply fixed-x18 workaround only on arm64
[not found] <CANiq72kFFFB6k8D9TeSe2hFG3e6AhCqWTMVJXkKyLc8F=TFhbg@mail.gmail.com>
@ 2026-02-02 23:39 ` HeeSu Kim
2026-02-02 14:41 ` Miguel Ojeda
0 siblings, 1 reply; 8+ messages in thread
From: HeeSu Kim @ 2026-02-02 23:39 UTC (permalink / raw)
To: ojeda; +Cc: charmitro, rust-for-linux, linux-kernel
On Tue, Feb 03, 2026, Miguel Ojeda wrote:
> Could you please elaborate on the issues you are seeing, e.g. how to
> reproduce them?
>
> The flag is only used to silence errors from checks that were added to
> `rustc` and it is ignored otherwise (that is why the workaround was
> written like that).
After reviewing my build logs, I found that the error I encountered was
"unknown codegen option: -Cunsafe-allow-abi-mismatch" because I was
using rustc 1.85 at the time. The flag was added in rustc 1.88.
So this was not an architecture-specific issue. I apologize for the
confusion and would like to withdraw this patch.
Best regards,
HeeSu Kim
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] rust: Makefile: apply fixed-x18 workaround only on arm64
2026-02-02 14:24 ` Gary Guo
@ 2026-02-02 23:45 ` HeeSu Kim
0 siblings, 0 replies; 8+ messages in thread
From: HeeSu Kim @ 2026-02-02 23:45 UTC (permalink / raw)
To: gary
Cc: a.hindborg, aliceryhl, bjorn3_gh, boqun, dakr, linux-kernel,
lossin, ojeda, rust-for-linux, tmgross
On Tue, Feb 03, 2026, Gary Guo wrote:
> It looks like this bug has been fixed upstream already. While you're at
> it, would you mind also add code so that we stop applying the workaround
> for versions with bug fixed already?
Sure, I'll check which Rust version includes the fix and send a patch
with the requested changes.
Best regards,
HeeSu Kim
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] rust: Makefile: apply fixed-x18 workaround only on arm64
2026-02-02 13:59 ` Charalampos Mitrodimas
@ 2026-02-02 23:17 ` HeeSu Kim
0 siblings, 0 replies; 8+ messages in thread
From: HeeSu Kim @ 2026-02-02 23:17 UTC (permalink / raw)
To: charmitro
Cc: a.hindborg, aliceryhl, bjorn3_gh, boqun, dakr, gary,
linux-kernel, lossin, ojeda, rust-for-linux, tmgross
On Tue, Feb 03, 2026, C. Mitrodimas wrote:
> > The `-Cunsafe-allow-abi-mismatch=fixed-x18` option is a workaround for
> > a rustdoc issue (rust-lang/rust#144521) where target modifiers were not
> > properly saved. This affects both rustdoc and doctests builds.
> >
> > However, `fixed-x18` is an ARM64-specific ABI modifier related to the
> > x18 register reservation (used for Shadow Call Stack). Currently, this
> > workaround is applied unconditionally on all architectures, which is
> > incorrect and may cause issues on non-ARM64 builds.
> >
> > Restrict the workaround to only apply when building for arm64
> > (SRCARCH=arm64).
> >
> > Fixes: 68e8e79e1bdc ("rust: fix `rustdoc` target modifiers")
>
> Are we sure this is in the correct commit hash? It is not present on
> mainline.
>
> Maybe it should be this one?
>
> Fixes: abbf9a449441 ("rust: workaround `rustdoc` target modifiers bug")
>
> Cheers,
> C. Mitrodimas
You're right. I mistakenly used a commit hash from my local branch.
I'll send a v2 with the correct Fixes tag.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH] rust: Makefile: apply fixed-x18 workaround only on arm64
@ 2026-02-02 22:21 HeeSu Kim
2026-02-02 13:59 ` Charalampos Mitrodimas
` (2 more replies)
0 siblings, 3 replies; 8+ messages in thread
From: HeeSu Kim @ 2026-02-02 22:21 UTC (permalink / raw)
To: ojeda
Cc: boqun, gary, bjorn3_gh, lossin, a.hindborg, aliceryhl, tmgross,
dakr, rust-for-linux, linux-kernel, HeeSu Kim
The `-Cunsafe-allow-abi-mismatch=fixed-x18` option is a workaround for
a rustdoc issue (rust-lang/rust#144521) where target modifiers were not
properly saved. This affects both rustdoc and doctests builds.
However, `fixed-x18` is an ARM64-specific ABI modifier related to the
x18 register reservation (used for Shadow Call Stack). Currently, this
workaround is applied unconditionally on all architectures, which is
incorrect and may cause issues on non-ARM64 builds.
Restrict the workaround to only apply when building for arm64
(SRCARCH=arm64).
Fixes: 68e8e79e1bdc ("rust: fix `rustdoc` target modifiers")
Signed-off-by: HeeSu Kim <mlksvender@gmail.com>
---
rust/Makefile | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/rust/Makefile b/rust/Makefile
index 5c0155b83..2bd547611 100644
--- a/rust/Makefile
+++ b/rust/Makefile
@@ -136,7 +136,8 @@ pin_init-flags := \
# `rustdoc` did not save the target modifiers, thus workaround for
# the time being (https://github.com/rust-lang/rust/issues/144521).
-rustdoc_modifiers_workaround := $(if $(call rustc-min-version,108800),-Cunsafe-allow-abi-mismatch=fixed-x18)
+# The `fixed-x18` modifier is ARM64-specific, so only apply it there.
+rustdoc_modifiers_workaround := $(if $(filter arm64,$(SRCARCH)),$(if $(call rustc-min-version,108800),-Cunsafe-allow-abi-mismatch=fixed-x18))
# Similarly, for doctests (https://github.com/rust-lang/rust/issues/146465).
doctests_modifiers_workaround := $(rustdoc_modifiers_workaround)$(if $(call rustc-min-version,109100),$(comma)sanitizer)
--
2.52.0
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] rust: Makefile: apply fixed-x18 workaround only on arm64
2026-02-02 22:21 HeeSu Kim
2026-02-02 13:59 ` Charalampos Mitrodimas
2026-02-02 14:20 ` Miguel Ojeda
@ 2026-02-02 14:24 ` Gary Guo
2026-02-02 23:45 ` HeeSu Kim
2 siblings, 1 reply; 8+ messages in thread
From: Gary Guo @ 2026-02-02 14:24 UTC (permalink / raw)
To: HeeSu Kim, ojeda
Cc: boqun, gary, bjorn3_gh, lossin, a.hindborg, aliceryhl, tmgross,
dakr, rust-for-linux, linux-kernel
On Mon Feb 2, 2026 at 10:21 PM GMT, HeeSu Kim wrote:
> The `-Cunsafe-allow-abi-mismatch=fixed-x18` option is a workaround for
> a rustdoc issue (rust-lang/rust#144521) where target modifiers were not
> properly saved. This affects both rustdoc and doctests builds.
>
> However, `fixed-x18` is an ARM64-specific ABI modifier related to the
> x18 register reservation (used for Shadow Call Stack). Currently, this
> workaround is applied unconditionally on all architectures, which is
> incorrect and may cause issues on non-ARM64 builds.
>
> Restrict the workaround to only apply when building for arm64
> (SRCARCH=arm64).
>
> Fixes: 68e8e79e1bdc ("rust: fix `rustdoc` target modifiers")
> Signed-off-by: HeeSu Kim <mlksvender@gmail.com>
> ---
> rust/Makefile | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/rust/Makefile b/rust/Makefile
> index 5c0155b83..2bd547611 100644
> --- a/rust/Makefile
> +++ b/rust/Makefile
> @@ -136,7 +136,8 @@ pin_init-flags := \
>
> # `rustdoc` did not save the target modifiers, thus workaround for
> # the time being (https://github.com/rust-lang/rust/issues/144521).
> -rustdoc_modifiers_workaround := $(if $(call rustc-min-version,108800),-Cunsafe-allow-abi-mismatch=fixed-x18)
> +# The `fixed-x18` modifier is ARM64-specific, so only apply it there.
> +rustdoc_modifiers_workaround := $(if $(filter arm64,$(SRCARCH)),$(if $(call rustc-min-version,108800),-Cunsafe-allow-abi-mismatch=fixed-x18))
It looks like this bug has been fixed upstream already. While you're at it,
would you mind also add code so that we stop applying the workaround for
versions with bug fixed already?
Thanks,
Gary
>
> # Similarly, for doctests (https://github.com/rust-lang/rust/issues/146465).
> doctests_modifiers_workaround := $(rustdoc_modifiers_workaround)$(if $(call rustc-min-version,109100),$(comma)sanitizer)
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] rust: Makefile: apply fixed-x18 workaround only on arm64
2026-02-02 22:21 HeeSu Kim
2026-02-02 13:59 ` Charalampos Mitrodimas
@ 2026-02-02 14:20 ` Miguel Ojeda
2026-02-02 14:24 ` Gary Guo
2 siblings, 0 replies; 8+ messages in thread
From: Miguel Ojeda @ 2026-02-02 14:20 UTC (permalink / raw)
To: HeeSu Kim
Cc: ojeda, boqun, gary, bjorn3_gh, lossin, a.hindborg, aliceryhl,
tmgross, dakr, rust-for-linux, linux-kernel
On Mon, Feb 2, 2026 at 2:21 PM HeeSu Kim <mlksvender@gmail.com> wrote:
>
> However, `fixed-x18` is an ARM64-specific ABI modifier related to the
> x18 register reservation (used for Shadow Call Stack). Currently, this
> workaround is applied unconditionally on all architectures, which is
> incorrect and may cause issues on non-ARM64 builds.
Could you please elaborate on the issues you are seeing, e.g. how to
reproduce them?
The flag is only used to silence errors from checks that were added to
`rustc` and it is ignored otherwise (that is why the workaround was
written like that).
Thank you!
Cheers,
Miguel
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] rust: Makefile: apply fixed-x18 workaround only on arm64
2026-02-02 22:21 HeeSu Kim
@ 2026-02-02 13:59 ` Charalampos Mitrodimas
2026-02-02 23:17 ` HeeSu Kim
2026-02-02 14:20 ` Miguel Ojeda
2026-02-02 14:24 ` Gary Guo
2 siblings, 1 reply; 8+ messages in thread
From: Charalampos Mitrodimas @ 2026-02-02 13:59 UTC (permalink / raw)
To: HeeSu Kim
Cc: ojeda, boqun, gary, bjorn3_gh, lossin, a.hindborg, aliceryhl,
tmgross, dakr, rust-for-linux, linux-kernel
HeeSu Kim <mlksvender@gmail.com> writes:
> The `-Cunsafe-allow-abi-mismatch=fixed-x18` option is a workaround for
> a rustdoc issue (rust-lang/rust#144521) where target modifiers were not
> properly saved. This affects both rustdoc and doctests builds.
>
> However, `fixed-x18` is an ARM64-specific ABI modifier related to the
> x18 register reservation (used for Shadow Call Stack). Currently, this
> workaround is applied unconditionally on all architectures, which is
> incorrect and may cause issues on non-ARM64 builds.
>
> Restrict the workaround to only apply when building for arm64
> (SRCARCH=arm64).
>
> Fixes: 68e8e79e1bdc ("rust: fix `rustdoc` target modifiers")
Are we sure this is in the correct commit hash? It is not present on
mainline.
Maybe it should be this one?
Fixes: abbf9a449441 ("rust: workaround `rustdoc` target modifiers bug")
Cheers,
C. Mitrodimas
> Signed-off-by: HeeSu Kim <mlksvender@gmail.com>
> ---
> rust/Makefile | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/rust/Makefile b/rust/Makefile
> index 5c0155b83..2bd547611 100644
> --- a/rust/Makefile
> +++ b/rust/Makefile
> @@ -136,7 +136,8 @@ pin_init-flags := \
>
> # `rustdoc` did not save the target modifiers, thus workaround for
> # the time being (https://github.com/rust-lang/rust/issues/144521).
> -rustdoc_modifiers_workaround := $(if $(call rustc-min-version,108800),-Cunsafe-allow-abi-mismatch=fixed-x18)
> +# The `fixed-x18` modifier is ARM64-specific, so only apply it there.
> +rustdoc_modifiers_workaround := $(if $(filter arm64,$(SRCARCH)),$(if
> $(call
> rustc-min-version,108800),-Cunsafe-allow-abi-mismatch=fixed-x18))
>
> # Similarly, for doctests (https://github.com/rust-lang/rust/issues/146465).
> doctests_modifiers_workaround := $(rustdoc_modifiers_workaround)$(if
> $(call rustc-min-version,109100),$(comma)sanitizer)
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2026-02-02 14:45 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <CANiq72kFFFB6k8D9TeSe2hFG3e6AhCqWTMVJXkKyLc8F=TFhbg@mail.gmail.com>
2026-02-02 23:39 ` [PATCH] rust: Makefile: apply fixed-x18 workaround only on arm64 HeeSu Kim
2026-02-02 14:41 ` Miguel Ojeda
2026-02-02 22:21 HeeSu Kim
2026-02-02 13:59 ` Charalampos Mitrodimas
2026-02-02 23:17 ` HeeSu Kim
2026-02-02 14:20 ` Miguel Ojeda
2026-02-02 14:24 ` Gary Guo
2026-02-02 23:45 ` HeeSu Kim
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®