Re: [PATCH v7 02/39] prctl: arch-agnostic prctl for shadow stack

2023-12-13 Thread Mark Brown
On Wed, Dec 13, 2023 at 11:43:49AM -0800, Deepak Gupta wrote: > On Wed, Dec 13, 2023 at 5:37 AM Mark Brown wrote: > > On Tue, Dec 12, 2023 at 04:50:38PM -0800, Deepak Gupta wrote: > > > How will it do that (currently _ENABLE is married to _WRITE and _PUSH) ? > > That's feeling moderately firmly

Re: [PATCH v7 02/39] prctl: arch-agnostic prctl for shadow stack

2023-12-13 Thread Deepak Gupta
On Wed, Dec 13, 2023 at 5:37 AM Mark Brown wrote: > > On Tue, Dec 12, 2023 at 04:50:38PM -0800, Deepak Gupta wrote: > > > A theoretical scenario (no current workloads should've this case > > because no shadow stack) > > > - User mode did _ENABLE on the main thread. Shadow stack was allocated > > f

Re: [PATCH v7 02/39] prctl: arch-agnostic prctl for shadow stack

2023-12-13 Thread Mark Brown
On Tue, Dec 12, 2023 at 09:22:59PM +, Edgecombe, Rick P wrote: > On Tue, 2023-12-12 at 20:26 +, Mark Brown wrote: > > In general if things have a need to get at prctl()s via ptrace we > > should > > just fix that, at least for arm64 there's things like the vector > > lengths > > that are c

Re: [PATCH v7 02/39] prctl: arch-agnostic prctl for shadow stack

2023-12-13 Thread Mark Brown
On Tue, Dec 12, 2023 at 04:50:38PM -0800, Deepak Gupta wrote: > A theoretical scenario (no current workloads should've this case > because no shadow stack) > - User mode did _ENABLE on the main thread. Shadow stack was allocated > for the current > thread. > - User mode created a bunch worker t

Re: [PATCH v7 02/39] prctl: arch-agnostic prctl for shadow stack

2023-12-12 Thread Deepak Gupta
On Tue, Dec 12, 2023 at 11:23 AM Mark Brown wrote: > > On Tue, Dec 12, 2023 at 11:17:11AM -0800, Deepak Gupta wrote: > > On Wed, Nov 22, 2023 at 1:43 AM Mark Brown wrote: > > > > +/* > > > + * Set the current shadow stack configuration. Enabling the shadow > > > + * stack will cause a shadow sta

Re: [PATCH v7 02/39] prctl: arch-agnostic prctl for shadow stack

2023-12-12 Thread Edgecombe, Rick P
+Mike, who did the CRIU work Re: https://lore.kernel.org/lkml/e1362732ba86990b7707d3f5b785358b77c5f896.ca...@intel.com/ On Tue, 2023-12-12 at 20:26 +, Mark Brown wrote: > The set of locked features is read/write via ptrace in my arm64 > series, > that's architecture specific unfortunately but

Re: [PATCH v7 02/39] prctl: arch-agnostic prctl for shadow stack

2023-12-12 Thread Mark Brown
On Tue, Dec 12, 2023 at 08:17:09PM +, Edgecombe, Rick P wrote: > On Wed, 2023-11-22 at 09:42 +, Mark Brown wrote: > > These features are expected to be inherited by new threads and > > cleared > > on exec(), unknown features should be rejected for enable but > > accepted > > for locking (i

Re: [PATCH v7 02/39] prctl: arch-agnostic prctl for shadow stack

2023-12-12 Thread Edgecombe, Rick P
On Wed, 2023-11-22 at 09:42 +, Mark Brown wrote: > These features are expected to be inherited by new threads and > cleared > on exec(), unknown features should be rejected for enable but > accepted > for locking (in order to allow for future proofing). The reason why I stuck with arch_prctl w

Re: [PATCH v7 02/39] prctl: arch-agnostic prctl for shadow stack

2023-12-12 Thread Mark Brown
On Tue, Dec 12, 2023 at 11:17:11AM -0800, Deepak Gupta wrote: > On Wed, Nov 22, 2023 at 1:43 AM Mark Brown wrote: > > +/* > > + * Set the current shadow stack configuration. Enabling the shadow > > + * stack will cause a shadow stack to be allocated for the thread. > > + */ > > +#define PR_SET_S

Re: [PATCH v7 02/39] prctl: arch-agnostic prctl for shadow stack

2023-12-12 Thread Deepak Gupta
On Wed, Nov 22, 2023 at 1:43 AM Mark Brown wrote: > > Three architectures (x86, aarch64, riscv) have announced support for > shadow stacks with fairly similar functionality. While x86 is using > arch_prctl() to control the functionality neither arm64 nor riscv uses > that interface so this patch

[PATCH v7 02/39] prctl: arch-agnostic prctl for shadow stack

2023-11-22 Thread Mark Brown
Three architectures (x86, aarch64, riscv) have announced support for shadow stacks with fairly similar functionality. While x86 is using arch_prctl() to control the functionality neither arm64 nor riscv uses that interface so this patch adds arch-agnostic prctl() support to get and set status of s