Re: [PATCH] ethtool.h should use userspace-accessible types

From: Jonathan Lundell
Date: Mon Mar 15 2004 - 16:27:41 EST

At 9:25 PM -0600 3/13/04, Matt Mackall wrote:
On Fri, Mar 12, 2004 at 01:48:54PM -0800, Jonathan Lundell wrote:
At 10:06 AM -0700 3/12/04, Eric W. Biederman wrote:
>My intent was to say: Why change the types when there is no #ifdef
>__KERNEL__ in the header. With no #ifdef __KERNEL__ it exports
>definitions that are private to the kernel making it not safe for
>userspace to use. With kernel private definitions in there it will
>generate name space pollution if included by user space.

Presumably because it *is* included by userspace, because it defines
the interface between the kernel and userspace; of course userspace
will (does) include it.

Well that's a bug. You don't include kernel headers in userspace.
Doing so has been deprecated for 8 years and 3 major releases.

Then it's a bug for the ethtool maintainer. ethtool.c #includes ethtool-copy.h, a renamed copy of the kernel header file.

I'm familiar with the deprecation and continue to be bewildered by it. To take this particular example, ethtool.h defines an interface between a kernel facility and a userspace client. What's the non-deprecated method of sharing the interface definition?
/Jonathan Lundell.
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at
Please read the FAQ at