From: Jeff Garzik <jgarzik@mandrakesoft.com>
To: Jonathan Lundell <jlundell@pobox.com>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>,
linux-kernel@vger.kernel.org, torvalds@transmeta.com
Subject: Re: __KERNEL__ removal
Date: Sat, 14 Jul 2001 14:19:32 -0400 [thread overview]
Message-ID: <3B508D34.180A07A0@mandrakesoft.com> (raw)
In-Reply-To: <E15LTIY-0001Ul-00@the-village.bc.nu> <3B5083AE.71515696@mandrakesoft.com> <p05100309b77639cfaced@[207.213.214.37]>
Jonathan Lundell wrote:
> I take it the policy JG is referring to applies to including any
> kernel header files at all in userspace programs, and that __KERNEL__
> removal is a mere consequence of that policy.
>
> AC points out that syscall interfaces in glibc are a reasonable
> exception to that policy.
> What about a header like ethtool.h? Isn't its whole reason for
> existing to provide a common ABI for ethtool.c and the various
> drivers that support it?
no. this is counter to the
don't-include-kernel-headers-in-userspace-programs policy.
kernel types are not userspace types, kernel namespace isn't userspace
namespace.
> Likewise sockios.h, which ethtool (and no doubt many others) also
> #includes. Unless you're going to encapsulate all possible ioctl
> interfaces into libc, sockios.h (for example) provides a piece of the
> ABI that's needed by the user code, not just by libc. Why would it
> make sense to require retyping of this stuff?
> If, on the other hand, the argument is that user-kernel ABI
> definitions should be isolated in their own headers, and not mixed up
> (hence __KERNEL__), that's a much more restricted argument. My
> impression is that this is *not* the argument though; is it?
If there -must- be parts of the kernel that are visible to userspace,
yes, we should separate them and make that separation obvious. I would
not call our current setup obvious :)
IMHO the current __KERNEL__ "policy" is largely unenforced... It takes
no time at all to find any number of cases (drivers adding ioctls are
the worst) where a header is shared between userspace and kernelspace,
and it pollutes kernel types or structures to userspace, or vice versa.
If we want to avoid the retyping (which is IMHO the most clean
separation for all cases, even if it involves drudgery) then separating
out code into libc-only headers would be nice.
Jeff
--
Jeff Garzik | A recent study has shown that too much soup
Building 1024 | can cause malaise in laboratory mice.
MandrakeSoft |
next prev parent reply other threads:[~2001-07-14 18:20 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-07-14 10:38 (patch-2.4.6) Fix oops with Iomega Clik! (ide-floppy) Gunther Mayer
2001-07-14 12:15 ` Alan Cox
2001-07-14 15:00 ` Paul Bristow
2001-07-14 14:14 ` Christoph Hellwig
2001-07-14 15:18 ` Chris Wedgwood
2001-07-14 16:41 ` David Woodhouse
2001-07-14 16:47 ` David Woodhouse
2001-07-14 16:58 ` Chris Wedgwood
2001-07-14 17:02 ` Alan Cox
2001-07-14 17:11 ` Chris Wedgwood
2001-07-14 17:29 ` Jeff Garzik
2001-07-14 17:33 ` Alan Cox
2001-07-14 17:38 ` Jeff Garzik
2001-07-14 17:44 ` Alan Cox
2001-07-14 18:04 ` __KERNEL__ removal Jonathan Lundell
2001-07-14 18:19 ` Jeff Garzik [this message]
2001-07-14 18:30 ` Mo McKinlay
2001-07-15 11:53 ` Kai Henningsen
2001-07-15 13:12 ` Chris Wedgwood
2001-07-15 14:21 ` Horst von Brand
2001-07-16 9:16 ` Chris Wedgwood
2001-07-14 18:12 ` (patch-2.4.6) Fix oops with Iomega Clik! (ide-floppy) Wichert Akkerman
2001-07-15 3:40 ` Chris Wedgwood
2001-07-15 3:46 ` Jeff Garzik
2001-07-15 3:56 ` Chris Wedgwood
2001-07-14 18:09 ` David Woodhouse
2001-07-14 18:21 ` Jeff Garzik
2001-07-14 18:49 ` David Woodhouse
[not found] ` <mailman.995129400.8760.linux-kernel2news@redhat.com>
2001-07-14 18:36 ` Pete Zaitcev
-- strict thread matches above, loose matches on Subject: below --
2001-07-14 23:10 __KERNEL__ removal Rick Hohensee
2001-07-14 23:26 ` Alexander Viro
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=3B508D34.180A07A0@mandrakesoft.com \
--to=jgarzik@mandrakesoft.com \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=jlundell@pobox.com \
--cc=linux-kernel@vger.kernel.org \
--cc=torvalds@transmeta.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.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.