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>] [day] [month] [year] [list]
Message-ID: <54FC087D02C52990+20240903130606.292935-3-zig@iorw.io>
Date: Tue,  3 Sep 2024 21:06:06 +0800
From: Zigit Zo <zig@...w.io>
To: 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
Cc: zig@...w.io,
	rust-for-linux@...r.kernel.org,
	linux-um@...ts.infradead.org,
	llvm@...ts.linux.dev,
	x86@...nel.org,
	linux-kernel@...r.kernel.org
Subject: [PATCH 2/2] rust: arch/um: use 'large' code model for uml

The Rust modules compiled against UML should be 'large', without this
the compiler will generate some R_X86_64_32S relocations, but UML is
running at userspace with signed-address larger than zero, therefore
makes '__write_relocate_add' treating the relocation as overflowed.
---
 arch/um/Makefile | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/um/Makefile b/arch/um/Makefile
index b04b1d4d6dfe..c2a9f2102ba7 100644
--- a/arch/um/Makefile
+++ b/arch/um/Makefile
@@ -32,6 +32,7 @@ endif
 
 ifdef CONFIG_64BIT
 	KBUILD_CFLAGS += -mcmodel=large
+	KBUILD_RUSTFLAGS += -Ccode-model=large
 endif
 
 HOST_DIR := arch/$(HEADER_ARCH)
-- 
2.46.0


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ