From: Michal Suchánek <hidden> Date: 2020-09-15 08:45:53
Hello,
Using the SLB mutihit injection test module (which I did not write so I
do not want to post it here) to verify updates on my 5.3 frankernekernel
I found that the kernel crashes with Oops: kernel bad access.
I tested on latest upstream kernel build that I have at hand and the
result is te same (minus the message - nothing was logged and the kernel
simply rebooted).
Since the whole effort to write a real mode MCE handler was supposed to
prevent this maybe the SLB injection module should be added to the
kernel selftests?
Thanks
Michal
From: Michael Ellerman <mpe@ellerman.id.au> Date: 2020-09-15 12:57:45
Michal Suchánek [off-list ref] writes:
Hello,
Using the SLB mutihit injection test module (which I did not write so I
do not want to post it here) to verify updates on my 5.3 frankernekernel
I found that the kernel crashes with Oops: kernel bad access.
I tested on latest upstream kernel build that I have at hand and the
result is te same (minus the message - nothing was logged and the kernel
simply rebooted).
That's disappointing.
Since the whole effort to write a real mode MCE handler was supposed to
prevent this maybe the SLB injection module should be added to the
kernel selftests?
Yes I'd like to see it upstream. I think it should be integrated into
LKDTM, which contains other dangerous things like that and is designed
for testing how the kernel handles/recovers from bad conditions.
cheers
From: Michal Suchanek <hidden> Date: 2020-09-15 18:11:06
This reverts commit 116ac378bb3ff844df333e7609e7604651a0db9d.
This commit causes the kernel to oops and reboot when injecting a SLB
multihit which causes a MCE.
Before this commit a SLB multihit was corrected by the kernel and the
system continued to operate normally.
cc: stable@vger.kernel.org
Fixes: 116ac378bb3f ("powerpc/64s: machine check interrupt update NMI accounting")
Signed-off-by: Michal Suchanek <redacted>
---
arch/powerpc/kernel/mce.c | 7 -------
arch/powerpc/kernel/traps.c | 18 +++---------------
2 files changed, 3 insertions(+), 22 deletions(-)
On Tue, Sep 15, 2020 at 08:06:59PM +0200, Michal Suchanek wrote:
This reverts commit 116ac378bb3ff844df333e7609e7604651a0db9d.
This commit causes the kernel to oops and reboot when injecting a SLB
multihit which causes a MCE.
Before this commit a SLB multihit was corrected by the kernel and the
system continued to operate normally.
cc: stable@vger.kernel.org
Fixes: 116ac378bb3f ("powerpc/64s: machine check interrupt update NMI accounting")
Signed-off-by: Michal Suchanek <redacted>
From: Nicholas Piggin <npiggin@gmail.com> Date: 2020-09-16 00:55:01
Excerpts from Michael Ellerman's message of September 15, 2020 10:54 pm:
Michal Suchánek [off-list ref] writes:
quoted
Hello,
Using the SLB mutihit injection test module (which I did not write so I
do not want to post it here) to verify updates on my 5.3 frankernekernel
I found that the kernel crashes with Oops: kernel bad access.
I tested on latest upstream kernel build that I have at hand and the
result is te same (minus the message - nothing was logged and the kernel
simply rebooted).
That's disappointing.
It seems to work okay with qemu and mambo injection on upstream
(powernv_defconfig). I wonder why that nmi_enter is crashing.
Can you post the output of a successful test with the patch
reverted?
qemu injection test output -
[ 195.279885][ C0] Disabling lock debugging due to kernel taint
[ 195.280891][ C0] MCE: CPU0: machine check (Warning) Host SLB Multihit DAR: 00000000deadbeef [Recovered]
[ 195.282117][ C0] MCE: CPU0: NIP: [c00000000003c2b4] isa300_idle_stop_mayloss+0x68/0x6c
[ 195.283631][ C0] MCE: CPU0: Initiator CPU
[ 195.284432][ C0] MCE: CPU0: Probable Software error (some chance of hardware cause)
[ 220.711577][ T90] MCE: CPU0: machine check (Warning) Host SLB Multihit DAR: 00000000deadbeef [Recovered]
[ 220.712805][ T90] MCE: CPU0: PID: 90 Comm: yes NIP: [00007fff7fdac2e0]
[ 220.713553][ T90] MCE: CPU0: Initiator CPU
[ 220.714021][ T90] MCE: CPU0: Probable Software error (some chance of hardware cause)
Thanks,
Nick
Hello,
Using the SLB mutihit injection test module (which I did not write so I
do not want to post it here) to verify updates on my 5.3 frankernekernel
I found that the kernel crashes with Oops: kernel bad access.
I tested on latest upstream kernel build that I have at hand and the
result is te same (minus the message - nothing was logged and the kernel
simply rebooted).
Yes, SLB multihit recovery is broken upstream. Fix is on the way.
Since the whole effort to write a real mode MCE handler was supposed to
prevent this maybe the SLB injection module should be added to the
kernel selftests?
Yes. We are working on adding SLB injection selftest patches will be
posted soon.
Thanks,
-Mahesh.
From: Michal Suchánek <hidden> Date: 2020-09-16 09:00:44
On Tue, Sep 15, 2020 at 08:16:42PM +0200, peterz@infradead.org wrote:
On Tue, Sep 15, 2020 at 08:06:59PM +0200, Michal Suchanek wrote:
quoted
This reverts commit 116ac378bb3ff844df333e7609e7604651a0db9d.
This commit causes the kernel to oops and reboot when injecting a SLB
multihit which causes a MCE.
Before this commit a SLB multihit was corrected by the kernel and the
system continued to operate normally.
cc: stable@vger.kernel.org
Fixes: 116ac378bb3f ("powerpc/64s: machine check interrupt update NMI accounting")
Signed-off-by: Michal Suchanek <redacted>
And this patch was merged in parallel with this native nesting support
and conflicted with it - hence the explicit nesting in the hunk that did
not conflict.
Either way the bug is present on kernels both with and without
69ea03b56ed2. So besides the conflict 69ea03b56ed2 does not affect this
problem.
Thanks
Michal