[PATCH] powerpc/64s/interrupt: Fix clear of PACA_IRQS_HARD_DIS when returning to soft-masked context

Michael Ellerman patch-notifications at ellerman.id.au
Fri Oct 28 22:49:48 AEDT 2022


On Sat, 22 Oct 2022 15:22:07 +1000, Nicholas Piggin wrote:
> Commit a4cb3651a1743 ("powerpc/64s/interrupt: Fix lost interrupts when
> returning to soft-masked context") fixed the problem of pending irqs
> pending cleared when clearing the HARD_DIS bit, but then it didn't clear
> the bit at all. This change clears HARD_DIS without affecting other bits
> in the mask.
> 
> When an interrupt hits in a soft-masked section that has MSR[EE]=1, it
> can hard disable and set PACA_IRQS_HARD_DIS,which  must be cleared
> when returning to the EE=1 caller (unless it was set due to a
> MUST_HARD_MASK interrupt becoming pending). Failure to clear this leaves
> the returned-to context running with MSR[EE]=1 and PACA_IRQS_HARD_DIS,
> which confuses irq assertions and could be dangerous for code that might
> test the flag.
> 
> [...]

Applied to powerpc/fixes.

[1/1] powerpc/64s/interrupt: Fix clear of PACA_IRQS_HARD_DIS when returning to soft-masked context
      https://git.kernel.org/powerpc/c/65722736c3baf29e02e964a09e85c9ef71c48e8d

cheers


More information about the Linuxppc-dev mailing list