mailing list of musl libc
 help / color / mirror / code / Atom feed
From: Rich Felker <dalias@aerifal.cx>
To: musl@lists.openwall.com
Subject: Re: capset() capget() syscalls
Date: Wed, 5 Sep 2012 23:04:06 -0400	[thread overview]
Message-ID: <20120906030406.GY27715@brightrain.aerifal.cx> (raw)
In-Reply-To: <CAK4o1WzWsdGqsvuy5J1kg1=WzeG_yM7-PPbx+1x4yX3XgwKCXA@mail.gmail.com>

On Wed, Sep 05, 2012 at 06:01:11PM +0100, Justin Cormack wrote:
> On Wed, Sep 5, 2012 at 3:24 PM, Rich Felker <dalias@aerifal.cx> wrote:
> 
> > There are a lot of direct-kernel-interface-usage situations that
> > require pulling in the associated kernel headers, such as fb.h, kb.h,
> > etc. One issue is that the kernel headers presumably lack prototypes
> > for the functions, but the most portable way to do what you're doing
> > is probably going to be:
> >
> > #include <linux/capabilities.h>
> > #include <sys/syscall.h>
> > ...
> > syscall(SYS_capset, x, y);
> >
> > At least this will work on every Linux libc I know of, and it's
> > hard for them to break it.
> >
> > If you really want to see the header in musl, I'm not opposed to
> > further consideration of the matter, but right now I don't think
> > adding it promotes portable software; rather it seems to promote
> > writing software that works on musl and breaks on glibc.
> 
> It is an unclear situation. Glibc seems inconsistent.
> 
> Personally I think Musl should provide the kernel structures and
> syscalls for everything that is not deprecated.

In principle, I agree with you.

My impression was that the kernel developers intend for this API to be
deprecated for use by applications, and the only reason they haven't
replaced it with a proper kernelspace API is that they assume you'll
be using libcap which wraps/hides the ugliness (and replaces it with
something else that's just ugly in different ways...).

As such, it's sort of a borderline case. Do we really want to be
promoting this API for use by applications?

> I was looking at providing patches for a bunch of missing syscalls
> (which are in glibc).

OK, maybe I should clean up the source tree in preparation for this.
My intent is that src/linux/*.c should be purely syscall wrappers for
non-POSIX syscalls provided by Linux. Right now src/linux also
contains other misc junk, and some of the syscall wrappers are in
src/misc or perhaps other locations..

> I agree with Linus, provide all the headers in libc. I tried to write
> some code to include all syscalls and constants needed for them, and
> as far as I can see it is impossible with glibc due to conflicts. If
> anyone has a set of includes that works let me know....

Can you explain what you mean here?

Rich


  reply	other threads:[~2012-09-06  3:04 UTC|newest]

Thread overview: 43+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-08-27 11:51 igmar
2012-09-05  6:19 ` Rich Felker
2012-09-05  9:28   ` Igmar Palsenberg
2012-09-05 14:24     ` Rich Felker
2012-09-05 17:01       ` Justin Cormack
2012-09-06  3:04         ` Rich Felker [this message]
2012-09-06  3:10           ` John Spencer
2012-09-06  3:20             ` Rich Felker
2012-09-06  3:28               ` Kurt H Maier
2012-09-06  3:41                 ` Rich Felker
2012-09-06  4:41                   ` Kurt H Maier
2012-09-06  8:22           ` Justin Cormack
2012-09-06  9:28             ` Szabolcs Nagy
2012-09-06 14:23               ` Rich Felker
2012-09-07  4:56             ` Rich Felker
2012-09-08 16:02               ` Justin Cormack
2012-09-08 22:14                 ` Rich Felker
2012-09-09 20:04                   ` Justin Cormack
2012-09-09 20:14                     ` Rich Felker
2012-09-09 21:13                   ` James Cloos
2012-09-09 21:55                     ` Rich Felker
2012-09-09 22:12                       ` Justin Cormack
2012-09-09 22:29                         ` Rich Felker
2012-09-09 22:37                           ` Justin Cormack
2012-09-10 15:07                             ` James Cloos
2012-09-08 21:25               ` Justin Cormack
2012-09-08 22:15                 ` Rich Felker
2012-09-08 23:56                   ` Rich Felker
2012-09-09  0:21                 ` Rich Felker
2012-09-09  8:21                   ` Justin Cormack
2012-09-09 19:40                     ` Justin Cormack
2012-09-09 21:02                       ` Rich Felker
2012-09-09 21:07                         ` Justin Cormack
2012-09-09 21:23                         ` Justin Cormack
2012-09-09 21:31                           ` Justin Cormack
2012-09-09 21:58                             ` Rich Felker
2012-09-09 22:14                               ` Justin Cormack
2012-09-15  1:54                                 ` Rich Felker
2012-09-16 14:13                                   ` Justin Cormack
2012-09-17  2:27                                     ` Rich Felker
2012-09-06 11:47           ` Igmar Palsenberg
2012-09-06 11:36       ` Igmar Palsenberg
2012-09-06 14:11         ` 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=20120906030406.GY27715@brightrain.aerifal.cx \
    --to=dalias@aerifal.cx \
    --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).