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: <CANiq72=ZDtu0LL5uoKix8eyhvu2pcWLR-1_7it+hB8tsN=y0DA@mail.gmail.com>
Date: Mon, 17 Feb 2025 14:26:34 +0100
From: Miguel Ojeda <miguel.ojeda.sandonis@...il.com>
To: Masahiro Yamada <masahiroy@...nel.org>
Cc: Thomas Weißschuh <linux@...ssschuh.net>, 
	Miguel Ojeda <ojeda@...nel.org>, Nathan Chancellor <nathan@...nel.org>, Nicolas Schier <nicolas@...sle.eu>, 
	Alex Gaynor <alex.gaynor@...il.com>, Boqun Feng <boqun.feng@...il.com>, 
	Gary Guo <gary@...yguo.net>, 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>, linux-kbuild@...r.kernel.org, 
	linux-kernel@...r.kernel.org, rust-for-linux@...r.kernel.org
Subject: Re: [PATCH] kbuild, rust: use -fremap-path-prefix to make paths relative

On Sat, Feb 15, 2025 at 1:57 PM Masahiro Yamada <masahiroy@...nel.org> wrote:
>
> I will apply this if Miguel gives Ack.

Thanks Masahiro -- I left some comments above.

This does remove some absolute paths for me, though not all (e.g.
`core.o` that comes from the sysroot). Since it is an improvement
already, if you want to apply it:

Acked-by: Miguel Ojeda <ojeda@...nel.org>

I leave below a diff that works for `core.o` for me -- it would do it
in all cases, not just `building_out_of_srctree`, since it is outside
the repository in all cases, which I think makes sense, e.g. in an
in-tree build I get:

    $ strings rust/core.o | grep validations.rs
    lib/rustlib/src/rust/library/core/src/str/validations.rs

Cheers,
Miguel

diff --git a/rust/Makefile b/rust/Makefile
index ea3849eb78f6..42f242472031 100644
--- a/rust/Makefile
+++ b/rust/Makefile
@@ -438,7 +438,7 @@ $(obj)/exports.o: private skip_gendwarfksyms = 1
 $(obj)/core.o: private skip_clippy = 1
 $(obj)/core.o: private skip_flags = -Wunreachable_pub
 $(obj)/core.o: private rustc_objcopy = $(foreach
sym,$(redirect-intrinsics),--redefine-sym $(sym)=__rust$(sym))
-$(obj)/core.o: private rustc_target_flags = $(core-cfgs)
+$(obj)/core.o: private rustc_target_flags = $(core-cfgs)
--remap-path-prefix=$(rustc_sysroot)/=
 $(obj)/core.o: $(RUST_LIB_SRC)/core/src/lib.rs \
     $(wildcard $(objtree)/include/config/RUSTC_VERSION_TEXT) FORCE
        +$(call if_changed_rule,rustc_library)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ