public inbox for linux-edac@vger.kernel.org
 help / color / mirror / Atom feed
From: Ingo Molnar <mingo@kernel.org>
To: Borislav Petkov <bp@alien8.de>
Cc: Xiongfeng Wang <wangxiongfeng2@huawei.com>,
	tony.luck@intel.com, x86@kernel.org, linux-edac@vger.kernel.org,
	wanghai38@huawei.com, bobo.shaobowang@huawei.com
Subject: Re: [RFC PATCH] x86/mce/inject: Add sanity check in inject_mce()
Date: Sat, 31 May 2025 10:14:41 +0200	[thread overview]
Message-ID: <aDq6cecrsKYrwra2@gmail.com> (raw)
In-Reply-To: <20250529094534.GAaDgsvhdl-BrzlM0J@fat_crate.local>


* Borislav Petkov <bp@alien8.de> wrote:

> On Thu, May 29, 2025 at 11:32:56AM +0800, Xiongfeng Wang wrote:
> > syzbot reported the following kernel panic:
> > 
> > [  306.335489][ T3298] mce: CPUs not responding to MCE broadcast (may include false positives): 1-3
> > [  306.336332][ T3298] Kernel panic - not syncing: Timeout: Not all CPUs entered broadcast exception handler
> > [  306.337786][ T3298] Kernel Offset: 0x17400000 from 0xffffffff81000000 (relocation range: 0xffffffff80000000-0xffffffffbfffffff)
> > 
> > The syzkaller test didn't set 'MCJ_IRQ_BROADCAST | MCJ_NMI_BROADCAST' in
> 
> That's because you're not supposed to inject MCEs with syzkaller 
> doing rando poking at the interface but someone with a brain should 
> use it.

Uhm, avoiding a hard kernel crash in case of a tooling or human error:

  [  306.336332][ T3298] Kernel panic - not syncing: Timeout: Not all CPUs entered broadcast exception handler

... is in fact a proper interface robustness fix, especially if it's so 
incredibly simple as in this case. (The comment might need a bit of 
work but I digress.)

Injection can disrupt the kernel, but it shouldn't be able to trivially 
crash it in this case.

Improving MCE injection robustness might also help syzbot uncover 
*other* kernel bugs, because it can continue testing via the injection 
framework. But your proposed solution:

> Please point your syzkaller somewhere else.

... is how real kernel bugs might be hidden ...

Thanks,

	Ingo

  reply	other threads:[~2025-05-31  8:14 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-05-29  3:32 [RFC PATCH] x86/mce/inject: Add sanity check in inject_mce() Xiongfeng Wang
2025-05-29  9:45 ` Borislav Petkov
2025-05-31  8:14   ` Ingo Molnar [this message]
2025-05-31  9:17     ` Borislav Petkov
2025-05-31 18:04       ` Ingo Molnar
2025-05-31 19:07         ` Borislav Petkov
2025-05-31 22:00           ` Luck, Tony
2025-06-11 17:41             ` Yazen Ghannam

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=aDq6cecrsKYrwra2@gmail.com \
    --to=mingo@kernel.org \
    --cc=bobo.shaobowang@huawei.com \
    --cc=bp@alien8.de \
    --cc=linux-edac@vger.kernel.org \
    --cc=tony.luck@intel.com \
    --cc=wanghai38@huawei.com \
    --cc=wangxiongfeng2@huawei.com \
    --cc=x86@kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox