Re: [mingo@elte.hu: [git pull] headers_check fixes]

From: Ingo Molnar
Date: Tue Jan 27 2009 - 18:32:24 EST



* Linus Torvalds <torvalds@xxxxxxxxxxxxxxxxxxxx> wrote:

> There are parts of the patches that look fine, like moving __KERNEL__
> checks around a bit, and changing <asm/types.h> to <linux/types.h> which
> looks correct _both_ in a kernel and in a user context, but I dislike
> the stupid parts.

okay - that was the general thinking and this went through a few
iterations already - not enough it appears. The CONFIG_* thing was
something that looked somewhat dubious to me too - changing it to those
random __foo symbols didnt seem like an improvement.

Jaswider, would you mind re-doing the tree filtering out the CONFIG_*
changes? I'll go over the end result once more to make sure it has no
changes that make the code look worse.

I still think what i expressed elsewhere in these threads on lkml:
'exporting' 75,000 lines of random kernel headers to user-space is really
stretching the term - kernel-space is unaware of it in 90% of the cases.
"spilling our guts to user-space" would be a more fair description.

It would be much better if we exported _much_ less and reduced our
cross-section to user-space. Also, the include/linux/Kbuild rules are all
but transparent: it would also be nice if whatever we exported was be
visible straight in the header itself, to make it obvious to people who
modify/extend those files that those definitions are going to be exported
to user-space.

Some __user_export tag on structures perhaps? I have no good ideas here -
#ifdefs are ugly and tags obscure the purity of the code.

Ingo
--
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/