Re: [PATCH v3 02/23] rseq: Introduce extensible rseq ABI

From: Florian Weimer
Date: Wed Aug 10 2022 - 02:34:13 EST


* Mathieu Desnoyers:

> Introduce the extensible rseq ABI, where the feature size supported by
> the kernel and the required alignment are communicated to user-space
> through ELF auxiliary vectors.
>
> This allows user-space to call rseq registration with a rseq_len of
> either 32 bytes for the original struct rseq size (which includes
> padding), or larger.
>
> If rseq_len is larger than 32 bytes, then it must be large enough to
> contain the feature size communicated to user-space through ELF
> auxiliary vectors.

I don't think this works with the glibc extension mechanism because
__rseq_size does not change until the padding is exhausted.

I think you'll need to add the suggested flags to the auxiliary vector,
and then we can use that during registration and also communicate these
flags via __rseq_flags.

Size and alignment can be stored in a single auxiliary vector entry.

Thanks,
Florian