mailing list of musl libc
 help / color / mirror / code / Atom feed
From: Justin Cormack <justin@specialbusservice.com>
To: musl@lists.openwall.com
Subject: Re: [UGLY PATCH] Support for no-legacy-syscalls archs
Date: Sun, 25 May 2014 10:57:50 +0100	[thread overview]
Message-ID: <CAK4o1Wx4-AeYFm+nByWsjOEjuJM1R0FghZhAYhY6TYCUtTrAog@mail.gmail.com> (raw)
In-Reply-To: <20140525095257.GI12324@port70.net>

On Sun, May 25, 2014 at 10:52 AM, Szabolcs Nagy <nsz@port70.net> wrote:
> * Rich Felker <dalias@libc.org> [2014-05-25 01:42:37 -0400]:
>> Here's a proposed next phase for supporting no-legacy-syscall archs
>> (aarch64 and or1k, among others). It's not complete but I think it
>> covers most of the important syscalls for standard functionality (not
>> linux-specific stuff tho). Some of them might be missing some error
>> cases or otherwise buggy so I'm sending the patch for review before
>> committing.
> ...
>> +#ifdef SYS_poll
>>       __syscall(SYS_poll, pfd, 3, 0);
>> +#else
>> +     __syscall(SYS_ppoll, pfd, 3, 0, 0, _NSIG/8);
>> +#endif
>
> cant it be done the other way around so new syscalls
> are tried and then the classic ones are just fallbacks?

Issue seems to be that if you were running an old kernel (say no
ppoll) this would have to be called twice or add runtime conditionals,
which would be slower. Also it means that strace shows closer to what
you called. In many cases (where the new ones are Posix and portable)
users should switch to the new calls, but some are Linux only.

> and what will happen with SYS_open?

Whats the issue with open?

Justin


  reply	other threads:[~2014-05-25  9:57 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-05-25  5:42 Rich Felker
2014-05-25  9:52 ` Szabolcs Nagy
2014-05-25  9:57   ` Justin Cormack [this message]
2014-05-25 11:45   ` Rich Felker
2014-05-26  4:28 ` Rich Felker
2014-05-26 18:40 ` [UGLY PATCH v2] " Rich Felker
2014-05-26 21:13   ` Szabolcs Nagy
2014-05-26 21:54     ` Rich Felker
2014-05-26 22:39       ` Szabolcs Nagy
2014-05-26 22:46         ` Rich Felker
2014-05-27  5:26 ` [UGLY PATCH v3] " Rich Felker
2014-05-27 11:29   ` Szabolcs Nagy
2014-05-27 19:01     ` Rich Felker
2014-05-29 21:46   ` Rich Felker
2014-05-29 23:04   ` Rich Felker

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=CAK4o1Wx4-AeYFm+nByWsjOEjuJM1R0FghZhAYhY6TYCUtTrAog@mail.gmail.com \
    --to=justin@specialbusservice.com \
    --cc=musl@lists.openwall.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).