aboutsummaryrefslogtreecommitdiff
path: root/arch/powerpc/lib/code-patching.c
diff options
context:
space:
mode:
authorRohan McLure <rmclure@linux.ibm.com>2022-12-01 18:10:18 +1100
committerMichael Ellerman <mpe@ellerman.id.au>2022-12-02 20:46:08 +1100
commitefe1691ac814e4cf3653538b701662cbd905bddc (patch)
tree57891587f077e10214fa75f0f6bad13ee35e895f /arch/powerpc/lib/code-patching.c
parent1df45d78b8a89da6544fab5267e8f5da15073d28 (diff)
downloadlinux-efe1691ac814e4cf3653538b701662cbd905bddc.tar.gz
linux-efe1691ac814e4cf3653538b701662cbd905bddc.tar.bz2
linux-efe1691ac814e4cf3653538b701662cbd905bddc.zip
powerpc/64e: Clear gprs on interrupt routine entry on Book3E
Zero GPRS r14-r31 on entry into the kernel for interrupt sources to limit influence of user-space values in potential speculation gadgets. Prior to this commit, all other GPRS are reassigned during the common prologue to interrupt handlers and so need not be zeroised explicitly. This may be done safely, without loss of register state prior to the interrupt, as the common prologue saves the initial values of non-volatiles, which are unconditionally restored in interrupt_64.S. Mitigation defaults to enabled by INTERRUPT_SANITIZE_REGISTERS. Reviewed-by: Nicholas Piggin <npiggin@gmail.com> Signed-off-by: Rohan McLure <rmclure@linux.ibm.com> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> Link: https://lore.kernel.org/r/20221201071019.1953023-6-rmclure@linux.ibm.com
Diffstat (limited to 'arch/powerpc/lib/code-patching.c')
0 files changed, 0 insertions, 0 deletions