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

Yury Khrustalev yury.khrustalev@arm.com
Thu Jan 16 10:34:12 GMT 2025


On Wed, Jan 15, 2025 at 11:02:00AM -0300, Adhemerval Zanella Netto wrote:
> 
> > +#define GCS_MAGIC 0x47435300
> > +
> > +/* Reserved for future use.  */
> > +static __thread void __attribute__ ((unused)) *__gcs = NULL;
> 
> There is no need to reserve this, specially because we are not sure
> which strategy we will use (and this adds extra TLS size for libc.so).

OK, I will remove it as discussed. Thanks.

> > +  unsigned long flags = SHADOW_STACK_SET_MARKER | SHADOW_STACK_SET_TOKEN;
> > +  void *base = map_shadow_stack (NULL, size, flags);
> > +  if (base == (void *) -1)
> 
> Maybe use MAP_FAILED here? 

Will fix in the next version. Thanks.

Kind regards,
Yury



More information about the Libc-alpha mailing list