mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Kyle Moffett <mrmacman_g4@mac.com>
To: Rob Landley <rob@landley.net>
Cc: Arjan van de Ven <arjan@infradead.org>,
	nix@esperi.org.uk, mmazur@kernel.pl,
	linux-kernel@vger.kernel.org, llh-discuss@lists.pld-linux.org
Subject: Re: [RFC][PATCH 0/2] KABI example conversion and cleanup
Date: Sun, 26 Mar 2006 19:12:44 -0500	[thread overview]
Message-ID: <8DB7FF04-813B-4573-B1BD-A9276B4F83BE@mac.com> (raw)
In-Reply-To: <200603261555.51504.rob@landley.net>

On Mar 26, 2006, at 15:55:51, Rob Landley wrote:
> On Sunday 26 March 2006 7:34 am, Kyle Moffett wrote:
>> Well I guess you could call it UABI, but that might also imply  
>> that it's _userspace_ that defines the interface, instead of the  
>> kernel. Since the headers themselves are rather tightly coupled  
>> with the kernel, I think I'll stick with the KABI name for now  
>> (unless somebody can come up with a better one, of course :-D).
>
> Ok, question, using an example I'm familiar with.  What's affected  
> by the prefix?
>
> We eventually got it all untangled.  Now we check if we're on 2.6  
> and if so use the 64 bit API (which is stable on 2.6), and  
> otherwise use a copy of the 32 bit structure that predates  
> __kernel_dev_t being renamed.  And we trust the darn kernel headers  
> to supply the types for us, because there's just no alternative.
>
> My question is: will your new approach work with our existing code,  
> or are you saying we need another #ifdef to check for yet another  
> gratuitously incompatible name, ala _kabi__kernel_dev_t?

No, no need for a new #ifdef, at least not for a long time if you  
don't want to.  My plans for the immediate future are only to touch  
files that are currently broken with respect to !__KERNEL__, and  
linux/loop.h isn't.  When I do get to it, my plan is to bring the  
parts that userspace needs into kabi/loop.h, named as __kabi_*,  
however linux/loop.h will define the new symbols to their old names  
for compatibility with linux code and userspace code that happens to  
be using those interfaces, so you still won't need to change  
anything.  Hopefully this would also mean that if the shipped linux/ 
loop.h is currently broken for your uses, I would be able to fix it  
so you don't need a customized copy at all.

If you _did_ decide to switch busybox to use the __kabi_ symbols, you  
would be able to take advantage of the fact that the same set of kabi  
headers (which don't include kernelversion.h) would work unmodified  
for kernels all the way back to 0.99, as long as you base your  
decisions of what features are available on either a dynamically- 
detected version or a pre-configured minimum version from the user.   
I'm assuming here that it's possible to compile a busybox that works  
on a 2.2 or 2.4 kernel even using linux-libc-headers 2.6.*, as long  
as the user indicates such.

> This is just an example.  There is currently no existing program  
> out in userspace that is tries to talk to the kernel using names  
> with _kabi_ prepended to them, that I am aware of.  If you're  
> adding this prefix, you're writing a brand new interface which  
> currently has exactly zero users.  Is this the intent?

I'd like this project to have a twofold purpose.  First, in the short  
term I want to fix up the general __KERNEL__ vs !__KERNEL__  
brokenness in include/linux and clean up and document which APIs are  
userspace ABI by moving them to include/kabi.  If that first part  
works, then in the very _long_ term, (on the order of a couple years  
or so) I would like to encourage larger projects like klibc and GLIBC  
to migrate to using *only* the include/kabi headers to avoid  
namespace pollution and allow kernel devs to rearrange and adjust the  
linux/* headers as they see fit without caring about breaking  
external programs.

Once the libcs are using kabi/*, GLIBC can pick up a set of linux/*.h  
"emulation" files based on kabi/*.h that provide all of the old  
source-APIs for as long as anybody cares, and Linux can go back to  
screwing around with its header files in any way that it pleases  
(just as long as it keeps ABI stuff all in kabi).  One of my major  
goals for this rework is to ensure that the kabi/*.h header files  
actually define the _ABI_ going back to the very early releases of  
Linux.  As Linus said, it's an ABI, which means that adding new  
features is OK, but removing them is bad, so I'll try to make sure  
it's _perfectly_ _ok_ to use a 2.6 kabi/ on a 2.0 kernel.  It should  
also be perfectly ok to use a 2.6 kabi/ on a 5-years-down-the-road  
2.8 kernel as long as you restrict yourself to the subset of features  
that were available in 2.6.

Cheers,
Kyle Moffett


  reply	other threads:[~2006-03-27  0:13 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
     [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 [this message]
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=8DB7FF04-813B-4573-B1BD-A9276B4F83BE@mac.com \
    --to=mrmacman_g4@mac.com \
    --cc=arjan@infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=llh-discuss@lists.pld-linux.org \
    --cc=mmazur@kernel.pl \
    --cc=nix@esperi.org.uk \
    --cc=rob@landley.net \
    /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

all inboxes | Powered by JetHome®