]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
powerpc/64s: Fix system reset vs general interrupt reentrancy
authorNicholas Piggin <npiggin@gmail.com>
Mon, 19 Dec 2016 18:30:04 +0000 (04:30 +1000)
committerMichael Ellerman <mpe@ellerman.id.au>
Fri, 28 Apr 2017 11:02:25 +0000 (21:02 +1000)
commita3d96f70c14773d0928c6a54fd278138f0868572
tree740c198af62ef423ee257f601616031eee84981b
parenta4087a4d38981bef3de7dd814493df202919cd2e
powerpc/64s: Fix system reset vs general interrupt reentrancy

The system reset interrupt can occur when MSR_EE=0, and it currently
uses the PACA_EXGEN save area.

Some PACA_EXGEN interrupts have a window where MSR_RI=1 and MSR_EE=0
when the save area is still in use. A system reset interrupt in this
window can lead to undetected corruption when the save area gets
overwritten.

This patch introduces PACA_EXNMI save area for system reset exceptions,
which closes this corruption window. It's also helpful to retain the
EXGEN state for debugging situations, even if not considering the
recoverability aspect.

This patch also moves the PACA_EXMC area down to a less frequently used
part of the paca with the new save area.

Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
arch/powerpc/include/asm/exception-64s.h
arch/powerpc/include/asm/paca.h
arch/powerpc/kernel/asm-offsets.c
arch/powerpc/kernel/exceptions-64s.S