Re: [PATCH v2] ARM: spectre-v2: fix smp_processor_id() warning

From: Tetsuo Handa
Date: Fri Jul 15 2022 - 10:08:05 EST

On 2022/07/15 22:36, Russell King (Oracle) wrote:
> 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.

Then, at least for now can we stop emitting the BUG: string? I showed an idea at
but I got no response.

Since syzkaller stops fuzz testing upon encountering BUG: or WARNING: string,
ARM32 might be failing to find other bugs for 491 days due to this problem.

If you don't want to stop emitting this BUG: string, we might want to teach
syzkaller to build ARM32 kernels with CONFIG_HARDEN_BRANCH_PREDICTOR=n.