From: "Russell King (Oracle)" <linux@armlinux.org.uk>
To: Tetsuo Handa <penguin-kernel@i-love.sakura.ne.jp>
Cc: Marc Zyngier <maz@kernel.org>, Tony Lindgren <tony@atomide.com>,
LKML <linux-kernel@vger.kernel.org>,
Linux ARM <linux-arm-kernel@lists.infradead.org>
Subject: Re: [PATCH v2] ARM: spectre-v2: fix smp_processor_id() warning
Date: Fri, 15 Jul 2022 14:36:59 +0100 [thread overview]
Message-ID: <YtFte2mTbfkMkRpJ@shell.armlinux.org.uk> (raw)
In-Reply-To: <3188347c-3375-b728-cd08-ea4421d823cd@I-love.SAKURA.ne.jp>
On Fri, Jul 15, 2022 at 10:09:01PM +0900, Tetsuo Handa wrote:
> syzbot is reporting that CONFIG_HARDEN_BRANCH_PREDICTOR=y +
> CONFIG_DEBUG_PREEMPT=y on ARM32 causes "BUG: using smp_processor_id() in
> preemptible code" message [1], for this check was not designed to handle
> attempts to access kernel memory like
>
> ----------
> int main() { return *(char *) -1; }
> ----------
>
> . Although Russell King commented that this BUG: message might help finding
> possible exploit attempts [2], this is not a kernel's problem that worth
> giving up fuzz testing.
But shutting up a valid warning when the real problem is still there is
also not acceptable.
As I've said many times, the workaround needs to be run on the _same_
CPU that faulted. The warning is telling us that we're preemptible at
this point, which means that can't be guaranteed.
So bodging it by disabling preemption around here DOES NOT FIX THE
PROBLEM. It _SHUTS UP THE VALID WARNING_. And shutting up a valid
warning is A VERY BAD PRACTICE.
NAK. MAK. NAK. NAK. NAK.
--
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 40Mbps down 10Mbps up. Decent connectivity at last!
next prev parent reply other threads:[~2022-07-15 13:37 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-22 6:49 [PATCH] ARM: spectre-v2: fix smp_processor_id() warning Tetsuo Handa
2022-06-22 11:21 ` Russell King (Oracle)
2022-06-22 13:31 ` Tetsuo Handa
2022-06-22 13:50 ` Marc Zyngier
2022-06-22 14:04 ` Russell King (Oracle)
2022-06-22 15:02 ` Tetsuo Handa
2022-06-24 5:39 ` Tetsuo Handa
2022-07-15 13:09 ` [PATCH v2] " Tetsuo Handa
2022-07-15 13:36 ` Russell King (Oracle) [this message]
2022-07-15 14:07 ` Tetsuo Handa
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=YtFte2mTbfkMkRpJ@shell.armlinux.org.uk \
--to=linux@armlinux.org.uk \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=maz@kernel.org \
--cc=penguin-kernel@i-love.sakura.ne.jp \
--cc=tony@atomide.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