mailing list of musl libc
 help / color / mirror / code / Atom feed
From: Rich Felker <dalias@libc.org>
To: Nicholas Piggin <npiggin@gmail.com>
Cc: linuxppc-dev@lists.ozlabs.org, binutils@sourceware.org,
	libc-alpha@sourceware.org, libc-dev@lists.llvm.org,
	musl@lists.openwall.com,
	Adhemerval Zanella <adhemerval.zanella@linaro.org>
Subject: Re: [musl] New powerpc vdso calling convention
Date: Sat, 25 Apr 2020 01:40:19 -0400	[thread overview]
Message-ID: <20200425054019.GI11469@brightrain.aerifal.cx> (raw)
In-Reply-To: <1587790194.w180xsw5be.astroid@bobo.none>

On Sat, Apr 25, 2020 at 03:22:27PM +1000, Nicholas Piggin wrote:
> As noted in the 'scv' thread, powerpc's vdso calling convention does not 
> match the C ELF ABI calling convention (or the proposed scv convention).
> I think we could implement a new ABI by basically duplicating function
> entry points with different names.
> 
> The ELF v2 ABI convention would suit it well, because the caller already
> requires the function address for ctr, so having it in r12 will 
> eliminate the need for address calculation, which suits the vdso data 
> page access.
> 
> Is there a need for ELF v1 specific calls as well, or could those just be 
> deprecated and remain on existing functions or required to use the ELF 
> v2 calls using asm wrappers?

musl doesn't use ELFv1, but my expectation would be for the kernel to
provide an ELFv1 VDSO to an ELFv1 process. (I'm pretty sure the kernel
has to be aware of this property of the process-image (executable
file) since it affects how signals work.)

> Is there a good reason for the system call fallback to go in the vdso 
> function rather than have the caller handle it?

Originally it was deemed the vdso's responsibility to do fallback, but
MIPS broke this contract so musl always makes a syscall itself if the
vdso function returns -ENOSYS. I believe it honors other errors. We
could change it to fallback on all errors if needed. I'm not sure what
glibc does here.

Rich

  reply	other threads:[~2020-04-25  5:40 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-25  5:22 Nicholas Piggin
2020-04-25  5:40 ` Rich Felker [this message]
2020-04-25  7:47 ` [musl] " Christophe Leroy
2020-04-25 10:56   ` Nicholas Piggin
2020-04-25 12:20     ` Christophe Leroy
2020-04-25 22:58       ` Nicholas Piggin
2020-04-25 23:11         ` Rich Felker
2020-04-26  3:41           ` Nicholas Piggin
2020-04-27 13:09             ` Adhemerval Zanella
2020-04-29  2:39               ` Nicholas Piggin
2020-04-29 12:15                 ` Adhemerval Zanella
2020-05-05 21:56                 ` Segher Boessenkool
2020-04-25 16:22     ` Rich Felker
2020-04-25 23:07       ` Nicholas Piggin
2020-04-30  2:51       ` Michael Ellerman

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=20200425054019.GI11469@brightrain.aerifal.cx \
    --to=dalias@libc.org \
    --cc=adhemerval.zanella@linaro.org \
    --cc=binutils@sourceware.org \
    --cc=libc-alpha@sourceware.org \
    --cc=libc-dev@lists.llvm.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=musl@lists.openwall.com \
    --cc=npiggin@gmail.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.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/musl/

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 NNTP newsgroup(s).