Re: [PATCH v3] um: refactor deprecated strncpy to memcpy

From: Kees Cook
Date: Wed Aug 16 2023 - 17:02:02 EST


On Wed, 09 Aug 2023 18:19:32 +0000, Justin Stitt wrote:
> Use `memcpy` since `console_buf` is not expected to be NUL-terminated
> and it more accurately describes what is happening with the buffers
> `console_buf` and `string` as per Kees' analysis [1].
>
> Also mark char buffer as `__nonstring` as per Kees' suggestion [2].
>
> This change now makes it more clear what this code does and that
> `console_buf` is not expected to be NUL-terminated.
>
> [...]

Applied to for-next/hardening, thanks!

[1/1] um: refactor deprecated strncpy to memcpy
https://git.kernel.org/kees/c/be8dffa04de3

Take care,

--
Kees Cook