Re: [PATCH -tip] x86: headers - fix export private data touserspace

From: Cyrill Gorcunov
Date: Tue Jan 13 2009 - 14:00:39 EST


[H. Peter Anvin - Tue, Jan 13, 2009 at 10:55:30AM -0800]
| Cyrill Gorcunov wrote:
| > | >
| > | >> 4) setup.h - COMMAND_LINE_SIZE saved for userspace, bootloaders
| > | >> could use it.
| > | >
| > | > Doesn't this need to be (at least) _COMMAND_LINE_SIZE to avoid
| > | > polluting the namespace, not sure it can be changed though as the
| > | > horse is already out of the barn.
| > |
| > | No, this is not one of those cases, but it's worth explaining why.
| > |
| > | You can introduce symbols into the general namespace if *and only if*
| > | they are in a header file that is invoked directly by the user. In
| > | other words, such a header file is unusable by libc, but setup.h doesn't
| > | contain anything needed by libc in the first place.
| > |
| > | -hpa
| > |
| >
| > So we could just fence it by __KERNEL__?
| >
|
| We might, as userspace shouldn't need COMMAND_LINE_SIZE anyway (see
| other post), but I'm rather confused as how you got that from what I
| wrote above.
|
| -hpa
|
| --
| H. Peter Anvin, Intel Open Source Technology Center
| I work for Intel. I don't speak on their behalf.
|

The thing is that kernel headers are not only touched by libc.
Someone could write a program and include setup.h there.
Or I translated you wrong :)

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