[PATCH] x32: Switch back to assembly syscall wrapper for prctl

Alejandro Colomar alx@kernel.org
Sun Dec 7 12:34:36 GMT 2025


Hi H.J.,

On Sun, Dec 07, 2025 at 11:52:08AM +0800, H.J. Lu wrote:
> 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.

Thanks!  Would you mind adding the following tag?

	Reported-by: Alejandro Colomar <alx@kernel.org>

Have a lovely day!
Alex

-- 
<https://www.alejandro-colomar.es>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/libc-alpha/attachments/20251207/c362cc2b/attachment.sig>


More information about the Libc-alpha mailing list