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

On Tue, Sep 03, 2024 at 09:06:05PM +0800, Zigit Zo wrote:
> In the x86_64 UML, kernel modules compiled with Rust will currently
> generate some R_X86_64_GOTPCREL relocations, which will then be rejected
> by the kernel.
> 
> And because of the kernel modules of UML are only got handled by the UML
> itself, relocation model 'static' can work as expected other than 'pie'.
> ---
> diff --git a/arch/um/Makefile b/arch/um/Makefile
> index 00b63bac5eff..b04b1d4d6dfe 100644
> --- a/arch/um/Makefile
> +++ b/arch/um/Makefile
> @@ -63,7 +63,7 @@ KBUILD_CFLAGS += $(CFLAGS) $(CFLAGS-y) -D__arch_um__ \
>  	-Din6addr_loopback=kernel_in6addr_loopback \
>  	-Din6addr_any=kernel_in6addr_any -Dstrrchr=kernel_strrchr
>  
> -KBUILD_RUSTFLAGS += -Crelocation-model=pie
> +KBUILD_RUSTFLAGS_KERNEL += -Crelocation-model=pie
>  
>  KBUILD_AFLAGS += $(ARCH_INCLUDE)
>  
> -- 

I failed to match the actual change with the commit message.  Consider
that ignorance on my side.

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.



Groeten
Geert Stappers
-- 
Silence is hard to parse

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ