Re: [PATCH] [39/40] i386: Export paravirt_ops for non GPL modulestoo
From: Jeremy Fitzhardinge
Date: Mon Apr 30 2007 - 17:31:13 EST
Alan Cox wrote:
> On Mon, 30 Apr 2007 11:50:09 +0100
> Christoph Hellwig <hch@xxxxxxxxxxxxx> wrote:
>
>
>> On Mon, Apr 30, 2007 at 12:28:14PM +0200, Andi Kleen wrote:
>>
>>> Otherwise non GPL modules cannot even do basic operations
>>> like disabling interrupts anymore, which would be excessive.
>>>
>>> Longer term should split the single structure up into
>>> internal and external symbols and not export the internal
>>> ones at all.
>>>
>>> Signed-off-by: Andi Kleen <ak@xxxxxxx>
>>>
>> Ingo was dead-set against this and I kinda agree.
>>
>
> Ditto - do the work first then merge it.
>
The majority of paravirt_ops entrypoints are things which are currently
exported as inline functions in headers anyway. There isn't a lot which
would become available to modules under a CONFIG_PARAVIRT kernel which
isn't already available to a non-CONFIG_PARAVIRT kernel.
We can hide the few remaining entries, I suppose. But any module which
used them would only work with a PARAVIRT kernel anyway, so its hardly
going to be the best course for a module author - assuming they're at
all useful anyway (ooh, look, we can activate an mm!).
If we want to address this consistently, then we could scatter a pile of
#ifndef MODULEs around the headers to make sure the inlines are not
visible to modules in either case. And we could correspondingly nobble
paravirt_ops by masking unexported entries with #ifndef MODULE.
So it isn't worth worrying about the paravirt_ops export unless you also
deal with the non-PARAVIRT case.
J
-
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/