Keith Owens wrote:
> Linus has spoken, it is an error for user space applications to
> include kernel headers.  Even modutils does not include
> linux/module.h, instead it has a portable (2.0 through 2.4) local
> definition of struct module.

Oh my.  This isn't clear to the part-time kernel hacker; to install
[...]linux/include/linux in /usr/include/linux implies that those headers
can and should be used in user-space.  I've already done this several
times, in order to use kernel structures from user space.  Whoops :-)

Perhaps the header files that are intended to be used only within the
kernel tree could be moved to a seperate directory, and then not installed
in /usr/include.  Obviously 2.5 material, if Linus is so inclined.

I would rather a build break when what's defined in a kernel header file
gets changed (such as a critical structure, or the like) and further
maintenance of the user-space utilities is needed; a "heads-up" to the
maintainer if nothing else.  The recent episode with klogd is a fine
example of how well that would work.  If klogd had its own copies of
headers and built fine, we all would quite possibly still not know about
the inconsistency.

-Glen



-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
Please read the FAQ at http://www.tux.org/lkml/

Reply via email to