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: <aRzOWCcyJmGZ0hiq@yury>
Date: Tue, 18 Nov 2025 14:51:52 -0500
From: Yury Norov <yury.norov@...il.com>
To: Andrew Morton <akpm@...ux-foundation.org>
Cc: Alice Ryhl <aliceryhl@...gle.com>, Miguel Ojeda <ojeda@...nel.org>,
	Boqun Feng <boqun.feng@...il.com>,
	Danilo Krummrich <dakr@...nel.org>, Arnd Bergmann <arnd@...db.de>,
	Alex Gaynor <alex.gaynor@...il.com>, Gary Guo <gary@...yguo.net>,
	John Hubbard <jhubbard@...dia.com>,
	Björn Roy Baron <bjorn3_gh@...tonmail.com>,
	Benno Lossin <lossin@...nel.org>,
	Andreas Hindborg <a.hindborg@...nel.org>,
	Trevor Gross <tmgross@...ch.edu>, Philip Li <philip.li@...el.com>,
	Yujie Liu <yujie.liu@...el.com>, linux-kernel@...r.kernel.org,
	rust-for-linux@...r.kernel.org
Subject: Re: [PATCH v2] uaccess: decouple INLINE_COPY_FROM_USER and
 CONFIG_RUST

+ Philip, Yujie

On Tue, Nov 18, 2025 at 09:18:18AM -0800, Andrew Morton wrote:
> On Tue, 18 Nov 2025 10:39:56 +0000 Alice Ryhl <aliceryhl@...gle.com> wrote:
> 
> > On Fri, Oct 24, 2025 at 11:47:53AM -0400, Yury Norov (NVIDIA) wrote:
> > > Commit 1f9a8286bc0c ("uaccess: always export _copy_[from|to]_user with
> > > CONFIG_RUST") exports _copy_{from,to}_user() unconditionally, if RUST
> > > is enabled. This pollutes exported symbols namespace, and spreads RUST
> > > ifdefery in core files.
> > > 
> > > It's better to declare a corresponding helper under the rust/helpers,
> > > similarly to how non-underscored copy_{from,to}_user() is handled.
> > > 
> > > Reviewed-by: Alice Ryhl <aliceryhl@...gle.com>
> > > Tested-by: Alice Ryhl <aliceryhl@...gle.com>
> > > Signed-off-by: Yury Norov (NVIDIA) <yury.norov@...il.com>
> > 
> > It looks like this is not quite correct. The header file still has this
> > declaration unconditionally:
> > 
> > extern __must_check unsigned long
> > _copy_from_user(void *, const void __user *, unsigned long);
> > 
> > extern __must_check unsigned long
> > _copy_to_user(void __user *, const void *, unsigned long);
> > 
> > this causes:
> > 
> > ERROR: modpost: "_copy_from_user" [samples/rust/rust_misc_device.ko] undefined!
> > ERROR: modpost: "_copy_to_user" [samples/rust/rust_misc_device.ko] undefined!
> 
> I wonder why this wasn't caught in linux-next testing.
> 
> Please check the rust Kconfig defaults, see if there's something we can
> do to get more compilation test coverage?

I'm second to that.

Philip added my git repo under his testing a while ago, and also enabled
Rust config. I received a 'build success' email from his robot before
submitting this.

Alice, can you please share your config? Philip, can you add Alice's
config in the testing grid so that we don't slip through such things
in future?

Thanks,
Yury

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ