public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: "H.J. Lu" <hjl.tools@gmail.com>
To: Florian Weimer <fweimer@redhat.com>
Cc: libc-alpha@sourceware.org
Subject: Re: [PATCH] Linux: Support non-variadic calls to prctl (bug 29770)
Date: Thu, 10 Nov 2022 11:55:22 -0800	[thread overview]
Message-ID: <CAMe9rOoSDnQo2Uea95LAo_OD_mLLU0HJUsYASsxy4UAstqcyVA@mail.gmail.com> (raw)
In-Reply-To: <87cz9usjn3.fsf@oldenburg.str.redhat.com>

On Thu, Nov 10, 2022 at 11:18 AM Florian Weimer <fweimer@redhat.com> wrote:
>
> * H. J. Lu:
>
> > prctl is an exported variadic function.  Do we need to keep it?
>
> Do you mean whether we should keep it as a variadic function or turn it
> into a function with a fixed argument list?

Yes.

> Unfortunately the types and number of arguments vary between the
> sub-operations.  Pretty much any application calling prctl would have to
> be changed.  It's just syscall by another name (and with a fixed number
> of course).
>

<sys/prctl.h> has

extern int prctl (int __option, ...) __THROW;

Your change works for

int prctl(int option, unsigned long arg2, unsigned long arg3,
                 unsigned long arg4, unsigned long arg5);

prtcl (...);

But it breaks

#include <sys/prctl.h>

prctl (...);

H.J.
-- 
H.J.

  reply	other threads:[~2022-11-10 19:56 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-10 16:07 Florian Weimer
2022-11-10 18:43 ` H.J. Lu
2022-11-10 19:18   ` Florian Weimer
2022-11-10 19:55     ` H.J. Lu [this message]
2022-11-10 20:08       ` Florian Weimer
2022-11-11 13:27         ` Szabolcs Nagy
2023-09-04 14:46           ` Florian Weimer
2023-09-04 16:37             ` Szabolcs Nagy
2022-11-10 20:34 ` H.J. Lu
2022-11-10 20:41   ` Florian Weimer

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=CAMe9rOoSDnQo2Uea95LAo_OD_mLLU0HJUsYASsxy4UAstqcyVA@mail.gmail.com \
    --to=hjl.tools@gmail.com \
    --cc=fweimer@redhat.com \
    --cc=libc-alpha@sourceware.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).