Re: [PATCH v4 18/29] arm64: add POE signal support

2024-08-20 Thread Dave Martin
On Tue, Aug 20, 2024 at 03:06:06PM +0100, Joey Gouly wrote: > On Tue, Aug 20, 2024 at 02:54:50PM +0100, Dave Martin wrote: > > On Tue, Aug 20, 2024 at 10:54:41AM +0100, Joey Gouly wrote: > > > On Mon, Aug 19, 2024 at 06:09:06PM +0100, Catalin Marinas wrote: > > > > On Thu, Aug 15, 2024 at 04:09:26P

Re: [PATCH v4 18/29] arm64: add POE signal support

2024-08-20 Thread Joey Gouly
On Tue, Aug 20, 2024 at 02:54:50PM +0100, Dave Martin wrote: > On Tue, Aug 20, 2024 at 10:54:41AM +0100, Joey Gouly wrote: > > On Mon, Aug 19, 2024 at 06:09:06PM +0100, Catalin Marinas wrote: > > > On Thu, Aug 15, 2024 at 04:09:26PM +0100, Dave P Martin wrote: > > > > On Thu, Aug 15, 2024 at 02:18:

Re: [PATCH v4 18/29] arm64: add POE signal support

2024-08-20 Thread Dave Martin
On Tue, Aug 20, 2024 at 10:54:41AM +0100, Joey Gouly wrote: > On Mon, Aug 19, 2024 at 06:09:06PM +0100, Catalin Marinas wrote: > > On Thu, Aug 15, 2024 at 04:09:26PM +0100, Dave P Martin wrote: > > > On Thu, Aug 15, 2024 at 02:18:15PM +0100, Joey Gouly wrote: > > > > That's a lot of words to say, o

Re: [PATCH v4 18/29] arm64: add POE signal support

2024-08-20 Thread Joey Gouly
On Mon, Aug 19, 2024 at 06:09:06PM +0100, Catalin Marinas wrote: > On Thu, Aug 15, 2024 at 04:09:26PM +0100, Dave P Martin wrote: > > On Thu, Aug 15, 2024 at 02:18:15PM +0100, Joey Gouly wrote: > > > That's a lot of words to say, or ask, do you agree with the approach of > > > only > > > saving PO

Re: [PATCH v4 18/29] arm64: add POE signal support

2024-08-19 Thread Catalin Marinas
On Thu, Aug 15, 2024 at 04:09:26PM +0100, Dave P Martin wrote: > On Thu, Aug 15, 2024 at 02:18:15PM +0100, Joey Gouly wrote: > > That's a lot of words to say, or ask, do you agree with the approach of only > > saving POR_EL0 in the signal frame if num_allocated_pkeys() > 1? > > > > Thanks, > > Joe

Re: [PATCH v4 18/29] arm64: add POE signal support

2024-08-15 Thread Mark Brown
On Thu, Aug 15, 2024 at 04:09:26PM +0100, Dave Martin wrote: > I'm coming round to the view that trying to provide absolute guarantees > about the signal frame size is unsustainable. x86 didn't, and got away > with it for some time... Maybe we should just get rid of the relevant > comments in he

Re: [PATCH v4 18/29] arm64: add POE signal support

2024-08-15 Thread Dave Martin
On Thu, Aug 15, 2024 at 02:18:15PM +0100, Joey Gouly wrote: > Hi Catalin, > > On Wed, Aug 14, 2024 at 04:03:47PM +0100, Catalin Marinas wrote: > > Hi Joey, > > > > On Tue, Aug 06, 2024 at 03:31:03PM +0100, Joey Gouly wrote: > > > diff --git arch/arm64/kernel/signal.c arch/arm64/kernel/signal.c >

Re: [PATCH v4 18/29] arm64: add POE signal support

2024-08-15 Thread Joey Gouly
Hi Catalin, On Wed, Aug 14, 2024 at 04:03:47PM +0100, Catalin Marinas wrote: > Hi Joey, > > On Tue, Aug 06, 2024 at 03:31:03PM +0100, Joey Gouly wrote: > > diff --git arch/arm64/kernel/signal.c arch/arm64/kernel/signal.c > > index 561986947530..ca7d4e0be275 100644 > > --- arch/arm64/kernel/signal

Re: [PATCH v4 18/29] arm64: add POE signal support

2024-08-14 Thread Catalin Marinas
Hi Joey, On Tue, Aug 06, 2024 at 03:31:03PM +0100, Joey Gouly wrote: > diff --git arch/arm64/kernel/signal.c arch/arm64/kernel/signal.c > index 561986947530..ca7d4e0be275 100644 > --- arch/arm64/kernel/signal.c > +++ arch/arm64/kernel/signal.c > @@ -1024,7 +1025,10 @@ static int setup_sigframe_lay

Re: [PATCH v4 18/29] arm64: add POE signal support

2024-08-06 Thread Dave Martin
On Tue, Aug 06, 2024 at 03:31:03PM +0100, Joey Gouly wrote: > On Tue, Aug 06, 2024 at 11:35:32AM +0100, Joey Gouly wrote: > > On Thu, Aug 01, 2024 at 05:22:45PM +0100, Dave Martin wrote: > > > On Thu, Aug 01, 2024 at 04:54:41PM +0100, Joey Gouly wrote: > > > > On Thu, Jul 25, 2024 at 05:00:18PM +01

Re: [PATCH v4 18/29] arm64: add POE signal support

2024-08-06 Thread Joey Gouly
On Tue, Aug 06, 2024 at 11:35:32AM +0100, Joey Gouly wrote: > On Thu, Aug 01, 2024 at 05:22:45PM +0100, Dave Martin wrote: > > On Thu, Aug 01, 2024 at 04:54:41PM +0100, Joey Gouly wrote: > > > On Thu, Jul 25, 2024 at 05:00:18PM +0100, Dave Martin wrote: > > > > Hi, > > > > > > > > On Fri, May 03,

Re: [PATCH v4 18/29] arm64: add POE signal support

2024-08-06 Thread Joey Gouly
On Thu, Aug 01, 2024 at 05:22:45PM +0100, Dave Martin wrote: > On Thu, Aug 01, 2024 at 04:54:41PM +0100, Joey Gouly wrote: > > On Thu, Jul 25, 2024 at 05:00:18PM +0100, Dave Martin wrote: > > > Hi, > > > > > > On Fri, May 03, 2024 at 02:01:36PM +0100, Joey Gouly wrote: > > > > Add PKEY support to

Re: [PATCH v4 18/29] arm64: add POE signal support

2024-08-01 Thread Dave Martin
On Thu, Aug 01, 2024 at 04:54:41PM +0100, Joey Gouly wrote: > On Thu, Jul 25, 2024 at 05:00:18PM +0100, Dave Martin wrote: > > Hi, > > > > On Fri, May 03, 2024 at 02:01:36PM +0100, Joey Gouly wrote: > > > Add PKEY support to signals, by saving and restoring POR_EL0 from the > > > stackframe. > >

Re: [PATCH v4 18/29] arm64: add POE signal support

2024-08-01 Thread Joey Gouly
On Thu, Jul 25, 2024 at 05:00:18PM +0100, Dave Martin wrote: > Hi, > > On Fri, May 03, 2024 at 02:01:36PM +0100, Joey Gouly wrote: > > Add PKEY support to signals, by saving and restoring POR_EL0 from the > > stackframe. > > > > Signed-off-by: Joey Gouly > > Cc: Catalin Marinas > > Cc: Will De

Re: [PATCH v4 18/29] arm64: add POE signal support

2024-07-29 Thread Mark Brown
On Mon, Jul 29, 2024 at 03:27:11PM +0100, Dave Martin wrote: > On Fri, Jul 26, 2024 at 06:39:27PM +0100, Mark Brown wrote: > > Yes, though that would mean if we had to generate any register in there > > we'd always have to generate at least as many entries as whatever number > > it got assigned wh

Re: [PATCH v4 18/29] arm64: add POE signal support

2024-07-29 Thread Dave Martin
On Fri, Jul 26, 2024 at 06:39:27PM +0100, Mark Brown wrote: > On Fri, Jul 26, 2024 at 05:14:01PM +0100, Dave Martin wrote: > > On Thu, Jul 25, 2024 at 07:11:41PM +0100, Mark Brown wrote: > > > > That'd have to be a variably sized structure with pairs of sysreg > > > ID/value items in it I think wh

Re: [PATCH v4 18/29] arm64: add POE signal support

2024-07-26 Thread Mark Brown
On Fri, Jul 26, 2024 at 05:14:01PM +0100, Dave Martin wrote: > On Thu, Jul 25, 2024 at 07:11:41PM +0100, Mark Brown wrote: > > That'd have to be a variably sized structure with pairs of sysreg > > ID/value items in it I think which would be a bit of a pain to implement > > but doable. The per-rec

Re: [PATCH v4 18/29] arm64: add POE signal support

2024-07-26 Thread Dave Martin
On Thu, Jul 25, 2024 at 07:11:41PM +0100, Mark Brown wrote: > On Thu, Jul 25, 2024 at 04:58:27PM +0100, Dave Martin wrote: > > > I'll post a draft patch separately, since I think the update could > > benefit from separate discussion, but my back-of-the-envelope > > calculation suggests that (befor

Re: [PATCH v4 18/29] arm64: add POE signal support

2024-07-25 Thread Mark Brown
On Thu, Jul 25, 2024 at 04:58:27PM +0100, Dave Martin wrote: > I'll post a draft patch separately, since I think the update could > benefit from separate discussion, but my back-of-the-envelope > calculation suggests that (before this patch) we are down to 0x90 > bytes of free space (i.e., over 96

Re: [PATCH v4 18/29] arm64: add POE signal support

2024-07-25 Thread Dave Martin
Hi, On Fri, May 03, 2024 at 02:01:36PM +0100, Joey Gouly wrote: > 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 > --- > arch/arm64

Re: [PATCH v4 18/29] arm64: add POE signal support

2024-07-25 Thread Dave Martin
On Mon, Jun 03, 2024 at 02:51:46PM +0530, Amit Daniel Kachhap wrote: > > > On 5/31/24 22:09, Mark Brown wrote: > > On Tue, May 28, 2024 at 12:26:54PM +0530, Amit Daniel Kachhap wrote: > > > On 5/3/24 18:31, Joey Gouly wrote: > > > > > > +#define POE_MAGIC 0x504f4530 > > > > +struct poe_cont

Re: [PATCH v4 18/29] arm64: add POE signal support

2024-07-22 Thread Anshuman Khandual
On 5/3/24 18:31, Joey Gouly wrote: > 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: Anshuman Khandual > --- > arc

Re: [PATCH v4 18/29] arm64: add POE signal support

2024-07-09 Thread Kevin Brodsky
On 03/05/2024 15:01, Joey Gouly wrote: > @@ -1020,6 +1060,15 @@ static int setup_sigframe(struct > rt_sigframe_user_layout *user, > __put_user_error(current->thread.fault_code, &esr_ctx->esr, > err); > } > > + if (system_supports_poe() && err == 0 && user->poe_offset) {

Re: [PATCH v4 18/29] arm64: add POE signal support

2024-07-05 Thread Catalin Marinas
On Fri, May 03, 2024 at 02:01:36PM +0100, Joey Gouly wrote: > 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 Ma

Re: [PATCH v4 18/29] arm64: add POE signal support

2024-06-03 Thread Amit Daniel Kachhap
On 5/31/24 22:09, Mark Brown wrote: On Tue, May 28, 2024 at 12:26:54PM +0530, Amit Daniel Kachhap wrote: On 5/3/24 18:31, Joey Gouly wrote: +#define POE_MAGIC 0x504f4530 +struct poe_context { + struct _aarch64_ctx head; + __u64 por_el0; +}; There is a comment section

Re: [PATCH v4 18/29] arm64: add POE signal support

2024-05-31 Thread Mark Brown
On Tue, May 28, 2024 at 12:26:54PM +0530, Amit Daniel Kachhap wrote: > On 5/3/24 18:31, Joey Gouly wrote: > > +#define POE_MAGIC 0x504f4530 > > +struct poe_context { > > + struct _aarch64_ctx head; > > + __u64 por_el0; > > +}; > There is a comment section in the beginning which mentions the

Re: [PATCH v4 18/29] arm64: add POE signal support

2024-05-30 Thread Amit Daniel Kachhap
On 5/3/24 18:31, Joey Gouly wrote: 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 --- arch/arm64/include/uapi/asm/sigcontext.h | 7 a

[PATCH v4 18/29] arm64: add POE signal support

2024-05-03 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 --- arch/arm64/include/uapi/asm/sigcontext.h | 7 arch/arm64/kernel/signal.c |