[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CANiq72kG1TarXDJPbRnWJhBkUVdO+EOPEk70rAyDK6svt7TxNA@mail.gmail.com>
Date: Mon, 14 Jul 2025 01:37:01 +0200
From: Miguel Ojeda <miguel.ojeda.sandonis@...il.com>
To: Alice Ryhl <aliceryhl@...gle.com>
Cc: Miguel Ojeda <ojeda@...nel.org>, Andrew Morton <akpm@...ux-foundation.org>,
Alexander Viro <viro@...iv.linux.org.uk>, Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Boqun Feng <boqun.feng@...il.com>, Benno Lossin <lossin@...nel.org>, Gary Guo <gary@...yguo.net>,
Björn Roy Baron <bjorn3_gh@...tonmail.com>,
Andreas Hindborg <a.hindborg@...nel.org>, Trevor Gross <tmgross@...ch.edu>,
Danilo Krummrich <dakr@...nel.org>, rust-for-linux@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH v5 0/2] strncpy_from_user for Rust
On Mon, Jun 16, 2025 at 2:42 PM Alice Ryhl <aliceryhl@...gle.com> wrote:
>
> There is currently no easy way to read NUL-terminated strings from
> userspace. Trying to use the ordinary read function on an array of the
> maximum length doesn't work because it could fail with EFAULT when the C
> string is shorter than the maximum length. In this case,
> strncpy_from_user is better because it doesn't return EFAULT even if it
> encounters a page fault on bytes that are after the NUL-terminator but
> before the maximum length.
>
> I don't see a clear owner of uaccess in MAINTAINERS, so I suggest that
> it lands through Miguel's tree.
>
> Signed-off-by: Alice Ryhl <aliceryhl@...gle.com>
Applied to `rust-next` -- thanks everyone!
[ Reworded title. - Miguel ]
[ Use `from_mut` to clean `clippy::ref_as_ptr` lint. Reworded
title. - Miguel ]
Cheers,
Miguel
Powered by blists - more mailing lists