Re: [PATCH] KVM: Avoid using CONFIG_ in userspace visible headers

From: Ingo Molnar
Date: Mon Jan 19 2009 - 08:22:48 EST



* Avi Kivity <avi@xxxxxxxxxx> wrote:

> Ingo Molnar wrote:
>> * Avi Kivity <avi@xxxxxxxxxx> wrote:
>>
>>
>>> Kconfig symbols are not available in userspace, and are not stripped by
>>> headers-install. Avoid their use by adding #defines in <asm/kvm.h> to
>>> suit each architecture.
>>>
>>>
>> looks good - you will push this via the KVM tree, right?
>>
>
> Yes. Thanks for the review.

btw., would be nice to somehow untangle consciously-exported interface
definitions from kernel side bits, and standardize these
feature/capability flags like __KVM_HAVE_IOAPIC, etc.

Right now we have this body of 75,000 lines of code spread out in 600+
header files that are so-called 'exported' to user-space, but 95% of that
interface definition code is never being relied on by any user-space bit!
They are exported due to cargo-cult mentality or due to dependencies.

It would be far better to have an explicit place for such bits,
include/syscall-ABI/ or so - and not export _any_ other kernel headers.
But that's a much larger project.

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/