[PATCH 0/2] Improve POE handling for uaccess

Kevin Brodsky posted 2 patches 3 months, 3 weeks ago
arch/arm64/kernel/process.c |  5 +++++
arch/arm64/kernel/signal.c  |  7 +++++--
arch/arm64/mm/fault.c       | 30 +++++++++++++++++++++---------
3 files changed, 31 insertions(+), 11 deletions(-)
[PATCH 0/2] Improve POE handling for uaccess
Posted by Kevin Brodsky 3 months, 3 weeks ago
This short series attempts to approach POE (Overlay) faults consistently
w.r.t. uaccess. We currently assume that spurious Overlay faults are
handled by retrying the access [1], but this isn't the case.

Patch 1 ensures that spurious Overlay faults are indeed ignored. This
being done, it typically isn't worth using an ISB when writing to
POR_EL0. Patch 2 removes the remaining ISB in the signal handling code.

Patch 1 changes the fault handling logic to rely solely on POR_EL0 and
VMA metadata to determine if a pkey fault occurred, instead of the
Overlay bit in ESR_EL1. The rationale is detailed in that patch; it
is worth noting that powerpc made a similar change but for a different
reason [2].

[1] https://lore.kernel.org/linux-arm-kernel/ZtYNGBrcE-j35fpw@arm.com/
[2] https://lore.kernel.org/all/20200505071729.54912-3-aneesh.kumar@linux.ibm.com/
---
Cc: "Aneesh Kumar K.V" <aneesh.kumar@linux.ibm.com>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Joey Gouly <joey.gouly@arm.com>
Cc: Will Deacon <will@kernel.org>
---

Kevin Brodsky (2):
  arm64: poe: Handle spurious Overlay faults
  arm64: signal: Remove ISB when resetting POR_EL0

 arch/arm64/kernel/process.c |  5 +++++
 arch/arm64/kernel/signal.c  |  7 +++++--
 arch/arm64/mm/fault.c       | 30 +++++++++++++++++++++---------
 3 files changed, 31 insertions(+), 11 deletions(-)


base-commit: e04c78d86a9699d136910cfc0bdcf01087e3267e
-- 
2.47.0
Re: [PATCH 0/2] Improve POE handling for uaccess
Posted by Will Deacon 3 months ago
On Thu, 19 Jun 2025 17:00:40 +0100, Kevin Brodsky wrote:
> This short series attempts to approach POE (Overlay) faults consistently
> w.r.t. uaccess. We currently assume that spurious Overlay faults are
> handled by retrying the access [1], but this isn't the case.
> 
> Patch 1 ensures that spurious Overlay faults are indeed ignored. This
> being done, it typically isn't worth using an ISB when writing to
> POR_EL0. Patch 2 removes the remaining ISB in the signal handling code.
> 
> [...]

Applied first patch to arm64 (for-next/fixes), thanks!

[1/2] arm64: poe: Handle spurious Overlay faults
      https://git.kernel.org/arm64/c/22f3a4f60859

Cheers,
-- 
Will

https://fixes.arm64.dev
https://next.arm64.dev
https://will.arm64.dev
Re: (subset) [PATCH 0/2] Improve POE handling for uaccess
Posted by Catalin Marinas 2 months, 2 weeks ago
On Thu, 19 Jun 2025 17:00:40 +0100, Kevin Brodsky wrote:
> This short series attempts to approach POE (Overlay) faults consistently
> w.r.t. uaccess. We currently assume that spurious Overlay faults are
> handled by retrying the access [1], but this isn't the case.
> 
> Patch 1 ensures that spurious Overlay faults are indeed ignored. This
> being done, it typically isn't worth using an ISB when writing to
> POR_EL0. Patch 2 removes the remaining ISB in the signal handling code.
> 
> [...]

Applied to arm64 (for-next/misc), thanks!

[2/2] arm64: signal: Remove ISB when resetting POR_EL0
      https://git.kernel.org/arm64/c/1a665a71ef0f

-- 
Catalin