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] [day] [month] [year] [list]
Message-ID: <CAH5fLgha=6v1voHc3pF9aSOUz4Bain0k3Xhvn0rh8m9+oL_7iA@mail.gmail.com>
Date: Fri, 24 Oct 2025 15:54:16 +0200
From: Alice Ryhl <aliceryhl@...gle.com>
To: Yury Norov <yury.norov@...il.com>
Cc: Miguel Ojeda <ojeda@...nel.org>, Boqun Feng <boqun.feng@...il.com>, 
	Danilo Krummrich <dakr@...nel.org>, Andrew Morton <akpm@...ux-foundation.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>, linux-kernel@...r.kernel.org, 
	rust-for-linux@...r.kernel.org
Subject: Re: [PATCH] uaccess: decouple INLINE_COPY_FROM_USER and CONFIG_RUST

On Fri, Oct 24, 2025 at 3:45 PM Yury Norov <yury.norov@...il.com> wrote:
>
> On Fri, Oct 24, 2025 at 09:12:56AM +0000, Alice Ryhl wrote:
> > On Thu, Oct 23, 2025 at 01:16:06PM -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.
> > >
> > > Signed-off-by: Yury Norov (NVIDIA) <yury.norov@...il.com>
> >
> > Overall LGTM:
> > Reviewed-by: Alice Ryhl <aliceryhl@...gle.com>
> > Tested-by: Alice Ryhl <aliceryhl@...gle.com>
> >
> >
> > In include/linux/uaccess.h there is the comment:
> >
> >       Rust code always uses the extern definition.
> >
> > I think we should reword this comment as part of this change. You can
> > say that Rust accesses _inline_copy_from_user() through a helper, or
> > similar.
> >
> > After all, when using LTO or other mechanism to inline helpers, it is no
> > longer the case that Rust always uses the a function call.
>
> It is actually worth to just drop the rust part of the comment - with
> this patch there's nothing special in managing the _copy_from_user().

Yeah, makes sense.

Alice

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ