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] [thread-next>] [day] [month] [year] [list]
Message-Id: <DFV0C3T2RXW8.1F3G0Q7R999TC@nvidia.com>
Date: Thu, 22 Jan 2026 18:23:53 +0900
From: "Eliot Courtney" <ecourtney@...dia.com>
To: "Jesung Yang" <y.j3ms.n@...il.com>, "Tamir Duberstein"
 <tamird@...nel.org>, "Eliot Courtney" <ecourtney@...dia.com>
Cc: "Miguel Ojeda" <ojeda@...nel.org>, "Boqun Feng" <boqun.feng@...il.com>,
 "Gary Guo" <gary@...yguo.net>, Björn Roy Baron
 <bjorn3_gh@...tonmail.com>, "Benno Lossin" <lossin@...nel.org>, "Andreas
 Hindborg" <a.hindborg@...nel.org>, "Alice Ryhl" <aliceryhl@...gle.com>,
 "Trevor Gross" <tmgross@...ch.edu>, "Danilo Krummrich" <dakr@...nel.org>,
 "Nathan Chancellor" <nathan@...nel.org>, "Nicolas Schier" <nsc@...nel.org>,
 <rust-for-linux@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
 <linux-kbuild@...r.kernel.org>
Subject: Re: [PATCH 6/6] scripts: generate_rust_analyzer: move sysroot
 crates to sysroot_project

On Wed Jan 21, 2026 at 9:01 AM JST, Jesung Yang wrote:
> I still think the versioning infrastructure is a prerequisite as we're
> using the `sysroot_src` field here.
>
> If we specify `sysroot_src` without `crate_attrs = ["no_std"]`,
> rust-analyzer treats `std` as a dependency for all local crates by
> default. Consequently, any rust-analyzer version lacking `crate_attrs`
> support (which silently ignores `crate_attrs = ["no_std"]`) would
> incorrectly assume an implicit `std` dependency for all kernel modules.
> Having the versioning infrastructure first allows us to handle this
> transition without breaking the user experience for those on older
> toolchains.
Yeah, I agree that specifying sysroot_src by itself includes std and that
is potentially an issue.

But, currently due to issues like the relative #[path] include, the
sysroot crates aren't really processable very well by rust-analyzer
causing a lot of spurious errors and unresolved symbols, which make
using the LSP experience pretty bad IMO. OTOH, while the sysroot_src
approach does include std, it at least makes it usable. Personally I
find it more useful this way, but I can see the argument for both sides.

Tangential, but I'm not sure why the drivers don't specify no_std
themselves - then we wouldn't have to worry about this IIUC.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ