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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240605062234.GE279426@thelio-3990X>
Date: Tue, 4 Jun 2024 23:22:34 -0700
From: Nathan Chancellor <nathan@...nel.org>
To: David Gow <davidgow@...gle.com>
Cc: Brendan Higgins <brendan.higgins@...ux.dev>,
	Rae Moar <rmoar@...gle.com>, Thomas Gleixner <tglx@...utronix.de>,
	Ingo Molnar <mingo@...hat.com>, Miguel Ojeda <ojeda@...nel.org>,
	"H . Peter Anvin" <hpa@...or.com>,
	Masahiro Yamada <masahiroy@...nel.org>,
	Richard Weinberger <richard@....at>,
	Anton Ivanov <anton.ivanov@...bridgegreys.com>,
	Johannes Berg <johannes@...solutions.net>,
	kunit-dev@...glegroups.com, linux-kernel@...r.kernel.org,
	linux-um@...ts.infradead.org, rust-for-linux@...r.kernel.org,
	x86@...nel.org, Wedson Almeida Filho <wedsonaf@...il.com>,
	Borislav Petkov <bp@...en8.de>,
	Dave Hansen <dave.hansen@...ux.intel.com>,
	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@...sung.com>,
	Alice Ryhl <aliceryhl@...gle.com>, linux-doc@...r.kernel.org,
	linux-kbuild@...r.kernel.org, llvm@...ts.linux.dev
Subject: Re: [PATCH] arch: um: rust: Add i386 support for Rust

Hi David,

Just a fly by comment on style, I don't have much to say content :)

On Wed, Jun 05, 2024 at 06:40:50AM +0800, David Gow wrote:
> At present, Rust in the kernel only supports 64-bit x86, so UML has
> followed suit. However, it's significantly easier to support 32-bit i386
> on UML than on bare metal, as UML does not use the -mregparm option
> (which alters the ABI), which is not yet supported by rustc[1].
> 
> Add support for CONFIG_RUST on um/i386, by adding a new target config to
> generate_rust_target, and replacing various checks on CONFIG_X86_64 to
> also probably like  support CONFIG_X86_32.
> 
> We still use generate_rust_target, rather than a built-in rustc target,
> in oPrder to match x86_64, provide a future place for -mregparm, and more
> easily disable floating point instructions.
> 
> With these changes, the KUnit tests pass with:
> kunit.py run --make_options LLVM=1 --kconfig_add CONFIG_RUST=y
> --kconfig_add CONFIG_64BIT=n --kconfig_add CONFIG_FORTIFY_SOURCE=n
> 
> An earlier version of these changes was proposed on the Rust-for-Linux
> github[2].
> 
> [1]: https://github.com/rust-lang/rust/issues/116972
> [2]: https://github.com/Rust-for-Linux/linux/pull/966
> 
> Signed-off-by: David Gow <davidgow@...gle.com>
...
> -ifdef CONFIG_X86_64
> +ifneq ($(or $(CONFIG_X86_64),$(CONFIG_X86_32)),)

These configurations are mutually exclusive, so would it look more
readable to have it be:


ifeq ($(CONFIG_X86_32)$(CONFIG_X86_64),y)

?

Cheers.
Nathan

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ