* [PATCH 6.12.y] rust: kbuild: support `-Cjump-tables=n` for Rust 1.93.0
@ 2026-01-29 13:37 Alyssa Ross
2026-01-29 14:55 ` Miguel Ojeda
0 siblings, 1 reply; 8+ messages in thread
From: Alyssa Ross @ 2026-01-29 13:37 UTC (permalink / raw)
To: stable; +Cc: Miguel Ojeda, Alice Ryhl, Trevor Gross, Nicolas Schier
From: Miguel Ojeda <ojeda@kernel.org>
Rust 1.93.0 (expected 2026-01-22) is stabilizing `-Zno-jump-tables`
[1][2] as `-Cjump-tables=n` [3].
Without this change, one would eventually see:
RUSTC L rust/core.o
error: unknown unstable option: `no-jump-tables`
Thus support the upcoming version.
Link: https://github.com/rust-lang/rust/issues/116592 [1]
Link: https://github.com/rust-lang/rust/pull/105812 [2]
Link: https://github.com/rust-lang/rust/pull/145974 [3]
Reviewed-by: Alice Ryhl <aliceryhl@google.com>
Reviewed-by: Trevor Gross <tmgross@umich.edu>
Acked-by: Nicolas Schier <nsc@kernel.org>
Link: https://patch.msgid.link/20251101094011.1024534-1-ojeda@kernel.org
Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
(cherry picked from commit 789521b4717fd6bd85164ba5c131f621a79c9736)
Signed-off-by: Alyssa Ross <hi@alyssa.is>
---
arch/x86/Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/x86/Makefile b/arch/x86/Makefile
index 5b773b34768d1..7c921514c6d0f 100644
--- a/arch/x86/Makefile
+++ b/arch/x86/Makefile
@@ -109,7 +109,7 @@ ifeq ($(CONFIG_X86_KERNEL_IBT),y)
# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104816
#
KBUILD_CFLAGS += $(call cc-option,-fcf-protection=branch -fno-jump-tables)
-KBUILD_RUSTFLAGS += -Zcf-protection=branch -Zno-jump-tables
+KBUILD_RUSTFLAGS += -Zcf-protection=branch $(if $(call rustc-min-version,109300),-Cjump-tables=n,-Zno-jump-tables)
else
KBUILD_CFLAGS += $(call cc-option,-fcf-protection=none)
endif
base-commit: abf529abd660d8ccad46dd8c8f20e93db6134f5f
--
2.52.0
^ permalink raw reply related [flat|nested] 8+ messages in thread* Re: [PATCH 6.12.y] rust: kbuild: support `-Cjump-tables=n` for Rust 1.93.0 2026-01-29 13:37 [PATCH 6.12.y] rust: kbuild: support `-Cjump-tables=n` for Rust 1.93.0 Alyssa Ross @ 2026-01-29 14:55 ` Miguel Ojeda 2026-01-29 15:03 ` Miguel Ojeda 0 siblings, 1 reply; 8+ messages in thread From: Miguel Ojeda @ 2026-01-29 14:55 UTC (permalink / raw) To: Alyssa Ross, Greg KH, Sasha Levin Cc: stable, Miguel Ojeda, Alice Ryhl, Trevor Gross, Nicolas Schier On Thu, Jan 29, 2026 at 2:37 PM Alyssa Ross <hi@alyssa.is> wrote: > > From: Miguel Ojeda <ojeda@kernel.org> > > Rust 1.93.0 (expected 2026-01-22) is stabilizing `-Zno-jump-tables` > [1][2] as `-Cjump-tables=n` [3]. > > Without this change, one would eventually see: > > RUSTC L rust/core.o > error: unknown unstable option: `no-jump-tables` > > Thus support the upcoming version. > > Link: https://github.com/rust-lang/rust/issues/116592 [1] > Link: https://github.com/rust-lang/rust/pull/105812 [2] > Link: https://github.com/rust-lang/rust/pull/145974 [3] > Reviewed-by: Alice Ryhl <aliceryhl@google.com> > Reviewed-by: Trevor Gross <tmgross@umich.edu> > Acked-by: Nicolas Schier <nsc@kernel.org> > Link: https://patch.msgid.link/20251101094011.1024534-1-ojeda@kernel.org > Signed-off-by: Miguel Ojeda <ojeda@kernel.org> > (cherry picked from commit 789521b4717fd6bd85164ba5c131f621a79c9736) > Signed-off-by: Alyssa Ross <hi@alyssa.is> Thanks! Greg, Sasha: yes, please take this one -- this commit should have had: Cc: stable@vger.kernel.org # Needed in 6.12.y and later (Rust is pinned in older LTSs). which was in the email thread, but I didn't pick it up and neither `b4` did, my mistake. Cheers, Miguel ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 6.12.y] rust: kbuild: support `-Cjump-tables=n` for Rust 1.93.0 2026-01-29 14:55 ` Miguel Ojeda @ 2026-01-29 15:03 ` Miguel Ojeda 2026-02-03 14:42 ` Greg KH 0 siblings, 1 reply; 8+ messages in thread From: Miguel Ojeda @ 2026-01-29 15:03 UTC (permalink / raw) To: Alyssa Ross, Greg KH, Sasha Levin, Huacai Chen, WANG Xuerui, WANG Rui, Tiezhu Yang Cc: stable, Miguel Ojeda, Alice Ryhl, Trevor Gross, Nicolas Schier On Thu, Jan 29, 2026 at 3:55 PM Miguel Ojeda <miguel.ojeda.sandonis@gmail.com> wrote: > > On Thu, Jan 29, 2026 at 2:37 PM Alyssa Ross <hi@alyssa.is> wrote: > > > > From: Miguel Ojeda <ojeda@kernel.org> > > > > Rust 1.93.0 (expected 2026-01-22) is stabilizing `-Zno-jump-tables` > > [1][2] as `-Cjump-tables=n` [3]. > > > > Without this change, one would eventually see: > > > > RUSTC L rust/core.o > > error: unknown unstable option: `no-jump-tables` > > > > Thus support the upcoming version. > > > > Link: https://github.com/rust-lang/rust/issues/116592 [1] > > Link: https://github.com/rust-lang/rust/pull/105812 [2] > > Link: https://github.com/rust-lang/rust/pull/145974 [3] > > Reviewed-by: Alice Ryhl <aliceryhl@google.com> > > Reviewed-by: Trevor Gross <tmgross@umich.edu> > > Acked-by: Nicolas Schier <nsc@kernel.org> > > Link: https://patch.msgid.link/20251101094011.1024534-1-ojeda@kernel.org > > Signed-off-by: Miguel Ojeda <ojeda@kernel.org> > > (cherry picked from commit 789521b4717fd6bd85164ba5c131f621a79c9736) > > Signed-off-by: Alyssa Ross <hi@alyssa.is> > > Thanks! > > Greg, Sasha: yes, please take this one -- this commit should have had: > > Cc: stable@vger.kernel.org # Needed in 6.12.y and later (Rust is > pinned in older LTSs). > > which was in the email thread, but I didn't pick it up and neither > `b4` did, my mistake. By the way, if LoongArch (Cc'd) would like to backport commit 74f8295c6fb8 ("LoongArch: Handle jump tables options for RUST") then this would be a good chance to do so, since the one here would go on top of that one (Alyssa backported the x86 subset of the patch -- for the future, by the way, it would be nice to note it in the commit message in between [ ... ]). Thanks! Cheers, Miguel ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 6.12.y] rust: kbuild: support `-Cjump-tables=n` for Rust 1.93.0 2026-01-29 15:03 ` Miguel Ojeda @ 2026-02-03 14:42 ` Greg KH 2026-02-03 17:18 ` Alyssa Ross 2026-02-06 10:45 ` Miguel Ojeda 0 siblings, 2 replies; 8+ messages in thread From: Greg KH @ 2026-02-03 14:42 UTC (permalink / raw) To: Miguel Ojeda Cc: Alyssa Ross, Sasha Levin, Huacai Chen, WANG Xuerui, WANG Rui, Tiezhu Yang, stable, Miguel Ojeda, Alice Ryhl, Trevor Gross, Nicolas Schier On Thu, Jan 29, 2026 at 04:03:06PM +0100, Miguel Ojeda wrote: > On Thu, Jan 29, 2026 at 3:55 PM Miguel Ojeda > <miguel.ojeda.sandonis@gmail.com> wrote: > > > > On Thu, Jan 29, 2026 at 2:37 PM Alyssa Ross <hi@alyssa.is> wrote: > > > > > > From: Miguel Ojeda <ojeda@kernel.org> > > > > > > Rust 1.93.0 (expected 2026-01-22) is stabilizing `-Zno-jump-tables` > > > [1][2] as `-Cjump-tables=n` [3]. > > > > > > Without this change, one would eventually see: > > > > > > RUSTC L rust/core.o > > > error: unknown unstable option: `no-jump-tables` > > > > > > Thus support the upcoming version. > > > > > > Link: https://github.com/rust-lang/rust/issues/116592 [1] > > > Link: https://github.com/rust-lang/rust/pull/105812 [2] > > > Link: https://github.com/rust-lang/rust/pull/145974 [3] > > > Reviewed-by: Alice Ryhl <aliceryhl@google.com> > > > Reviewed-by: Trevor Gross <tmgross@umich.edu> > > > Acked-by: Nicolas Schier <nsc@kernel.org> > > > Link: https://patch.msgid.link/20251101094011.1024534-1-ojeda@kernel.org > > > Signed-off-by: Miguel Ojeda <ojeda@kernel.org> > > > (cherry picked from commit 789521b4717fd6bd85164ba5c131f621a79c9736) > > > Signed-off-by: Alyssa Ross <hi@alyssa.is> > > > > Thanks! > > > > Greg, Sasha: yes, please take this one -- this commit should have had: > > > > Cc: stable@vger.kernel.org # Needed in 6.12.y and later (Rust is > > pinned in older LTSs). > > > > which was in the email thread, but I didn't pick it up and neither > > `b4` did, my mistake. > > By the way, if LoongArch (Cc'd) would like to backport commit > > 74f8295c6fb8 ("LoongArch: Handle jump tables options for RUST") > > then this would be a good chance to do so, since the one here would go > on top of that one (Alyssa backported the x86 subset of the patch -- > for the future, by the way, it would be nice to note it in the commit > message in between [ ... ]). It doesn't apply to the 6.12.y tree cleanly :( thanks, greg k-h ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 6.12.y] rust: kbuild: support `-Cjump-tables=n` for Rust 1.93.0 2026-02-03 14:42 ` Greg KH @ 2026-02-03 17:18 ` Alyssa Ross 2026-02-06 10:47 ` Miguel Ojeda 2026-02-06 10:45 ` Miguel Ojeda 1 sibling, 1 reply; 8+ messages in thread From: Alyssa Ross @ 2026-02-03 17:18 UTC (permalink / raw) To: Greg KH, Miguel Ojeda Cc: Sasha Levin, Huacai Chen, WANG Xuerui, WANG Rui, Tiezhu Yang, stable, Miguel Ojeda, Alice Ryhl, Trevor Gross, Nicolas Schier [-- Attachment #1: Type: text/plain, Size: 2161 bytes --] Greg KH <gregkh@linuxfoundation.org> writes: > On Thu, Jan 29, 2026 at 04:03:06PM +0100, Miguel Ojeda wrote: >> On Thu, Jan 29, 2026 at 3:55 PM Miguel Ojeda >> <miguel.ojeda.sandonis@gmail.com> wrote: >> > >> > On Thu, Jan 29, 2026 at 2:37 PM Alyssa Ross <hi@alyssa.is> wrote: >> > > >> > > From: Miguel Ojeda <ojeda@kernel.org> >> > > >> > > Rust 1.93.0 (expected 2026-01-22) is stabilizing `-Zno-jump-tables` >> > > [1][2] as `-Cjump-tables=n` [3]. >> > > >> > > Without this change, one would eventually see: >> > > >> > > RUSTC L rust/core.o >> > > error: unknown unstable option: `no-jump-tables` >> > > >> > > Thus support the upcoming version. >> > > >> > > Link: https://github.com/rust-lang/rust/issues/116592 [1] >> > > Link: https://github.com/rust-lang/rust/pull/105812 [2] >> > > Link: https://github.com/rust-lang/rust/pull/145974 [3] >> > > Reviewed-by: Alice Ryhl <aliceryhl@google.com> >> > > Reviewed-by: Trevor Gross <tmgross@umich.edu> >> > > Acked-by: Nicolas Schier <nsc@kernel.org> >> > > Link: https://patch.msgid.link/20251101094011.1024534-1-ojeda@kernel.org >> > > Signed-off-by: Miguel Ojeda <ojeda@kernel.org> >> > > (cherry picked from commit 789521b4717fd6bd85164ba5c131f621a79c9736) >> > > Signed-off-by: Alyssa Ross <hi@alyssa.is> >> > >> > Thanks! >> > >> > Greg, Sasha: yes, please take this one -- this commit should have had: >> > >> > Cc: stable@vger.kernel.org # Needed in 6.12.y and later (Rust is >> > pinned in older LTSs). >> > >> > which was in the email thread, but I didn't pick it up and neither >> > `b4` did, my mistake. >> >> By the way, if LoongArch (Cc'd) would like to backport commit >> >> 74f8295c6fb8 ("LoongArch: Handle jump tables options for RUST") >> >> then this would be a good chance to do so, since the one here would go >> on top of that one (Alyssa backported the x86 subset of the patch -- >> for the future, by the way, it would be nice to note it in the commit >> message in between [ ... ]). > > It doesn't apply to the 6.12.y tree cleanly :( Doesn't need to be AFAICT, because -Zno-jump-tables isn't used on 6.12. [-- Attachment #2: signature.asc --] [-- Type: application/pgp-signature, Size: 227 bytes --] ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 6.12.y] rust: kbuild: support `-Cjump-tables=n` for Rust 1.93.0 2026-02-03 17:18 ` Alyssa Ross @ 2026-02-06 10:47 ` Miguel Ojeda 2026-02-06 13:04 ` Alyssa Ross 0 siblings, 1 reply; 8+ messages in thread From: Miguel Ojeda @ 2026-02-06 10:47 UTC (permalink / raw) To: Alyssa Ross Cc: Greg KH, Sasha Levin, Huacai Chen, WANG Xuerui, WANG Rui, Tiezhu Yang, stable, Miguel Ojeda, Alice Ryhl, Trevor Gross, Nicolas Schier On Tue, Feb 3, 2026 at 6:18 PM Alyssa Ross <hi@alyssa.is> wrote: > > Doesn't need to be AFAICT, because -Zno-jump-tables isn't used on 6.12. I am not sure what you mean -- the commit I referenced is the one that introduces `-Zno-jump-tables`. Cheers, Miguel ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 6.12.y] rust: kbuild: support `-Cjump-tables=n` for Rust 1.93.0 2026-02-06 10:47 ` Miguel Ojeda @ 2026-02-06 13:04 ` Alyssa Ross 0 siblings, 0 replies; 8+ messages in thread From: Alyssa Ross @ 2026-02-06 13:04 UTC (permalink / raw) To: Miguel Ojeda Cc: Greg KH, Sasha Levin, Huacai Chen, WANG Xuerui, WANG Rui, Tiezhu Yang, stable, Miguel Ojeda, Alice Ryhl, Trevor Gross, Nicolas Schier [-- Attachment #1: Type: text/plain, Size: 345 bytes --] Miguel Ojeda <miguel.ojeda.sandonis@gmail.com> writes: > On Tue, Feb 3, 2026 at 6:18 PM Alyssa Ross <hi@alyssa.is> wrote: >> >> Doesn't need to be AFAICT, because -Zno-jump-tables isn't used on 6.12. > > I am not sure what you mean -- the commit I referenced is the one that > introduces `-Zno-jump-tables`. Sorry, I got mixed up. [-- Attachment #2: signature.asc --] [-- Type: application/pgp-signature, Size: 227 bytes --] ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 6.12.y] rust: kbuild: support `-Cjump-tables=n` for Rust 1.93.0 2026-02-03 14:42 ` Greg KH 2026-02-03 17:18 ` Alyssa Ross @ 2026-02-06 10:45 ` Miguel Ojeda 1 sibling, 0 replies; 8+ messages in thread From: Miguel Ojeda @ 2026-02-06 10:45 UTC (permalink / raw) To: Greg KH Cc: Alyssa Ross, Sasha Levin, Huacai Chen, WANG Xuerui, WANG Rui, Tiezhu Yang, stable, Miguel Ojeda, Alice Ryhl, Trevor Gross, Nicolas Schier On Tue, Feb 3, 2026 at 3:42 PM Greg KH <gregkh@linuxfoundation.org> wrote: > > It doesn't apply to the 6.12.y tree cleanly :( Yeah, that is why it wasn't applied in the past -- I was just bringing it up again to keep the "chain of dependencies" we would need going in case LoongArch decides to apply it. This is the past thread: https://lore.kernel.org/stable/CANiq72kEzOa60EhLQ2YnBOD6bsAHc7qA9v9-MP2FtxMa04Q5PQ@mail.gmail.com/ Cheers, Miguel ^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2026-02-06 13:04 UTC | newest] Thread overview: 8+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2026-01-29 13:37 [PATCH 6.12.y] rust: kbuild: support `-Cjump-tables=n` for Rust 1.93.0 Alyssa Ross 2026-01-29 14:55 ` Miguel Ojeda 2026-01-29 15:03 ` Miguel Ojeda 2026-02-03 14:42 ` Greg KH 2026-02-03 17:18 ` Alyssa Ross 2026-02-06 10:47 ` Miguel Ojeda 2026-02-06 13:04 ` Alyssa Ross 2026-02-06 10:45 ` Miguel Ojeda
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox