[PATCH] x32: Switch back to assembly syscall wrapper for prctl
H.J. Lu
hjl.tools@gmail.com
Sun Dec 7 03:52:08 GMT 2025
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.
Tested on x32. I leave or1k alone since I don't know if it is safe to
do the same.
--
H.J.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-x32-Switch-back-to-assembly-syscall-wrapper-for-prct.patch
Type: text/x-patch
Size: 2569 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/libc-alpha/attachments/20251207/58e822f9/attachment.bin>
More information about the Libc-alpha
mailing list