[PATCH 1/3] powerpc/64s: Mask NIP before checking against SRR0
Sachin Sant
sachinp at linux.vnet.ibm.com
Wed Dec 22 21:25:26 AEDT 2021
> On 21-Dec-2021, at 7:20 PM, Michael Ellerman <mpe at ellerman.id.au> wrote:
>
> When CONFIG_PPC_RFI_SRR_DEBUG=y we check that NIP and SRR0 match when
> returning from interrupts. This can trigger falsely if NIP has either of
> its two low bits set via sigreturn or ptrace, while SRR0 has its low two
> bits masked in hardware.
>
> As a quick fix make sure to mask the low bits before doing the check.
>
> Fixes: 59dc5bfca0cb ("powerpc/64s: avoid reloading (H)SRR registers if they are still valid")
> Reported-by: Sachin Sant <sachinp at linux.vnet.ibm.com>
> Signed-off-by: Michael Ellerman <mpe at ellerman.id.au>
> ---
Tested this 3 patch series successfully (with and without PPC_RFI_SRR_DEBUG)
on Power9/Power10 LPAR as well as Power9 PowerNV.
Tested-by: Sachin Sant <sachinp at linux.vnet.ibm.com>
More information about the Linuxppc-dev
mailing list