Re: Using kernel headers that are not for the running kernel

From: Jeff Garzik
Date: Sun Jun 20 2004 - 11:25:18 EST


On Sat, Jun 19, 2004 at 05:46:50AM -0500, Rob Landley wrote:
> The linux-kernel maintainers apparently decided that C libraries using kernel
> headers to actually interface with the kernel was a bad idea. Apparently,
> interfacing with the kernel from a C library is not a proper use for kernel
> headers, or something. (I tried to follow the logic in this discussion, but
> never actually found any, despite repeated attempts. It always seemed to
> boil down to "can't be bothered", "userspace shouldn't use kernel headers and
> this includes the C library", etc...)

No, the problem is that the only thing that needs to be shared are the
_ABI_ headers, which are unfortunately mixed in with kernel-internal
headers and definitions. This leads to use of kernel-internal
definitions in userspace, which leads to breakage. This also leads to
restrictions on changing -kernel-internal- headers, because some
userspace wanker is complaining.

Kernel-internal headers and definitions should absolutely never be used
in userspace.

H. Peter Anvin has suggested an include/abi which could be shared, and
this seem quite reasonable to me. However, the monumental task of
separating kernel-internal definitions from ABI definitions still
remains.

Jeff, really glad the linux-libc-headers guys started his effort



-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/