From: Ritesh Harjani (IBM) <ritesh.list@gmail.com>
To: Alejandro Colomar <alx@kernel.org>, linuxppc-dev@lists.ozlabs.org
Cc: "Alejandro Colomar" <alx@kernel.org>,
linux-hardening@vger.kernel.org, alx+linux-hardening@kernel.org,
"Nicholas Piggin" <npiggin@gmail.com>,
"Mauricio Faria de Oliveira" <mauricfo@linux.vnet.ibm.com>,
"Michael Neuling" <mikey@neuling.org>,
"Michal Suchánek" <msuchanek@suse.de>,
"Michael Ellerman" <mpe@ellerman.id.au>,
"Linus Torvalds" <torvalds@linux-foundation.org>
Subject: Re: [PATCH v1] powerpc: Fix off-by-one bug
Date: Sun, 15 Nov 2026 11:17:37 +0530 [thread overview]
Message-ID: <5wxy8x3a.ritesh.list@gmail.com> (raw)
In-Reply-To: <1f7d29cebba5823400ad0bc5d95610f05f55e2d0.1794686962.git.alx@kernel.org>
Alejandro Colomar <alx@kernel.org> writes:
> From the surrounding similar calls, the intention seems obvious: this
> seems intended to check for a prefix.
>
Could be, however the existing code is not functionally wrong either.
I agree it would have been nicer if all three were consistent. However,
x86 handles the same parameters with exact matches, so if anything "auto"
is the one doing the right thing here :)
But making "on"/"off" exact matches on powerpc now could change
behaviour for someone passing e.g. "offline" today, so I'd rather leave
those alone too.
> However, I do not understand this code, so take my reading with a grain
> of salt.
>
> Fixes: a048a07d7f453 ("powerpc/64s: Add support for a store forwarding barrier at kernel entry/exit")
IMHO, I don't think this patch fixes anything functional. So, I don't
think it will be correct to call this as: "Fix off-by-one bug" or
add fixes tag to it.
And so, I would suggest, we leave leave today's code as is, based on the
previous reasoning.
> Signed-off-by: Alejandro Colomar <alx@kernel.org>
> ---
>
> I found this while looking into replacing this code with calls to
> strprefix().
>
For your conversion, I think, we should keep today's behaviour as is.
Maybe streq() for "auto" and strprefix() for "on" and "off", which means
there is is nothing to change or fix.
-ritesh
prev parent reply other threads:[~2026-11-15 7:02 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-14 20:10 [PATCH v1] powerpc: Fix off-by-one bug Alejandro Colomar
2026-11-15 5:47 ` Ritesh Harjani [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=5wxy8x3a.ritesh.list@gmail.com \
--to=ritesh.list@gmail.com \
--cc=alx+linux-hardening@kernel.org \
--cc=alx@kernel.org \
--cc=linux-hardening@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=mauricfo@linux.vnet.ibm.com \
--cc=mikey@neuling.org \
--cc=mpe@ellerman.id.au \
--cc=msuchanek@suse.de \
--cc=npiggin@gmail.com \
--cc=torvalds@linux-foundation.org \
/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.