Re: [PATCH v2 1/4] arm64/gcs: release GCS on failed fork

From: Mark Brown

Date: Wed Oct 28 2026 - 10:53:38 EST


On Tue, Oct 20, 2026 at 03:19:30PM -0300, Iván Ezequiel Rodriguez wrote:

> +++ b/arch/arm64/include/asm/gcs.h
> @@ -67,6 +67,13 @@ void gcs_preserve_current_state(void);
> unsigned long gcs_alloc_thread_stack(struct task_struct *tsk,
> const struct kernel_clone_args *args);
>
> +static inline void gcs_reset_thread(struct task_struct *task)
> +{
> + task->thread.gcs_base = 0;
> + task->thread.gcs_size = 0;
> + task->thread.gcspr_el0 = 0;
> +}
> +

The other process.c specific helpers are all in process.c. Otherwise
this looks OK, though I'm still not clear about the analysis for why
x86 is not also affected.

Note that since you sent this in reply to the old thread is was buried
in my inbox.

Attachment: signature.asc
Description: PGP signature