Re: [PATCH] dm log userspace: replace deprecated strncpy with strscpy

2023-10-24 Thread Kees Cook
On Mon, 25 Sep 2023 07:06:03 +, Justin Stitt wrote: > `strncpy` is deprecated for use on NUL-terminated destination strings > [1] and as such we should prefer more robust and less ambiguous string > interfaces. > > `lc` is already zero-allocated: > | lc = kzalloc(sizeof(*lc),

Re: [dm-devel] [PATCH] dm log userspace: replace deprecated strncpy with strscpy

2023-09-25 Thread Kees Cook
On Mon, Sep 25, 2023 at 07:06:03AM +, Justin Stitt wrote: > `strncpy` is deprecated for use on NUL-terminated destination strings > [1] and as such we should prefer more robust and less ambiguous string > interfaces. > > `lc` is already zero-allocated: > | lc = kzalloc(sizeof(*lc),

[PATCH] dm log userspace: replace deprecated strncpy with strscpy

2023-09-25 Thread Justin Stitt
`strncpy` is deprecated for use on NUL-terminated destination strings [1] and as such we should prefer more robust and less ambiguous string interfaces. `lc` is already zero-allocated: | lc = kzalloc(sizeof(*lc), GFP_KERNEL); ... as such, any future NUL-padding is superfluous. A suitable