Re: [PATCH v5 16/30] arm64: handle PKEY/POE faults

2024-09-03 Thread Joey Gouly
On Tue, Sep 03, 2024 at 03:50:46PM +0100, Joey Gouly wrote: > On Thu, Aug 29, 2024 at 06:55:07PM +0100, Mark Brown wrote: > > On Thu, Aug 22, 2024 at 04:10:59PM +0100, Joey Gouly wrote: > > > > > +static bool fault_from_pkey(unsigned long esr, struct vm_area_struct > > > *vma, > > > +

Re: [PATCH v5 16/30] arm64: handle PKEY/POE faults

2024-09-03 Thread Joey Gouly
On Thu, Aug 29, 2024 at 06:55:07PM +0100, Mark Brown wrote: > On Thu, Aug 22, 2024 at 04:10:59PM +0100, Joey Gouly wrote: > > > +static bool fault_from_pkey(unsigned long esr, struct vm_area_struct *vma, > > + unsigned int mm_flags) > > +{ > > + unsigned long iss2 = ESR_ELx_ISS

Re: [PATCH v5 16/30] arm64: handle PKEY/POE faults

2024-08-29 Thread Mark Brown
On Thu, Aug 22, 2024 at 04:10:59PM +0100, Joey Gouly wrote: > +static bool fault_from_pkey(unsigned long esr, struct vm_area_struct *vma, > + unsigned int mm_flags) > +{ > + unsigned long iss2 = ESR_ELx_ISS2(esr); > + > + if (!system_supports_poe()) > + retu

[PATCH v5 16/30] arm64: handle PKEY/POE faults

2024-08-22 Thread Joey Gouly
If a memory fault occurs that is due to an overlay/pkey fault, report that to userspace with a SEGV_PKUERR. Signed-off-by: Joey Gouly Cc: Catalin Marinas Cc: Will Deacon Reviewed-by: Catalin Marinas --- arch/arm64/include/asm/traps.h | 1 + arch/arm64/kernel/traps.c | 6 arch/arm6