# Re: \[PATCH v2 1/6\] uaccess: Add copy\_from\_user\_nul helper

- From: Alice Ryhl \<aliceryhl@google.com\>
- Date: 2026-01-12 16:37:46 
- List: linux-trace-kernel
- Page: https://ratatoskr.run/linux-trace-kernel/2026/01/3364004
- Thread: https://ratatoskr.run/linux-trace-kernel/2026/01/3362849/t.md

```text
On Mon, Jan 12, 2026 at 5:28 PM Steven Rostedt [ref] wrote:
>
> On Mon, 12 Jan 2026 15:40:53 +0000
> Alice Ryhl [ref] 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
```
