Re: [RFC] Splitting kernel headers and deprecating __KERNEL__

Alex Riesen
2004-11-30T08:09:04Z

On Mon, 29 Nov 2004 09:42:16 +0000, David Woodhouse <dwmw2@infradead.org> wrote:
> I've lost track of the number of times things have broken because of
> incorrect use of kernel headers from userspace. That's what we're trying
> to fix -- by putting only the bits which are _supposed_ to be visible
> into files which userspace sees, where we know they define part of the
> userspace API and hence we can be extremely careful when editing them.

how about generating the user-visible interfaces and structures from the headers
using something like sparse and defined annotations? I.e.:

struct iovec
{
void __user *iov_base;
__kernel_size_t iov_len;
} __user_api__;