Re: [PATCH v5 19/30] arm64: add POE signal support

2024-10-17 Thread Kevin Brodsky
On 15/10/2024 17:01, Catalin Marinas wrote: >> We also still need to resolve Kevin's concern, which probably means >> keeping the thread's original POR around someplace. > If we fail to allocate context for POR_EL0 (or anything else), we'll > deliver a SIGSEGV. I think it's quite likely that the SI

Re: [PATCH v5 19/30] arm64: add POE signal support

2024-10-17 Thread Kevin Brodsky
On 15/10/2024 14:25, Joey Gouly wrote: > On Tue, Oct 15, 2024 at 12:41:16PM +0100, Will Deacon wrote: >> On Tue, Oct 15, 2024 at 10:59:11AM +0100, Joey Gouly wrote: >>> On Mon, Oct 14, 2024 at 06:10:23PM +0100, Will Deacon wrote: Kevin, Joey, On Wed, Oct 09, 2024 at 03:43:01PM +0100,

Re: [PATCH v5 19/30] arm64: add POE signal support

2024-10-15 Thread Catalin Marinas
On Tue, Oct 15, 2024 at 12:41:16PM +0100, Will Deacon wrote: > On Tue, Oct 15, 2024 at 10:59:11AM +0100, Joey Gouly wrote: > > On Mon, Oct 14, 2024 at 06:10:23PM +0100, Will Deacon wrote: > > > Looking a little more at this, I think we have quite a weird behaviour > > > on arm64 as it stands. It lo

Re: [PATCH v5 19/30] arm64: add POE signal support

2024-10-15 Thread Dave Martin
On Tue, Oct 15, 2024 at 12:41:16PM +0100, Will Deacon wrote: > On Tue, Oct 15, 2024 at 10:59:11AM +0100, Joey Gouly wrote: > > On Mon, Oct 14, 2024 at 06:10:23PM +0100, Will Deacon wrote: > > > Kevin, Joey, > > > > > > On Wed, Oct 09, 2024 at 03:43:01PM +0100, Will Deacon wrote: > > > > On Tue, Se

Re: [PATCH v5 19/30] arm64: add POE signal support

2024-10-15 Thread Mark Brown
On Tue, Oct 15, 2024 at 01:25:29PM +0100, Joey Gouly wrote: > On Tue, Oct 15, 2024 at 12:41:16PM +0100, Will Deacon wrote: > > if (system_supports_poe() && err == 0 && user->poe_offset) { > > ... > > which gives the wrong impression that the POR is somehow optional, even > > if th

Re: [PATCH v5 19/30] arm64: add POE signal support

2024-10-15 Thread Joey Gouly
On Tue, Oct 15, 2024 at 12:41:16PM +0100, Will Deacon wrote: > On Tue, Oct 15, 2024 at 10:59:11AM +0100, Joey Gouly wrote: > > On Mon, Oct 14, 2024 at 06:10:23PM +0100, Will Deacon wrote: > > > Kevin, Joey, > > > > > > On Wed, Oct 09, 2024 at 03:43:01PM +0100, Will Deacon wrote: > > > > On Tue, Se

Re: [PATCH v5 19/30] arm64: add POE signal support

2024-10-15 Thread Will Deacon
On Tue, Oct 15, 2024 at 10:59:11AM +0100, Joey Gouly wrote: > On Mon, Oct 14, 2024 at 06:10:23PM +0100, Will Deacon wrote: > > Kevin, Joey, > > > > On Wed, Oct 09, 2024 at 03:43:01PM +0100, Will Deacon wrote: > > > On Tue, Sep 24, 2024 at 01:27:58PM +0200, Kevin Brodsky wrote: > > > > On 22/08/202

Re: [PATCH v5 19/30] arm64: add POE signal support

2024-10-15 Thread Mark Brown
On Tue, Oct 15, 2024 at 10:59:11AM +0100, Joey Gouly wrote: > On Mon, Oct 14, 2024 at 06:10:23PM +0100, Will Deacon wrote: > > Looking a little more at this, I think we have quite a weird behaviour > > on arm64 as it stands. It looks like we rely on the signal frame to hold > > the original POR_EL

Re: [PATCH v5 19/30] arm64: add POE signal support

2024-10-15 Thread Joey Gouly
On Mon, Oct 14, 2024 at 06:10:23PM +0100, Will Deacon wrote: > Kevin, Joey, > > On Wed, Oct 09, 2024 at 03:43:01PM +0100, Will Deacon wrote: > > On Tue, Sep 24, 2024 at 01:27:58PM +0200, Kevin Brodsky wrote: > > > On 22/08/2024 17:11, Joey Gouly wrote: > > > > @@ -1178,6 +1237,9 @@ static void set

Re: [PATCH v5 19/30] arm64: add POE signal support

2024-10-14 Thread Will Deacon
Kevin, Joey, On Wed, Oct 09, 2024 at 03:43:01PM +0100, Will Deacon wrote: > On Tue, Sep 24, 2024 at 01:27:58PM +0200, Kevin Brodsky wrote: > > On 22/08/2024 17:11, Joey Gouly wrote: > > > @@ -1178,6 +1237,9 @@ static void setup_return(struct pt_regs *regs, > > > struct k_sigaction *ka, > > >

Re: [PATCH v5 19/30] arm64: add POE signal support

2024-10-09 Thread Will Deacon
Hi Kevin, On Tue, Sep 24, 2024 at 01:27:58PM +0200, Kevin Brodsky wrote: > On 22/08/2024 17:11, Joey Gouly wrote: > > @@ -1178,6 +1237,9 @@ static void setup_return(struct pt_regs *regs, struct > > k_sigaction *ka, > > sme_smstop(); > > } > > > > + if (system_supports_poe()) >

Re: [PATCH v5 19/30] arm64: add POE signal support

2024-09-24 Thread Dave Martin
On Tue, Sep 24, 2024 at 01:27:58PM +0200, Kevin Brodsky wrote: > On 22/08/2024 17:11, Joey Gouly wrote: > > @@ -1178,6 +1237,9 @@ static void setup_return(struct pt_regs *regs, struct > > k_sigaction *ka, > > sme_smstop(); > > } > > > > + if (system_supports_poe()) > > +

Re: [PATCH v5 19/30] arm64: add POE signal support

2024-09-24 Thread Kevin Brodsky
On 22/08/2024 17:11, Joey Gouly wrote: > @@ -1178,6 +1237,9 @@ static void setup_return(struct pt_regs *regs, struct > k_sigaction *ka, > sme_smstop(); > } > > + if (system_supports_poe()) > + write_sysreg_s(POR_EL0_INIT, SYS_POR_EL0); At the point where setu

[PATCH v5 19/30] arm64: add POE signal support

2024-08-22 Thread Joey Gouly
Add PKEY support to signals, by saving and restoring POR_EL0 from the stackframe. Signed-off-by: Joey Gouly Cc: Catalin Marinas Cc: Will Deacon Reviewed-by: Mark Brown Acked-by: Szabolcs Nagy Reviewed-by: Catalin Marinas Reviewed-by: Anshuman Khandual --- arch/arm64/include/uapi/asm/sigco