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: <20260207220543.GA1670883@ax162>
Date: Sat, 7 Feb 2026 16:05:43 -0600
From: Nathan Chancellor <nathan@...nel.org>
To: Gary Guo <gary@...yguo.net>
Cc: Miguel Ojeda <miguel.ojeda.sandonis@...il.com>,
	Nicolas Schier <nsc@...nel.org>, Miguel Ojeda <ojeda@...nel.org>,
	Boqun Feng <boqun@...nel.org>,
	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>, Janne Grunau <j@...nau.net>,
	Asahi Lina <lina+kernel@...hilina.net>,
	rust-for-linux@...r.kernel.org, linux-kernel@...r.kernel.org,
	linux-kbuild@...r.kernel.org
Subject: Re: [PATCH] rust: build: remap path to avoid absolute path

On Sat, Feb 07, 2026 at 04:43:11PM +0000, Gary Guo wrote:
> On Sat Feb 7, 2026 at 3:22 PM GMT, Miguel Ojeda wrote:
> > On Sat, Feb 7, 2026 at 3:44 PM Gary Guo <gary@...nel.org> wrote:
> >>
> >> So, fix this by remap all absolute paths to srctree to relative path
> >> instead.
> >
> > In case it matters to Kbuild, we had a relatively recent revert
> > related to this flag:
> >
> >   dbdffaf50ff9 ("kbuild, rust: use -fremap-path-prefix to make paths relative")
> >   8cf5b3f83614 ("Revert "kbuild, rust: use -fremap-path-prefix to make
> > paths relative"")
> >
> >   https://lore.kernel.org/rust-for-linux/20250511-kbuild-revert-file-prefix-map-v1-0-9ba640c8411e@weissschuh.net/
> 
> Ah, that explains why I recall we had this flag in Kbuild but can only find the
> filter-out directives now. I missed the revert email.
> 
> I am not convinced that the ability to launch debugger outside source
> directory overweights the benefit of not leaking absolute paths and making
> builds reproducible.
> 
> The reverting cover letter says "As there is no simple or uniform way to
> specify the source directory explicitly" which is clearly not the case as you
> can just invoke the debugger in a different working directory... GDB also
> provides a way to provide source directory search path:
> https://sourceware.org/gdb/current/onlinedocs/gdb.html/Source-Path.html.
> Similarly, LLDB provides `settings set target.source-map`:
> https://lldb.llvm.org/use/map.html#remap-source-file-pathnames-for-the-debug-session
> 
> I think we should revert the revert, then.

For what it's worth, the C side revert also mentions that it broke
'objdump -S' [1] and working with GCOV data [2], so it seems like it is
not just debuggers that have a hard time with that loss of information.
Maybe those do not matter for Rust code or developers though.

[1] https://lore.kernel.org/aBEttQH4kimHFScx@intel.com/
[2] https://lore.kernel.org/edc50aa7-0740-4942-8c15-96f12f2acc7e@kernel.org/

Cheers,
Nathan

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ