1. 16 Nov, 2022 1 commit
  2. 01 Nov, 2022 1 commit
    • Michael Ellerman's avatar
      powerpc/32: Select ARCH_SPLIT_ARG64 · 02a771c9
      Michael Ellerman authored
      On 32-bit kernels, 64-bit syscall arguments are split into two
      registers. For that to work with syscall wrappers, the prototype of the
      syscall must have the argument split so that the wrapper macro properly
      unpacks the arguments from pt_regs.
      
      The fanotify_mark() syscall is one such syscall, which already has a
      split prototype, guarded behind ARCH_SPLIT_ARG64.
      
      So select ARCH_SPLIT_ARG64 to get that prototype and fix fanotify_mark()
      on 32-bit kernels with syscall wrappers.
      
      Note also that fanotify_mark() is the only usage of ARCH_SPLIT_ARG64.
      
      Fixes: 7e92e01b ("powerpc: Provide syscall wrapper")
      Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
      Link: https://lore.kernel.org/r/20221101034852.2340319-1-mpe@ellerman.id.au
      02a771c9
  3. 31 Oct, 2022 4 commits
  4. 26 Oct, 2022 1 commit
    • Nicholas Piggin's avatar
      powerpc/64s/interrupt: Fix clear of PACA_IRQS_HARD_DIS when returning to soft-masked context · 65722736
      Nicholas Piggin authored
      Commit a4cb3651 ("powerpc/64s/interrupt: Fix lost interrupts when
      returning to soft-masked context") fixed the problem of pending irqs
      being 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.
      
      This was observed in a hash MMU kernel where a kernel hash fault hits in
      a local_irqs_disabled region that has EE=1. The hash fault also runs
      with EE=1, then as it returns, a decrementer hits in the restart section
      and the irq restart code hard-masks which sets the PACA_IRQ_HARD_DIS
      flag, which is not clear when the original context is returned to.
      Reported-by: default avatarSachin Sant <sachinp@linux.ibm.com>
      Fixes: a4cb3651 ("powerpc/64s/interrupt: Fix lost interrupts when returning to soft-masked context")
      Signed-off-by: default avatarNicholas Piggin <npiggin@gmail.com>
      Tested-by: default avatarSachin Sant <sachinp@linux.ibm.com>
      Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
      Link: https://lore.kernel.org/r/20221022052207.471328-1-npiggin@gmail.com
      65722736
  5. 23 Oct, 2022 9 commits
  6. 22 Oct, 2022 21 commits
  7. 21 Oct, 2022 3 commits