All of lore.kernel.org
 help / color / mirror / Atom feed
From: Florian Weimer <fweimer@redhat.com>
To: "H.J. Lu" <hjl.tools@gmail.com>
Cc: "Adhemerval Zanella Netto" <adhemerval.zanella@linaro.org>,
	"Alejandro Colomar" <alx@kernel.org>,
	"Thomas Weißschuh" <thomas@t-8ch.de>,
	util-linux@vger.kernel.org, "Xi Ruoyao" <xry111@xry111.site>,
	"GNU C Library" <libc-alpha@sourceware.org>
Subject: Re: [PATCH v2] x32: Implement prctl in assembly
Date: Mon, 08 Dec 2025 09:10:56 +0100	[thread overview]
Message-ID: <lhuzf7tl7fz.fsf@oldenburg.str.redhat.com> (raw)
In-Reply-To: <CAMe9rOqMGabug88Qm7p22Qk+oMOk9YdbAQeyb77rL3ot4HS1UA@mail.gmail.com> (H. J. Lu's message of "Mon, 8 Dec 2025 09:48:55 +0800")

* H. J. Lu:
> Here is the v2 patch to implement prctl in assembly for x32.
>
> 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 use assembly for prctl.  Since upper 32-bits in
> the last 4 arguments of prctl must be cleared to match the x32 prctl
> syscall interface where the last 4 arguments are unsigned 64 bit longs,
> implement prctl in assembly to clear upper 32-bits in the last 4 arguments
> and add a test to verify it.

What's the advantage of the assembler implementation over the C
implementation?  I'm missing the context for this change.

Thanks,
Florian


  reply	other threads:[~2025-12-08  8:11 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-01  9:31 [PATCH v1] Call prctl(2) with long integers, specify 5 arguments, and avoid casts Alejandro Colomar
2024-06-01 11:05 ` Thomas Weißschuh
2024-06-01 12:23   ` Alejandro Colomar
2024-06-01 19:32     ` Alejandro Colomar
2025-12-04 14:06     ` Adhemerval Zanella Netto
2025-12-07  3:52       ` [PATCH] x32: Switch back to assembly syscall wrapper for prctl H.J. Lu
2025-12-07  9:41         ` Florian Weimer
2025-12-08  1:48           ` [PATCH v2] x32: Implement prctl in assembly H.J. Lu
2025-12-08  8:10             ` Florian Weimer [this message]
2025-12-08  9:01               ` H.J. Lu
2025-12-08  9:09                 ` Florian Weimer
2025-12-08 11:47                   ` Adhemerval Zanella Netto
2025-12-08 14:25                     ` Florian Weimer
2025-12-08 22:41                       ` [PATCH v3] " H.J. Lu
2025-12-07 12:34         ` [PATCH] x32: Switch back to assembly syscall wrapper for prctl Alejandro Colomar
2024-06-06  7:21 ` [PATCH v1] Call prctl(2) with long integers, specify 5 arguments, and avoid casts Karel Zak
2025-12-03 20:50 ` [PATCH v2 0/1] Call prctl(2) with signed long integers, " Alejandro Colomar
2025-12-03 20:50   ` [PATCH v2 1/1] " Alejandro Colomar
2025-12-03 21:01   ` [PATCH v2 0/1] " Alejandro Colomar
2025-12-03 22:12     ` Thomas Weißschuh
2025-12-03 22:36       ` Alejandro Colomar

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=lhuzf7tl7fz.fsf@oldenburg.str.redhat.com \
    --to=fweimer@redhat.com \
    --cc=adhemerval.zanella@linaro.org \
    --cc=alx@kernel.org \
    --cc=hjl.tools@gmail.com \
    --cc=libc-alpha@sourceware.org \
    --cc=thomas@t-8ch.de \
    --cc=util-linux@vger.kernel.org \
    --cc=xry111@xry111.site \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.