From: ebiederm@xmission.com (Eric W. Biederman)
To: "H. Peter Anvin" <hpa@zytor.com>
Cc: David Woodhouse <dwmw2@infradead.org>, linux-kernel@vger.kernel.org
Subject: Re: Recent changes to sysctl.h breaks glibc
Date: 20 May 2003 13:04:23 -0600 [thread overview]
Message-ID: <m1k7cl1lu0.fsf@frodo.biederman.org> (raw)
In-Reply-To: <3EC9D823.5020400@zytor.com>
"H. Peter Anvin" <hpa@zytor.com> writes:
> Eric W. Biederman wrote:
> > Ugh. I now see both sides of this.
> > ABI changes always require writing new code to take advantage
> > of it but that code does not need to live in libc. And libc is expected
> > to have the definitions necessary to compile the new code.
> >
>
> Bingo.
Several more little more points.
In general this only affects applications that are tied tightly to
the kernel.
What the applications want is a kernel abi specification repository,
which glibc is not, at least in a timely fashion, and it is not the
emphasis of any libc so it is quite likely to be neglected.
So for applications today that cannot wait for the code to be
incorporated into glibc the only reasonable advice is to include
their own header files (that do not conflict with libc header files),
for the ioctls and definitions they need. This is a maintainable if
not beautiful strategy.
> >>I maintain the proposal I have given before:
> >>
> >><linux/abi/*.h> as the header file namespace;
> > What about <linux-abi/*.h>
> >
> >><linux/*.h> <asm/*.h> namespaces reserved for compatibility (once the
> >>migration is complete these are owned by the libc)
> > I think removing the abi namespace totally from the legacy directories
> > helps this to a small extent.
> >
>
> It might, but the <linux/abi/*.h> namespace hasn't been used, so it isn't really
>
> legacy in the sense that you can have a possible conflict. Having said that,
> <linuxabi/*.h> is the least bleacherous nonlegacy alternative I've seen (I'd
> like to skip the dash, though.) <abi/*.h> is already taken.
No problem with skipping the dash. In general I would like to be able
to: ``rm -rf /usr/include/linux/ /usr/include/asm/'' and then compile
applications. This is not something I would recommend in a
production system any time soon but it would help in cruft detection.
> >>Types use the __kernel_* namespace *only*; structures use struct __kernel_*.
> >>
> >>Some form of export of the expected syscall ABI as well as syscall
> >>numbering.
> > Prototypes for everything including ioctls.
> >
>
> Absolutely. As I said in another post, if this is done correctly, a whole bunch
> of the ABI compatbility stuff like the 32-on-64 things should be possible to
> generate automatically. If that isn't true, it's done wrong.
>
> >>
> >>A bigger issue is if this really should be done in C. A worthwhile
> >>thought: if this is done correctly then most or all of the 64/32 compat
> >>code (or any other arch1-on-arch2 compatibility) should be able to be
> >>automatically generated. If not, it almost certainly isn't done
> >>correctly...
> > Potentially. Certain things like type conversions may be a non-trivial
> > exercise. It is certainly true that it should be possible to build
> > the entire decoding logic for strace. Even in the mixed architecture
> > cases.
> > For cases that are hard to automate see: sys_old_mmap vs. sys_mmap2,
> > on x86. Potentially it can be done but it requires a powerful stub
> > generator.
> >
>
> That one is somewhat tricky, and probably needs some ad hoc code. However, you
> get a long way toward the goal if you can express the following:
My basic point with respect to arch-on-arch compatibility is that
sys_mmap -> sys_mmap2 (where they both take an off32_t argument) is
classic case of the arch on arch compatibility.
The case is actually more interesting because sys_mmap2 uses
a 4K aligned offset. Instead of a byte aligned offset. Which
makes sys_mmap64 unnecessary for the time being.
But I am certainly for it where the work can be done easily.
A more interesting possibility to me at least is network transparency.
> >>>If Linus would approve a strategy for rearranging the headers such that
> >>>people can work on it without suspecting that they're just wasting their
> >>>time, I think it could get done for 2.6.
> >>>
> >>>It's not the kind of thing you do in private and present as a fait
> >>>accomplis -- if it isn't quite right, you end up having to do the whole
> >>>thing from scratch, afaict.
> >>
> >>Agreed.
> > If it is done purely as headers certainly. For a header generator it
> > might be something you can get away with. Because the core repository
> > would not need to change just the world useable form. This may
> > be the one good argument for doing this in something other than C.
> >
>
> On the other hand, Linus just released "sparse", which is a pretty nice C parser
> that might be useful for this, especially with some kind of custom annotation
> capability. I talked to him about this a while ago, actually.
Against doing this in C there are 3 arguments.
1) C may not be precise enough.
2) C may not contain enough information.
3) Reorganization by an automated tool may not be possible.
I don't know for certain that the ability to reorganize the generated
interfaces from original source is important. A good design may
make this a non-issue. But it may help prototyping so I mention it.
I suspect a good implementation of this would resemble to the CORBA
IDL. A relative of C but with different restrictions.
Another very quite piece of the puzzle is how to include in the in
kernel DSO.
Eric
next prev parent reply other threads:[~2003-05-20 18:55 UTC|newest]
Thread overview: 65+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-05-18 20:21 Recent changes to sysctl.h breaks glibc Martin Schlemmer
2003-05-18 20:49 ` William Lee Irwin III
2003-05-18 21:12 ` Martin Schlemmer
2003-05-19 5:38 ` Christoph Hellwig
2003-05-19 10:43 ` Martin Schlemmer
2003-05-19 10:51 ` William Lee Irwin III
2003-05-19 11:14 ` Martin Schlemmer
2003-05-19 11:21 ` William Lee Irwin III
2003-05-19 11:33 ` Arjan van de Ven
2003-05-19 11:43 ` Christoph Hellwig
2003-05-19 12:52 ` Martin Schlemmer
2003-05-19 21:14 ` H. Peter Anvin
2003-05-19 22:44 ` William Lee Irwin III
2003-05-19 22:46 ` H. Peter Anvin
2003-05-19 22:56 ` William Lee Irwin III
2003-05-19 23:04 ` H. Peter Anvin
2003-05-20 6:06 ` Martin Schlemmer
2003-05-19 11:45 ` Christoph Hellwig
2003-05-19 12:56 ` Martin Schlemmer
2003-05-19 13:06 ` Christoph Hellwig
2003-05-19 16:56 ` Sam Ravnborg
2003-05-19 17:41 ` Linus Torvalds
2003-05-19 21:16 ` H. Peter Anvin
2003-05-19 22:18 ` Eric W. Biederman
2003-05-19 22:31 ` H. Peter Anvin
2003-05-19 22:20 ` Alan Cox
2003-05-19 23:28 ` Andries Brouwer
2003-05-20 10:35 ` Lionel Elie Mamane
2003-05-19 23:30 ` H. Peter Anvin
2003-05-19 23:05 ` Eric W. Biederman
2003-05-19 23:17 ` H. Peter Anvin
2003-05-19 23:55 ` Eric W. Biederman
2003-05-20 0:24 ` Valdis.Kletnieks
2003-05-20 0:40 ` Eric W. Biederman
2003-05-20 1:11 ` Valdis.Kletnieks
2003-05-20 22:10 ` H. Peter Anvin
2003-05-20 0:30 ` H. Peter Anvin
2003-05-20 0:54 ` David Woodhouse
2003-05-20 1:09 ` H. Peter Anvin
2003-05-20 1:42 ` Miles Bader
2003-05-20 4:12 ` H. Peter Anvin
2003-05-20 4:24 ` Miles Bader
2003-05-20 6:37 ` Eric W. Biederman
2003-05-20 7:24 ` H. Peter Anvin
2003-05-20 19:04 ` Eric W. Biederman [this message]
2003-05-20 7:44 ` Riley Williams
2003-05-20 14:01 ` Chris Friesen
2003-05-20 17:06 ` H. Peter Anvin
2003-05-21 4:39 ` Martin Schlemmer
2003-05-21 5:38 ` H. Peter Anvin
2003-05-21 5:58 ` Eric W. Biederman
2003-05-19 18:05 ` David Ford
2003-05-19 17:44 ` Alan Cox
2003-05-20 2:21 ` David Ford
2003-05-19 18:24 ` Christoph Hellwig
2003-05-19 17:59 ` David Ford
2003-05-19 18:06 ` Arjan van de Ven
2003-05-19 18:23 ` David Ford
2003-05-19 18:34 ` Arjan van de Ven
2003-05-19 19:43 ` Martin Schlemmer
2003-05-19 21:21 ` H. Peter Anvin
2003-05-19 21:35 ` Sam Ravnborg
2003-05-19 21:37 ` Arjan van de Ven
-- strict thread matches above, loose matches on Subject: below --
2003-05-19 19:54 Mudama, Eric
2003-05-19 20:36 ` Martin Schlemmer
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=m1k7cl1lu0.fsf@frodo.biederman.org \
--to=ebiederm@xmission.com \
--cc=dwmw2@infradead.org \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
/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