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@kernel.org>
Tested-by: Mark Brown <broonie@kernel.org>
quoted hunk ↗ jump to hunk
@@ -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.