From: Rob Landley <rob@landley.net>
To: Kyle Moffett <mrmacman_g4@mac.com>
Cc: Mariusz Mazur <mmazur@kernel.pl>,
llh-announce@lists.pld-linux.org,
LKML Kernel <linux-kernel@vger.kernel.org>,
dank@kegel.com, nkukard@lbsd.net, vmiklos@frugalware.org,
rseretny@paypc.com, lkml@dervishd.net, jbailey@ubuntu.com,
llh-discuss@lists.pld-linux.org
Subject: Re: State of userland headers
Date: Fri, 24 Mar 2006 16:23:49 -0500 [thread overview]
Message-ID: <200603241623.49861.rob@landley.net> (raw)
In-Reply-To: <DE01BAD3-692D-4171-B386-5A5F92B0C09E@mac.com>
On Friday 24 March 2006 1:51 pm, Kyle Moffett wrote:
> On Mar 23, 2006, at 12:11:26, Mariusz Mazur wrote:
> > There was a thread on lkml on this topic about a year ago. IIRC
> > I've suggested, that the best option would be to get a new set of
> > dirs somewhere inside the kernel, and gradually export the userland
> > usable stuff from the kernel headers, so to (a) achieve full
> > separation and (b) avoid duplication of definitions (meaning that
> > kernel headers would simply include the userland ones where
> > required). Linus said, that it would break stuff and so is
> > unacceptable.
>
> I seem to remember Linus saying that "breaking things is
> unacceptable", not that the project was guaranteed to break things
> (we would just need to be much more careful about it than most kernel
> patches).
The gentoo guys clean up their own headers, apparently. I'm told they do so
by moving around the #ifdef __KERNEL__ stuff to be in the correct places, and
that they're currently working on a 2.6.14 or 2.6.15 version of the headers:
http://www.gentoo.org/cgi-bin/viewcvs.cgi/src/patchsets/gentoo-headers/?root=gentoo
> What that seems to indicate to me is that an in-kernel
> version would need to do the following for userspace-accessible
> header files for a large number of kernel releases:
>
> #ifndef _LINUX_HEADER_H
> #define _LINUX_HEADER_H
> #include <kabi/header.h>
> /* Define or typedef a bunch of __kabi_ prefixes to the old
> prefixes they used to have in the kernel header */
> #ifndef __KERNEL__
> # warning "The header file <linux/header.h> is deprecated for"
> # warning "userspace, please use <kabi/header.h> instead."
> #else
> /* Kernel-only declarations/definitions */
> #endif
Changing the #include paths in all deployed software will basically never
happen. If this header package requires that, I'm not interested in it
because I can't build existing software against it, and I don't expect anyone
else to be.
I was thinking of possibly a parallel header set under linux-2.6.x/usr/include
which the linux-2.6.x/include/*.h could #include to clean out their #ifndef
__KERNEL__ stuff, and that eventually the usr/include stuff would contain
approximately what Mazur's headers had contained. Unfortunately, I'm under
the impression that's not a realistic approach.
> If this were done carefully, all programs that compile against kernel
> headers could be _fixed_ in the short term (they'd go from throwing
> errors to giving a couple deprecation warnings). In the long term,
> the extra ifdeffery could be removed and the <linux/*.h> headers for
> which a <kabi/*.h> replacement had existed for a couple versions
> could be removed. New ABIs (including IOCTLs, new syscalls, etc)
> could be required to use <kabi/*.h> in the first place.
A program that includes kabi/* instead of linux/* won't build against older C
libraries with older headers from older kernel versions (or older project's
like Mazur's headers).
> 1: Ewww, bad glibc!
> 2: The symbols in kabi/*.h should probably all start with __kabi_
Any grand new incompatible thing is something I will happily ignore for as
long as I am able to, and I'm not alone here. Your uptake will be zero.
Rob
--
Never bet against the cheap plastic solution.
next prev parent reply other threads:[~2006-03-24 21:24 UTC|newest]
Thread overview: 102+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-03-14 15:19 [ANNOUNCE] linux-libc-headers dead Mariusz Mazur
2006-03-14 15:28 ` Ismail Donmez
2006-03-16 8:37 ` [llh-announce] " Nigel Kukard
2006-03-16 20:20 ` Jan Engelhardt
2006-03-16 20:42 ` Dan Kegel
2006-03-17 7:56 ` DervishD
2006-03-23 17:11 ` State of userland headers Mariusz Mazur
2006-03-23 23:04 ` Rob Landley
2006-03-26 13:12 ` Mariusz Mazur
2006-03-26 20:59 ` Rob Landley
2006-03-24 18:51 ` Kyle Moffett
2006-03-24 21:23 ` Rob Landley [this message]
[not found] ` <878xqzpl8g.fsf@hades.wkstn.nix>
2006-03-24 22:46 ` Kyle Moffett
2006-03-24 23:01 ` Randy.Dunlap
2006-03-25 6:48 ` Kyle Moffett
2006-03-28 20:17 ` Jim Gifford
2006-03-25 1:36 ` Jeff Dike
2006-03-25 6:33 ` Kyle Moffett
2006-03-25 16:03 ` Jeff Dike
2006-03-25 3:19 ` Rob Landley
2006-03-25 6:27 ` Kyle Moffett
2006-03-26 11:52 ` [RFC][PATCH 0/2] KABI example conversion and cleanup Kyle Moffett
2006-03-26 11:54 ` [RFC][PATCH 1/2] Create initial kernel ABI header infrastructure Kyle Moffett
2006-03-26 12:32 ` Arjan van de Ven
2006-03-26 12:50 ` Kyle Moffett
2006-03-26 12:59 ` Martin Mares
2006-03-26 13:14 ` Kyle Moffett
2006-03-26 15:38 ` Martin Mares
2006-03-26 16:16 ` Kyle Moffett
2006-03-26 14:39 ` Arjan van de Ven
2006-03-26 15:23 ` Kyle Moffett
2006-03-29 22:26 ` Pavel Machek
2006-04-02 0:22 ` Randy.Dunlap
2006-04-02 2:42 ` Kyle Moffett
2006-04-02 3:01 ` Arjan van de Ven
2006-04-02 5:53 ` Kyle Moffett
2006-04-02 13:09 ` Arjan van de Ven
2006-04-02 10:32 ` Pavel Machek
2006-04-02 11:16 ` Kyle Moffett
2006-03-26 20:05 ` Sam Ravnborg
2006-03-26 20:39 ` Kyle Moffett
2006-03-26 21:26 ` Sam Ravnborg
2006-03-27 0:27 ` Kyle Moffett
2006-03-26 11:55 ` [RFC][PATCH 2/2] Generalize fd_set handling across architectures Kyle Moffett
2006-03-26 12:06 ` [RFC][PATCH 0/2] KABI example conversion and cleanup Kyle Moffett
2006-03-26 13:43 ` Nix
2006-03-26 12:26 ` Arjan van de Ven
2006-03-26 12:30 ` Arjan van de Ven
2006-03-26 12:34 ` Kyle Moffett
2006-03-26 13:22 ` Giuseppe Bilotta
2006-03-26 13:29 ` Avi Kivity
2006-03-26 13:47 ` Kyle Moffett
2006-03-26 13:53 ` Giuseppe Bilotta
2006-03-26 14:30 ` Kyle Moffett
2006-03-26 14:45 ` Giuseppe Bilotta
2006-03-26 17:24 ` Avi Kivity
2006-03-26 17:29 ` Arjan van de Ven
2006-03-26 17:57 ` Avi Kivity
2006-03-26 18:32 ` Arjan van de Ven
2006-03-26 21:18 ` Rob Landley
2006-03-27 0:18 ` Kyle Moffett
2006-03-27 6:19 ` Avi Kivity
2006-03-27 19:48 ` Rob Landley
2006-03-28 20:04 ` Mariusz Mazur
2006-03-28 20:13 ` Kyle Moffett
2006-03-28 22:57 ` Rob Landley
2006-03-26 20:55 ` Rob Landley
2006-03-27 0:12 ` Kyle Moffett
2006-03-26 14:31 ` Eric Piel
2006-03-26 21:09 ` Rob Landley
2006-03-26 23:06 ` Eric Piel
2006-03-27 0:40 ` Kyle Moffett
2006-03-27 3:12 ` Jeff Dike
2006-03-28 14:20 ` Jan Engelhardt
2006-03-28 15:57 ` [OT] Non-GCC compilers used for linux userspace Kyle Moffett
2006-03-28 16:13 ` Eric Piel
2006-03-28 16:20 ` Kyle Moffett
2006-03-28 16:59 ` Jason L Tibbitts III
2006-03-28 17:13 ` Kyle Moffett
2006-03-28 17:28 ` Daniel Jacobowitz
2006-03-28 17:41 ` Kyle Moffett
2006-04-05 17:01 ` Bryan O'Sullivan
2006-03-28 17:08 ` Jan-Benedict Glaw
2006-03-28 17:56 ` Jesper Juhl
2006-03-28 21:47 ` Rob Landley
2006-03-29 21:23 ` Nix
2006-03-30 1:36 ` Rob Landley
2006-03-30 7:24 ` Nix
2006-03-30 20:26 ` Rob Landley
2006-03-30 22:02 ` Nix
2006-03-30 23:00 ` Harald Arnesen
2006-03-30 23:16 ` Rob Landley
2006-03-29 13:25 ` Mathieu Chouquet-Stringer
2006-03-28 18:44 ` Eric W. Biederman
2006-03-29 4:26 ` Peter Chubb
2006-03-30 15:15 ` Roger Heflin
2006-03-28 17:16 ` [RFC][PATCH 0/2] KABI example conversion and cleanup Ben Pfaff
2006-03-28 17:08 ` Catalin Marinas
2006-03-31 0:20 ` Arch-specific header inconsistency (asm-*/termios.h) Kyle Moffett
2006-04-02 17:58 ` [RFC][PATCH 0/2] KABI example conversion and cleanup Sam Ravnborg
2006-04-02 19:30 ` Kyle Moffett
2006-04-02 20:47 ` Arnd Bergmann
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=200603241623.49861.rob@landley.net \
--to=rob@landley.net \
--cc=dank@kegel.com \
--cc=jbailey@ubuntu.com \
--cc=linux-kernel@vger.kernel.org \
--cc=lkml@dervishd.net \
--cc=llh-announce@lists.pld-linux.org \
--cc=llh-discuss@lists.pld-linux.org \
--cc=mmazur@kernel.pl \
--cc=mrmacman_g4@mac.com \
--cc=nkukard@lbsd.net \
--cc=rseretny@paypc.com \
--cc=vmiklos@frugalware.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