Messages in this thread | | | Date | Fri, 15 Jul 2022 14:36:59 +0100 | From | "Russell King (Oracle)" <> | Subject | Re: [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!
| |