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-next>] [day] [month] [year] [list]
Message-ID: <62F5EEA0B866E9E0+20240903130606.292935-1-zig@iorw.io>
Date: Tue,  3 Sep 2024 21:06:04 +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 0/2] rust: arch/um: Rust modules support for UML

The series make Rust modules running under x86_64 UML, as a supplement
for the previous work:
- https://lore.kernel.org/rust-for-linux/20221217044436.4138642-1-davidgow@google.com/

The previous work by David (many thanks!) has made the Rust UML compiles,
and for the builtin modules, it works as expected. But for loadable
modules, the UML will complain

  'Unknown rela relocation: 9'

when we try to 'insmod rust_print.ko'. That's because the modules are
compiled against '-Crelocation-model=pie', makes the LLVM treat the
modules as PIE executables, but they are just static modules.

Besides, the Rust's code model for x86_64 UML is still 'kernel', leading
some relocations "overflowed", we keep it the same as 'KBUILD_CFLAGS'
set in UML ('large' here) to address it.

Now we can test our Rust modules in UML.

Regards,
-- Zigit

Zigit Zo (2):
  rust: arch/um: use 'static' relocation model for uml modules
  rust: arch/um: use 'large' code model for uml

 arch/um/Makefile | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)


base-commit: 431c1646e1f86b949fa3685efc50b660a364c2b6
-- 
2.46.0


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ