From: Rich Felker <dalias@libc.org>
To: Florian Weimer <fweimer@redhat.com>
Cc: Askar Safin <safinaskar@zohomail.com>,
libc-alpha@sourceware.org, adhemerval.zanella@linaro.org,
carlos@redhat.com
Subject: Re: [PATCH v2] Add public function syscall_no_errno
Date: Mon, 12 Feb 2024 09:44:39 -0500 [thread overview]
Message-ID: <20240212144439.GO22081@brightrain.aerifal.cx> (raw)
In-Reply-To: <87wmr9ahfv.fsf@oldenburg3.str.redhat.com>
On Mon, Feb 12, 2024 at 03:24:52PM +0100, Florian Weimer wrote:
> * Askar Safin:
>
> > +@code{syscall_no_errno} is Linux-specific GNU extension. It does the same
> > +as @code{syscall}, but does not interpret return value, returned by Linux
> > +kernel, and doesn't set @code{errno}. This makes @code{syscall_no_errno}
> > +suitable for performing Linux syscalls, which never fail, such as
> > +@code{SYS_getuid}.
>
> Are there really any system calls which return a value in the range
> -4095 to -1, and it's still considered a success?
Yes, there are a very small number of such syscalls -- getuid and
getgid are the only relevant ones AFAICT -- but the author of this
proposal is missing the point. They want to avoid using libc, but then
have a libc function to make their raw syscalls for them, rather than
just doing that themselves. And apparently this function is supposed
to have an undocumented contract that you can call it from contexts
where calling other libc functions might not be valid..? Or not? It
was never really clarified.
They also seem to be under the mistaken impression that you can just
add arbitrary pet functions to libc as long as you follow some
procedures for doing it the right way, rather than understanding that
the maintainer's job is to say no, and that functions don't go in libc
unless there's some sort of consensus that they belong there.
Rich
next prev parent reply other threads:[~2024-02-12 14:44 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-28 16:39 [PATCH, RFC] " Askar Safin
2024-02-01 17:53 ` Adhemerval Zanella Netto
2024-02-01 18:18 ` Rich Felker
2024-02-01 19:32 ` Askar Safin
2024-02-01 20:16 ` dalias
2024-02-01 20:57 ` Adhemerval Zanella Netto
2024-02-08 15:02 ` [PATCH v2] " Askar Safin
2024-02-08 17:48 ` Szabolcs Nagy
2024-02-12 14:24 ` Florian Weimer
2024-02-12 14:44 ` Rich Felker [this message]
2024-02-12 16:16 ` Askar Safin
2024-02-12 17:25 ` Zack Weinberg
2024-02-12 17:43 ` Andreas Schwab
2024-02-12 18:22 ` Zack Weinberg
2024-02-13 9:10 ` Andreas Schwab
2024-02-13 11:57 ` Adhemerval Zanella Netto
2024-02-12 17:55 ` Adhemerval Zanella Netto
2024-02-12 18:34 ` Askar Safin
2024-02-07 0:59 ` [PATCH, RFC] " Askar Safin
2024-02-07 20:59 ` dalias
2024-02-08 17:08 ` Askar Safin
2024-02-07 1:57 ` Mike Frysinger
2024-02-07 12:55 ` Askar Safin
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=20240212144439.GO22081@brightrain.aerifal.cx \
--to=dalias@libc.org \
--cc=adhemerval.zanella@linaro.org \
--cc=carlos@redhat.com \
--cc=fweimer@redhat.com \
--cc=libc-alpha@sourceware.org \
--cc=safinaskar@zohomail.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).