Re: [PATCH v7 25/39] arm64/signal: Expose GCS state in signal frames

2023-12-09 Thread Thiago Jung Bauermann
Mark Brown writes: > +static int preserve_gcs_context(struct gcs_context __user *ctx) > +{ > + int err = 0; > + u64 gcspr; > + > + /* > + * We will add a cap token to the frame, include it in the > + * GCSPR_EL0 we report to support stack switching via > + * sigreturn

[PATCH v7 25/39] arm64/signal: Expose GCS state in signal frames

2023-11-22 Thread Mark Brown
Add a context for the GCS state and include it in the signal context when running on a system that supports GCS. We reuse the same flags that the prctl() uses to specify which GCS features are enabled and also provide the current GCS pointer. We do not support enabling GCS via signal return, there