This is the mail archive of the
mailing list for the glibc project.
Re: Official Linux system wrapper library?
- From: "Michael Kerrisk (man-pages)" <mtk dot manpages at gmail dot com>
- To: Daniel Colascione <dancol at google dot com>, linux-kernel <linux-kernel at vger dot kernel dot org>
- Cc: mtk dot manpages at gmail dot com, Joel Fernandes <joelaf at google dot com>, Linux API <linux-api at vger dot kernel dot org>, Willy Tarreau <w at 1wt dot eu>, Vlastimil Babka <vbabka at suse dot cz>, Florian Weimer <fweimer at redhat dot com>, Carlos O'Donell <carlos at redhat dot com>, "libc-alpha at sourceware dot org" <libc-alpha at sourceware dot org>
- Date: Sun, 11 Nov 2018 07:55:30 +0100
- Subject: Re: Official Linux system wrapper library?
- References: <CAKOZuesB4R=dCz4merWQN0FSCGrXmOgUUr4ienSbStBJguNv8g@mail.gmail.com>
[adding in glibc folk for comment]
On 11/10/18 7:52 PM, Daniel Colascione wrote:
> Now that glibc is basically not adding any new system call wrappers,
> how about publishing an "official" system call glue library as part of
> the kernel distribution, along with the uapi headers? I don't think
> it's reasonable to expect people to keep using syscall(__NR_XXX) for
> all new functionality, especially as the system grows increasingly
> sophisticated capabilities (like the new mount API, and hopefully the
> new process API) outside the strictures of the POSIX process.
As a quick glance at the glibc NEWS file shows, the above is not
* The renameat2 function has been added...
* The statx function has been added...
* Support for memory protection keys was added. The <sys/mman.h> header now
declares the functions pkey_alloc, pkey_free, pkey_mprotect...
* The copy_file_range function was added.
* New wrappers for the Linux-specific system calls preadv2 and pwritev2.
* The getrandom [function] have been added.
I make that 11 system call wrappers added in the last 2 years.
That said, of course, there are many system calls that lack wrappers ,
and the use of syscall() is undesirable.
The glibc folk do have their reasons for being conservative around
adding system calls (https://lwn.net/Articles/655028/). However, at
this point, I think one of the limiting factors is developer time
on the glibc project. Quite possibly, they just need some help to
add more (properly designed) wrappers faster.
 https://sourceware.org/bugzilla/show_bug.cgi?id=6399 is a
Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/
Linux/UNIX System Programming Training: http://man7.org/training/