]> git.baikalelectronics.ru Git - kernel.git/commit
powerpc/64/interrupt: Prevent NMI PMI causing a dangerous warning
authorNicholas Piggin <npiggin@gmail.com>
Fri, 14 Oct 2022 03:07:29 +0000 (13:07 +1000)
committerMichael Ellerman <mpe@ellerman.id.au>
Tue, 18 Oct 2022 11:46:19 +0000 (22:46 +1100)
commit5ae6ec54d1c35866292184c6626717f0b6f46f83
tree411299c6b96893732dc0edacd16a00a19fb37d2f
parent24b5a4e440346527afb4bcb93fc4cc7d69416305
powerpc/64/interrupt: Prevent NMI PMI causing a dangerous warning

NMI PMIs really should not return using the normal interrupt_return
function. If such a PMI hits in code returning to user with the context
switched to user mode, this warning can fire. This was enough to cause
crashes when reproducing on 64s, because another perf interrupt would
hit while reporting bug, and that would cause another bug, and so on
until smashing the stack.

Work around that particular crash for now by just disabling that context
warning for PMIs. This is a hack and not a complete fix, there could be
other such problems lurking in corners. But it does fix the known crash.

Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20221014030729.2077151-3-npiggin@gmail.com
arch/powerpc/kernel/exceptions-64e.S
arch/powerpc/kernel/interrupt.c