[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Cleaning up kernel's headers for userspace



On Mon, 2006-04-24 at 12:45 +0100, David Woodhouse wrote:
> The Linux kernel makes a complete abortion of exporting stuff to
> userspace in its headers. I'm trying to clean this up -- I've
> implemented a 'make headers_install' in the kernel tree which copies out
> selected headers which are supposed to be user-visible, and runs them
> through unifdef if appropriate.
> 
> I've also added a 'make headers_check' which currently only does a
> primitive check that the exported headers don't try to include anything
> which _wasn't_ selected for inclusion, but hopefully can be extended to
> check that each header is compilable on its own, and check for namespace
> pollution, etc. 
> 
> I've also committed a few fixes so that the PowerPC kernel actually
> passes the 'make headers_check'. This is all in a git tree at
> git://git.infradead.org/~dwmw2/headers-2.6.git -- browsable at
> http://git.infradead.org/?p=users/dwmw2/headers-2.6.git 
> 
> As maintainers for glibc and/or kernel headers in various distributions,
> I'd like to solicit your feedback, and possibly also your assistance.
> Does this look like it's going to address your needs and give you
> something which you can just drop into /usr/include/ and use as it is?
> If not, what's wrong with it and what can we do about it?
> 
> If all is well with the approach, I'd like to get it merged upstream and
> then get started on actually cleaning up the crap which is exported, now
> that 'make headers_install' actually puts it somewhere we can see it in
> context. 

Update.... I've been shipping the output of this in Fedora's development
tree for a while, and the upcoming Fedora Core 6 test 1 has been
entirely built against it. I'm fairly happy with its current state.

Since 2.6.17 is due for release imminently, I hope to send it to Linus
fairly shortly too -- so I'm asking once again for feedback.

The feedback was generally positive before, but it was early days. Now
that it's taken shape, I'd like more specifics -- is there anything
about this which makes it unsuitable for your use? Anything which you
think we should change? Other comments?

At some point in the fairly near future I'd like to tighten up the list
of files we 'export' -- removing asm/atomic.h in particular, since it's
absolutely broken for anyone in userspace. But I don't want to enforce
policy like that (which some nutters might actually object to) in the
first pass. Let's get the mechanism in place first...

-- 
dwmw2



Reply to: