lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CANiq72neLdtGORQ=GMsJ-mVgWscrAw4CB+_2cfbR4gtju4+azw@mail.gmail.com>
Date: Sun, 25 May 2025 23:23:54 +0200
From: Miguel Ojeda <miguel.ojeda.sandonis@...il.com>
To: Gary Guo <gary@...yguo.net>
Cc: Miguel Ojeda <ojeda@...nel.org>, Alex Gaynor <alex.gaynor@...il.com>, 
	Boqun Feng <boqun.feng@...il.com>, Björn Roy Baron <bjorn3_gh@...tonmail.com>, 
	Benno Lossin <benno.lossin@...ton.me>, Andreas Hindborg <a.hindborg@...nel.org>, 
	Alice Ryhl <aliceryhl@...gle.com>, Trevor Gross <tmgross@...ch.edu>, 
	Danilo Krummrich <dakr@...nel.org>, stable@...r.kernel.org, rust-for-linux@...r.kernel.org, 
	linux-kernel@...r.kernel.org, est31@...tonmail.com
Subject: Re: [PATCH] rust: compile libcore with edition 2024 for 1.87+

On Sat, May 17, 2025 at 10:56 AM Gary Guo <gary@...yguo.net> wrote:
>
> Rust 1.87 (released on 2025-05-15) compiles core library with edition
> 2024 instead of 2021 [1]. Ensure that the edition matches libcore's
> expectation to avoid potential breakage.
>
> Cc: stable@...r.kernel.org # Needed in 6.12.y and later (Rust is pinned in older LTSs).
> Link: https://github.com/rust-lang/rust/pull/138162 [1]
> Closes: https://github.com/Rust-for-Linux/linux/issues/1163
> Signed-off-by: Gary Guo <gary@...yguo.net>

Applied to `rust-next` -- thanks everyone!

(I actually applied a couple days ago in advance of Monday's -next,
which explains the following report)

    [ J3m3 reported in Zulip [2] that the `rust-analyzer` target was
      broken after this patch -- indeed, we need to avoid `core-cfgs`
      since those are passed to the `rust-analyzer` target.

      So, instead, I tweaked the patch to create a new `core-edition`
      variable and explicitly mention the `--edition` flag instead of
      reusing `core-cfg`s.

      In addition, pass a new argument using this new variable to
      `generate_rust_analyzer.py` so that we set the right edition there.

      By the way, for future reference: the `filter-out` change is needed
      for Rust < 1.87, since otherwise we would skip the `--edition=2021`
      we just added, ending up with no edition flag, and thus the compiler
      would default to the 2015 one.

      [2] https://rust-for-linux.zulipchat.com/#narrow/channel/291565/topic/x/near/520206547

        - Miguel ]

I also added:

    Reported-by: est31 <est31@...tonmail.com>

since est31 told Gary in RustWeek, and we discussed the patch there.

@Gary: I hope the changes are OK with you (I can put the
`generate_rust_analyzer` ones in a different commit if you prefer).
Thanks!

Cheers,
Miguel

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ