Re: [PATCH v10 21/40] arm64/gcs: Implement shadow stack prctl() interface

2024-08-21 Thread Mark Brown
On Wed, Aug 21, 2024 at 01:54:33PM +0100, Catalin Marinas wrote: > Otherwise it looks fine. > Reviewed-by: Catalin Marinas I've also added: + + /* Ensure we remember GCSPR_EL0 if we're disabling. */ + if (task_gcs_el0_enabled(current)) + current->thread.gcspr_el0 = re

Re: [PATCH v10 21/40] arm64/gcs: Implement shadow stack prctl() interface

2024-08-21 Thread Catalin Marinas
On Thu, Aug 01, 2024 at 01:06:48PM +0100, Mark Brown wrote: > Implement the architecture neutral prtctl() interface for setting the s/prtctl/prctl/ > +int arch_set_shadow_stack_status(struct task_struct *task, unsigned long arg) > +{ > + unsigned long gcs, size; > + int ret; > + > + i

[PATCH v10 21/40] arm64/gcs: Implement shadow stack prctl() interface

2024-08-01 Thread Mark Brown
Implement the architecture neutral prtctl() interface for setting the shadow stack status, this supports setting and reading the current GCS configuration for the current thread. Userspace can enable basic GCS functionality and additionally also support for GCS pushes and arbitrary GCS stores. It