From: Andreas Schwab <schwab@suse.de>
To: Florian Weimer <fweimer@redhat.com>
Cc: Simon Chopin <simon.chopin@canonical.com>, libc-alpha@sourceware.org
Subject: Re: [PATCH] Linux: Switch back to assembly syscall wrapper for prctl (bug 29770)
Date: Tue, 13 Feb 2024 13:12:48 +0100 [thread overview]
Message-ID: <mvma5o41s1r.fsf@suse.de> (raw)
In-Reply-To: <87jzn8inp6.fsf@oldenburg.str.redhat.com> (Florian Weimer's message of "Tue, 13 Feb 2024 12:54:45 +0100")
On Feb 13 2024, Florian Weimer wrote:
> “
> Commit ff026950e280bc3e9487b41b460fb31bc5b57721 ("Add a C wrapper for
> prctl [BZ #25896]") replaced the assembler wrapper with a C function.
> However, on powerpc64le-linux-gnu, the C variadic function
> implementation requires extra work in the caller to set up the parameter
> save area. Calling a function that needs a parameter save area without
> one (because the prototype used indicates the function is not variadic)
> corrupts the caller's stack. Switch back to the assembler
> implementation on most targets and only keep the C implementation for
> x86-64 x32.
> ”
That does not explain why the compiler did not set up the parameter save
area even though the declaration in <sys/prctl.h> is varadic. Do I
understand correctly that some software uses a private declaration that
is prototyped but non-variadic?
--
Andreas Schwab, SUSE Labs, schwab@suse.de
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE 1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."
next prev parent reply other threads:[~2024-02-13 12:12 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-02 21:30 Florian Weimer
2024-02-13 11:35 ` Simon Chopin
2024-02-13 11:54 ` Florian Weimer
2024-02-13 12:12 ` Andreas Schwab [this message]
2024-02-13 12:24 ` Florian Weimer
2024-02-13 12:40 ` Andreas Schwab
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=mvma5o41s1r.fsf@suse.de \
--to=schwab@suse.de \
--cc=fweimer@redhat.com \
--cc=libc-alpha@sourceware.org \
--cc=simon.chopin@canonical.com \
/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).