[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <169221967233.1236805.5075481446836951537.b4-ty@chromium.org>
Date: Wed, 16 Aug 2023 14:01:14 -0700
From: Kees Cook <keescook@...omium.org>
To: Richard Weinberger <richard@....at>,
Anton Ivanov <anton.ivanov@...bridgegreys.com>,
Johannes Berg <johannes@...solutions.net>,
Justin Stitt <justinstitt@...gle.com>
Cc: Kees Cook <keescook@...omium.org>, linux-hardening@...r.kernel.org,
linux-um@...ts.infradead.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v3] um: refactor deprecated strncpy to memcpy
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
Powered by blists - more mailing lists