From: Michael Ellerman <mpe@ellerman.id.au>
To: Justin Stitt <justinstitt@google.com>,
Geoff Levand <geoff@infradead.org>,
Nicholas Piggin <npiggin@gmail.com>,
Christophe Leroy <christophe.leroy@csgroup.eu>
Cc: linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org,
Kees Cook <keescook@chromium.org>,
linux-hardening@vger.kernel.org,
Justin Stitt <justinstitt@google.com>
Subject: Re: [PATCH] powerpc/ps3: refactor strncpy usage
Date: Thu, 17 Aug 2023 16:34:47 +1000 [thread overview]
Message-ID: <87350i6ut4.fsf@mail.lhotse> (raw)
In-Reply-To: <20230816-strncpy-arch-powerpc-platforms-ps3-repository-v1-1-88283b02fb09@google.com>
Justin Stitt <justinstitt@google.com> writes:
> `strncpy` is deprecated for use on NUL-terminated destination strings [1].
>
> `make_first_field()` should use similar implementation to `make_field()`
> due to memcpy having more obvious behavior here. The end result yields
> the same behavior as the previous `strncpy`-based implementation
> including the NUL-padding.
>
> Link: 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@vger.kernel.org
> Signed-off-by: Justin Stitt <justinstitt@google.com>
> ---
> Note:
> This follows up on a previous RFC which can be found here:
> https://lore.kernel.org/all/20230811-strncpy-arch-powerpc-platforms-ps3-v1-0-301052a5663e@google.com/
> ---
> arch/powerpc/platforms/ps3/repository.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
This looks good to me. I'll pick this up directly, Geoff let me know if
this breaks something somehow.
cheers
WARNING: multiple messages have this Message-ID (diff)
From: Michael Ellerman <mpe@ellerman.id.au>
To: Justin Stitt <justinstitt@google.com>,
Geoff Levand <geoff@infradead.org>,
Nicholas Piggin <npiggin@gmail.com>,
Christophe Leroy <christophe.leroy@csgroup.eu>
Cc: linux-hardening@vger.kernel.org,
Justin Stitt <justinstitt@google.com>,
linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org,
Kees Cook <keescook@chromium.org>
Subject: Re: [PATCH] powerpc/ps3: refactor strncpy usage
Date: Thu, 17 Aug 2023 16:34:47 +1000 [thread overview]
Message-ID: <87350i6ut4.fsf@mail.lhotse> (raw)
In-Reply-To: <20230816-strncpy-arch-powerpc-platforms-ps3-repository-v1-1-88283b02fb09@google.com>
Justin Stitt <justinstitt@google.com> writes:
> `strncpy` is deprecated for use on NUL-terminated destination strings [1].
>
> `make_first_field()` should use similar implementation to `make_field()`
> due to memcpy having more obvious behavior here. The end result yields
> the same behavior as the previous `strncpy`-based implementation
> including the NUL-padding.
>
> Link: 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@vger.kernel.org
> Signed-off-by: Justin Stitt <justinstitt@google.com>
> ---
> Note:
> This follows up on a previous RFC which can be found here:
> https://lore.kernel.org/all/20230811-strncpy-arch-powerpc-platforms-ps3-v1-0-301052a5663e@google.com/
> ---
> arch/powerpc/platforms/ps3/repository.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
This looks good to me. I'll pick this up directly, Geoff let me know if
this breaks something somehow.
cheers
next prev parent reply other threads:[~2023-08-17 6:35 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-16 21:39 [PATCH] powerpc/ps3: refactor strncpy usage Justin Stitt
2023-08-16 21:39 ` Justin Stitt
2023-08-17 3:06 ` Kees Cook
2023-08-17 3:06 ` Kees Cook
2023-08-17 6:34 ` Michael Ellerman [this message]
2023-08-17 6:34 ` Michael Ellerman
2023-08-17 19:58 ` Geoff Levand
2023-08-17 19:58 ` Geoff Levand
2023-08-23 11:55 ` Michael Ellerman
2023-08-23 11:55 ` Michael Ellerman
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87350i6ut4.fsf@mail.lhotse \
--to=mpe@ellerman.id.au \
--cc=christophe.leroy@csgroup.eu \
--cc=geoff@infradead.org \
--cc=justinstitt@google.com \
--cc=keescook@chromium.org \
--cc=linux-hardening@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=npiggin@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.