[PATCH v7 09/23] aarch64: Try to free the GCS of makecontext
Yury Khrustalev
yury.khrustalev@arm.com
Tue Jan 14 13:18:10 GMT 2025
Hi Adhemerval,
On Mon, Jan 13, 2025 at 02:45:03PM -0300, Adhemerval Zanella Netto wrote:
>
> > Looking deeper into this, I realise that a proper solution might take some time
> > to implement and test and it will likley be quite intrusive to the existing code
> > and may potentially affect common code used by other targets.
> >
> > As an option, would you think it might be acceptable not to deallocate shadow
> > stacks allocated by makecontext? We can address this after the upcoming Glibc
> > release with a proper solution.
>
> The mmap leaking is a QoI problem, but I think it should not add security issue.
> And it should not happen on any current deployment, and since you are the aarch64
> maintainer I won't block it.
I will send updated patch series shortly addressing all the comments and removing
this patch "[PATCH v7 09/23] aarch64: Try to free the GCS of makecontext" from the
series.
I will add a TODO comment in the code. However, I'd like to document this properly.
Would you recommend how we can describe the current state of makecontext() when GCS
is enabled (meaning that allocated shadow stacks will remain mapped even after a
thread using them exits)?
AFAIK, other targets don't munmap() this memory too, at least this is what I have
found in the code.
Thanks,
Yury
More information about the Libc-alpha
mailing list