lkml.org 
[lkml]   [2022]   [Jul]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v2] ARM: spectre-v2: fix smp_processor_id() warning
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!

\
 
 \ /
  Last update: 2022-07-15 15:37    [W:1.949 / U:0.540 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site