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: <477D5EA32B25AA05+ZthOusZtXttQOf3B@evil>
Date: Wed,  4 Sep 2024 20:28:10 +0800
From: Zigit Zo <zig@...w.io>
To: stappers@...ppers.nl
Cc: anton.ivanov@...bridgegreys.com,
	bjorn3_gh@...tonmail.com,
	gary@...yguo.net,
	johannes@...solutions.net,
	linux-kernel@...r.kernel.org,
	linux-um@...ts.infradead.org,
	llvm@...ts.linux.dev,
	mingo@...hat.com,
	nathan@...nel.org,
	ndesaulniers@...gle.com,
	ojeda@...nel.org,
	richard@....at,
	rust-for-linux@...r.kernel.org,
	tglx@...utronix.de,
	x86@...nel.org,
	zig@...w.io
Subject: Re: [PATCH 1/2] rust: arch/um: use 'static' relocation model for uml modules

On Wed, Sep 04, 2024 at 11:30:12AM +0200, Geert Stappers wrote:
> I failed to match the actual change with the commit message.  Consider
> that ignorance on my side.

FYI, I'm using the master branch of the upstream, but yes it's in the
'rust-next' or other branches as well, so maybe not a big deal IMO.

Of what 'https://rust-for-linux.com/branches' says, maybe I'll use the
'rust-next' branch for the next time, thanks for pointing out!

> I see a problem in just renaming a variable, might be my problem.  Thing
> is that removal of 'KBUILD_RUSTFLAG += ' feels wrong, hence this posting.

I think this is fine, the 'KBUILD_RUSTFLAG' controls the 'PIE' flag for
both the kernel itself and the loadable modules. And yes, that's the only
way I can make the 'PIE' flag out of the modules while keeping the UML
kernel itself works, and the 'scripts/Makefile.lib' I tought has placed
those flags correctly.

What about adding a 'static' flag to the 'arch/um/Makefile' explicitly,

---
KBUILD_RUSTFLAGS_KERNEL += -Crelocation-model=pie
KBUILD_RUSTFLAGS_MODULE += -Crelocation-model=static
---

but that's just a redundant of the already defined 'KBUILD_RUSTFLAGS'.
Have no more ideas what can this flag goes wrong :(

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ