[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAPhsuW6MGr=ZA1yoHSH3YdG4Z5x5+qcJt8cMoNqG2cb7EqJYcg@mail.gmail.com>
Date: Tue, 26 Sep 2023 16:17:05 -0700
From: Song Liu <song@...nel.org>
To: Kees Cook <keescook@...omium.org>
Cc: Justin Stitt <justinstitt@...gle.com>, linux-raid@...r.kernel.org,
linux-kernel@...r.kernel.org, linux-hardening@...r.kernel.org
Subject: Re: [PATCH] md: replace deprecated strncpy with memcpy
On Mon, Sep 25, 2023 at 11:22 AM Kees Cook <keescook@...omium.org> wrote:
>
[...]
> >
> > So really, all these instances have precisely calculated lengths and
> > purposeful NUL-termination so we can just use memcpy to remove ambiguity
> > surrounding strncpy.
> >
> > Link: https://www.kernel.org/doc/html/latest/process/deprecated.html#strncpy-on-nul-terminated-strings [1]
> > Link: https://github.com/KSPP/linux/issues/90
> > Cc: linux-hardening@...r.kernel.org
> > Signed-off-by: Justin Stitt <justinstitt@...gle.com>
>
> I agree on the analysis of the replacements. Thanks for all the detail!
>
> Reviewed-by: Kees Cook <keescook@...omium.org>
Applied to md-next. Thanks!
Song
Powered by blists - more mailing lists