[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAH5fLggMj6iC_Ky4ki5j_sZZBLmLkwvgZqiN3evFZhkFxf8hRg@mail.gmail.com>
Date: Mon, 12 Jan 2026 17:37:30 +0100
From: Alice Ryhl <aliceryhl@...gle.com>
To: Steven Rostedt <rostedt@...dmis.org>
Cc: Borislav Petkov <bp@...en8.de>, Fushuai Wang <fushuai.wang@...ux.dev>, akpm@...ux-foundation.org,
brauner@...nel.org, cyphar@...har.com, dave.hansen@...ux.intel.com,
hpa@...or.com, jack@...e.cz, kees@...nel.org, linux-kernel@...r.kernel.org,
linux-trace-kernel@...r.kernel.org, luto@...nel.org,
mathieu.desnoyers@...icios.com, mhiramat@...nel.org, mingo@...hat.com,
peterz@...radead.org, tglx@...nel.org, vmalik@...hat.com,
wangfushuai@...du.com, x86@...nel.org, yury.norov@...il.com
Subject: Re: [PATCH v2 1/6] uaccess: Add copy_from_user_nul helper
On Mon, Jan 12, 2026 at 5:28 PM Steven Rostedt <rostedt@...dmis.org> wrote:
>
> On Mon, 12 Jan 2026 15:40:53 +0000
> Alice Ryhl <aliceryhl@...gle.com> wrote:
>
> > I'm getting the impression that strncpy_from_user() is the real problem
> > here. It should append a nul byte.
> >
> > That would also be a lot less error-prone than the suggested new API.
> > Requiring a length of N+1 is not the most immediately-obvious API.
>
> Should we make a strscpy_from_user() API that acts the same as strscpy()
> but from user space?
Sounds quite reasonable to me.
Alice
Powered by blists - more mailing lists