From: Kyle Moffett <mrmacman_g4@mac.com>
To: Sam Ravnborg <sam@ravnborg.org>
Cc: nix@esperi.org.uk, rob@landley.net, 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, 2 Apr 2006 15:30:44 -0400 [thread overview]
Message-ID: <1E3BAA12-E97A-410A-8CD1-837EE7F82DFE@mac.com> (raw)
In-Reply-To: <20060402175859.GA9839@mars.ravnborg.org>
On Apr 2, 2006, at 13:58:59, Sam Ravnborg wrote:
> Hi Kyle.
> Been watching this thread evolve for a while - and contributed a
> little myself. But I fail to find a rationale for the selected
> approach.
>
> 1) Go through current set of headers and sanitize them - using
> __KERNEL__ to identify kernel only stuff.
I'm working on this right now as step one. I see two big problems
with this approach. Primarily it leaves no distinction or
documentation for future maintenance; the sanitization doesn't last
long at all, as we've seen by trying this approach in the past.
> 2) Keep user space interface (KABI in your term?) in include/ and
> slowly move kernel specific definitions somewhere else. This has
> the great advantage to keep backward compaitibility.
The big problem with this approach is it starts off with the
submission of a 1000-item change-the-world patchset to move all of
the completely-kernel-only patches from linux/include to linux/
kinclude; destroying all mergeability in the process and completely
serializing development. Judging from the responses on this list
when similar changes have happened before, that kind of thing is
usually considered bad.
> 3) 'Preprocess' include/ and generate a set of KABI files based on
> current set of (cleaned up) kernel header files. 'Preprocess in ''
> because a C-preprocessor will not be suitable.
I got the idea of preprocessing, but your sentence seems to have
gotten mangled somewhere. Any chance you could clarify? From what I
can see by looking through the current headers, preprocessing will
not solve some of the duplication I'd like to try to clean up. One
example being the duplication of bitops in various macros all over
the place, FD_SET/FD_CLR/FD_ISSET being a prime example of that
duplication. It would be really nice to be able to implement those
in terms of __set_bit, etc, however those macros themselves must be
made userspace-clean, including adding C89-compat macros for non-GCC
compilers and other mild ugliness, even though they'd never be
directly exposed for user programs.
> 4) Introduce a virgin KABI (your approach). The virgin KABI has no
> users today and does in no way preserve backward compatibility.
>
> Can you try to explain why the virgin approach is superior to the
> others.
Your "#4" does not accurately describe what I feel I'm trying to do.
In my first set of patches I'd like to create a set of KABI headers
(recently I've been considering sticking them under "linux-klib" or
similar) which provide a set of useful standards-clean compiler-
independent typedefs, macros, and inline functions to both the kernel
_and_ whatever ABI headers we decide to use. (working on that now)
Those headers would _not_ be for use directly from userspace, but
only from within the kernel and any in-kernel ABI headers. As a
result, since they would be either shipped with the kernel which
compiles against them or installed with the KABI headers which depend
upon them, developers would be gleefully free from any obligations to
maintain a stable interface within the linux-klib headers (although
the code itself should be mostly C89 compliant).
As I do that I would like to adjust the kernel headers to use those
klib includes, hopefully alleviating some of the unusual include-
cycle problems in various headers (like the asm/posix_types.h wanting
to use asm/bitops.h for FD_SET operations, which in some
architectures indirectly includes asm/posix_types.h). Along with
that process I would be fixing up __KERNEL__ wherever they seemed
misplaced. Afterwards, I would try to clean up the actual guts of
the ABI (like FD_SET, for example), I would migrate that to include/
linux-kabi headers or similar, trying to contain all the C89-compat
code and macros for non-GCC compilers in include/linux-{kabi,klib}
For future maintenance it would hopefully provide a clean and easily
noticeable break between "You can modify include/linux as much as you
damn well please" and "This patch touches include/linux-kabi, let's
check it carefully for ABI breakage." I'd like to propose this as a
natural extension to Greg KH's ABI documentation, sequestering the
more sensitive code into a separate directory where it may be more
carefully watched and documented. Feel free to continue to criticize
and dissent; even if it's eventually determined that my idea won't
work, hopefully some other useful ideas will come up in the discussion.
Thanks for the comments!
Cheers,
Kyle Moffett
next prev parent reply other threads:[~2006-04-02 19:31 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
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 [this message]
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=1E3BAA12-E97A-410A-8CD1-837EE7F82DFE@mac.com \
--to=mrmacman_g4@mac.com \
--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 \
--cc=sam@ravnborg.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
all inboxes | Powered by JetHome®