[prev in list] [next in list] [prev in thread] [next in thread] 

List:       linux-kernel
Subject:    Re: Linux 2.4-test9 kernel header flaw
From:       "H. Peter Anvin" <hpa () transmeta ! com>
Date:       2000-09-30 18:42:42
[Download RAW message or body]

Jeff Garzik wrote:
> 
> On 29 Sep 2000, H. Peter Anvin wrote:
> > Followup to:  <20000929014109.A15021@veritas.com>
> > By author:    Andries Brouwer <aeb@veritas.com>
> > In newsgroup: linux.dev.kernel
> > >
> > > On Thu, Sep 28, 2000 at 03:41:41PM -0700, Jack Howarth wrote:
> > >
> > > > I find that the compile of gnome-utils fails as follows...
> > > >
> > > >  In file included from /usr/include/linux/string.h:21,
> > > >                   from /usr/include/linux/fs.h:23,
> > > >                  from badblocks.c:43:
> > >
> > > Yes, a well-known phenomenon.
> > > Kernel headers are to compile the kernel.
> > > They are not for inclusion in user programs.
> > >
> >
> > It really doesn't work in practice.  There are enough things that
> > really need it.
> >
> > We really need #ifdef __KERNEL__ (or is that #ifdef _LINUX now?) in
> > the appropriate places.
> 
> For specific driver ioctl interfaces and such, I agree...
> 
> But gnome-utils?  I don't think userspace needs to be looking at our
> fs.h, string.h, etc.
> 

It sounds like what's collapsing is badblocks, which probably uses ioctl
interfaces.

The main problem tends to be linux/fs.h, which is a huge file, some of
which is indeed needed by userspace.  It perpetually causes problems
because someone included something non-userspace-safe in this file.

	-hpa

-- 
<hpa@transmeta.com> at work, <hpa@zytor.com> in private!
"Unix gives you enough rope to shoot yourself in the foot."
http://www.zytor.com/~hpa/puzzle.txt
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic