Re: [PATCH v3 1/4] arm64/gcs: release GCS on failed fork
From: Mark Brown
Date: Wed Oct 28 2026 - 15:08:58 EST
On Wed, Oct 28, 2026 at 12:43:12PM -0300, Iván Ezequiel Rodriguez wrote:
> copy_thread() can map a CLONE_VM GCS and still return 0. A later
> copy_process() failure calls exit_thread(), but arm64 did not
> implement it, so the VMA stayed in the parent's mm. Wire
> HAVE_EXIT_THREAD to gcs_free().
One extremely minor nit below, I verified that this fails with the
current kernel and that the kernel change causes it to pass so with or
without dealing with that:
Reviewed-by: Mark Brown <broonie@xxxxxxxxxx>
Tested-by: Mark Brown <broonie@xxxxxxxxxx>
> @@ -328,6 +335,7 @@ static int copy_thread_gcs(struct task_struct *p,
> {
> return 0;
> }
> +static void gcs_reset_thread(struct task_struct *task) { }
>
This looks like there's a missing blank line but it fits in with the
missing blank before the stub for copy_thread_gcs(). Possibly slightly
neater to put this before there next to the similar flush_gcs() stub but
meh.
Attachment:
signature.asc
Description: PGP signature