powerpc/security: Fix link stack flush instruction
authorNicholas Piggin <npiggin@gmail.com>
Wed, 7 Oct 2020 08:06:05 +0000 (18:06 +1000)
committerMichael Ellerman <mpe@ellerman.id.au>
Thu, 8 Oct 2020 01:50:52 +0000 (12:50 +1100)
commit792254a77201453d9a77479e63dc216ad90462d2
tree705bc1471240d76c54be84a457c51fb18e9439ff
parent09b791d95559ef82542063333ecaa2ac9d57118e
powerpc/security: Fix link stack flush instruction

The inline execution path for the hardware assisted branch flush
instruction failed to set CTR to the correct value before bcctr,
causing a crash when the feature is enabled.

Fixes: 4d24e21cc694 ("powerpc/security: Allow for processors that flush the link stack using the special bcctr")
Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20201007080605.64423-1-npiggin@gmail.com
arch/powerpc/include/asm/asm-prototypes.h
arch/powerpc/kernel/entry_64.S
arch/powerpc/kernel/security.c