[PATCH v8 08/20] aarch64: Add GCS support for makecontext

Yury Khrustalev yury.khrustalev@arm.com
Wed Jan 15 14:34:07 GMT 2025


On Wed, Jan 15, 2025 at 11:02:00AM -0300, Adhemerval Zanella Netto wrote:
> 
> Afaik this is what x86_64 shadowstack does with __allocate_shadow_stack,
> and this is explicit on edb5e0c8f915a798629717b5680a852c8bb3db25.  Not
> sure why it has been a problem yet for x86, but we might need to revise
> it later (maybe because shadowstack has not been widly deployed).
> 
> LGTM, some nits below.
> 
> Reviewed-by: Adhemerval Zanella  <adhemerval.zanella@linaro.org>
> 
> ...
> > +  void *base = map_shadow_stack (NULL, size, flags);
> > +  if (base == (void *) -1)
> 
> Maybe use MAP_FAILED here? 

This is fixed in the following commit [1] where I use MAP_FAILED.

[1] https://inbox.sourceware.org/libc-alpha/20250114160328.2031684-19-yury.khrustalev@arm.com/

Thanks,
Yury



More information about the Libc-alpha mailing list