Re: [PATCH glibc 5/9] glibc: Perform rseq(2) registration at C startup and thread creation (v17)

From: Florian Weimer
Date: Wed Apr 29 2020 - 08:19:55 EST


* Mathieu Desnoyers:

> ----- On Apr 28, 2020, at 8:33 AM, Mathieu Desnoyers mathieu.desnoyers@xxxxxxxxxxxx wrote:
>
>> ----- On Apr 28, 2020, at 8:02 AM, Florian Weimer fw@xxxxxxxxxxxxx wrote:
>>
> [...]
>>>
>>>> x32 should not be an issue as explained above, so I'm very open to
>>>> add this "uptr" for user-space only.
>>>
>>> Okay, then please use anonymous unions and structs as necessary, to
>>> ensure that the uptr field can be reached on all platforms in the same
>>> way.
>>
>> OK, will do!
>
> What I came up with looks like this. User-space can use rseq_cs.uptr.ptr
> both on 32-bit and 64-bit to update the pointer:

Agreed, this should work.