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: Kees Cook <keescook@chromium.org>,
Nick Desaulniers <ndesaulniers@google.com>,
linux-kernel@vger.kernel.org,
Nathan Chancellor <nathan@kernel.org>,
linux-hardening@vger.kernel.org, linuxppc-dev@lists.ozlabs.org
Subject: Re: [PATCH RFC 0/3] powerpc/ps3: refactor strncpy usage
Date: Mon, 14 Aug 2023 22:31:10 +1000 [thread overview]
Message-ID: <87cyzperg1.fsf@mail.lhotse> (raw)
In-Reply-To: <CAFhGd8oZLTaFNg3pQSi=zX121HPfY9_v-H5e3_+27W3=1fXxmw@mail.gmail.com>
Justin Stitt <justinstitt@google.com> writes:
> On Fri, Aug 11, 2023 at 2:19 PM Justin Stitt <justinstitt@google.com> wrote:
>>
>> Within this RFC-series I want to get some comments on two ideas that I
>> have for refactoring the current `strncpy` usage in repository.c.
>>
>> When looking at `make_first_field` we see a u64 is being used to store
>> up to 8 bytes from a literal string. This is slightly suspect to me but
>> it works? In regards to `strncpy` here, it makes the code needlessly
>> complex imo.
>>
>> Please see my two ideas to change this and let me know if any other
>> approaches are more reasonable.
>>
>> Link: https://github.com/KSPP/linux/issues/90
>> Signed-off-by: Justin Stitt <justinstitt@google.com>
>> ---
>> Justin Stitt (3):
>> [RFC] powerpc/ps3: refactor strncpy usage attempt 1
>> [RFC] powerpc/ps3: refactor strncpy usage attempt 2
>> [RFC] powerpc/ps3: refactor strncpy usage attempt 2.5
> Errhm, It looks like the diffs after attempt 1 came out poorly and
> probably won't apply cleanly because they were inter-diffed with the
> first patch. Is there a way to let b4 know I wanted each patch diff'd
> against the same SHA and not each other sequentially?
I don't think there is. It always assumes they're a series.
cheers
prev parent reply other threads:[~2023-08-14 12:32 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-11 21:19 [PATCH RFC 0/3] powerpc/ps3: refactor strncpy usage Justin Stitt
2023-08-11 21:19 ` [PATCH RFC 1/3] powerpc/ps3: refactor strncpy usage attempt 1 Justin Stitt
2023-08-14 12:28 ` Michael Ellerman
2023-08-11 21:19 ` [PATCH RFC 2/3] powerpc/ps3: refactor strncpy usage attempt 2 Justin Stitt
2023-08-14 23:13 ` Kees Cook
2023-08-11 21:19 ` [PATCH RFC 3/3] powerpc/ps3: refactor strncpy usage attempt 2.5 Justin Stitt
2023-08-11 21:25 ` [PATCH RFC 0/3] powerpc/ps3: refactor strncpy usage Justin Stitt
2023-08-14 12:31 ` Michael Ellerman [this message]
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=87cyzperg1.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=nathan@kernel.org \
--cc=ndesaulniers@google.com \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).