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: <20260105151025.174d5902.gary@garyguo.net>
Date: Mon, 5 Jan 2026 15:10:25 +0000
From: Gary Guo <gary@...yguo.net>
To: Onur Özkan <work@...rozkan.dev>
Cc: llvm@...ts.linux.dev, ojeda@...nel.org, boqun.feng@...il.com,
 bjorn3_gh@...tonmail.com, lossin@...nel.org, a.hindborg@...nel.org,
 aliceryhl@...gle.com, tmgross@...ch.edu, dakr@...nel.org,
 rust-for-linux@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] remove sysroot assertion in generate_rust_analyzer.py

On Wed, 24 Dec 2025 16:53:43 +0300
Onur Özkan <work@...rozkan.dev> wrote:

> With nixpkgs's rustc, rust-src component is not bundled
> with the compiler by default and is instead provided from
> a separate store path, so this assumption does not hold.
> 
> The assertion assumes these paths are in the same location
> which causes `make LLVM=1 rust-analyzer` to fail on NixOS.
> 
> Link: https://rust-for-linux.zulipchat.com/#narrow/stream/x/topic/x/near/565284250
> Signed-off-by: Onur Özkan <work@...rozkan.dev>

I can confirm that the assertion will indeed fail when using nixpkgs's
provided rust-src (although rust-overlay is fine).

Reviewed-by: Gary Guo <gary@...yguo.net>

> ---
>  scripts/generate_rust_analyzer.py | 3 ---
>  1 file changed, 3 deletions(-)
> 
> diff --git a/scripts/generate_rust_analyzer.py b/scripts/generate_rust_analyzer.py
> index 147d0cc94068..e69fa5e0a9b9 100755
> --- a/scripts/generate_rust_analyzer.py
> +++ b/scripts/generate_rust_analyzer.py
> @@ -213,9 +213,6 @@ def main():
>          level=logging.INFO if args.verbose else logging.WARNING
>      )
>  
> -    # Making sure that the `sysroot` and `sysroot_src` belong to the same toolchain.
> -    assert args.sysroot in args.sysroot_src.parents
> -
>      rust_project = {
>          "crates": generate_crates(args.srctree, args.objtree, args.sysroot_src, args.exttree, args.cfgs, args.core_edition),
>          "sysroot": str(args.sysroot),


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ