[PATCH] x32: Switch back to assembly syscall wrapper for prctl
Florian Weimer
fweimer@redhat.com
Sun Dec 7 09:41:31 GMT 2025
* H. J. Lu:
> On Thu, Dec 4, 2025 at 10:06 PM Adhemerval Zanella Netto
> <adhemerval.zanella@linaro.org> wrote:
>>
>> The x32 and or1k (which also uses similar implementation) does seems broken
>> without checking the 'option' argument to see which arg we can va_arg.
>>
>> The problem is adding this logic on libc will add some forward-compatibility
>> that we try to avoid (newer kernel prctl additions might now work correctly).
>>
>> I am not sure why we haven't switch x32 back to the assembly wrappers
>> with 6a04404521ac4119ae36827eeb288ea84eee7cf6 fix (BZ#29770). H.J, can
>> use remove the x32 C version (and also or1k as well)?
>
> Since the variadic prctl function takes at most 5 integer arguments which
> are passed in the same integer registers on x32 as the function with 5
> integer arguments, we can safely use assembly syscall wrapper for prctl
> for x32.
The C implementation clears the upper 32 bits of registers. Does the
assembler wrapper do the same?
Thanks,
Florian
More information about the Libc-alpha
mailing list