Re: [PATCH] [39/40] i386: Export paravirt_ops for non GPL modules too

2007-04-30 Thread Jeremy Fitzhardinge
Alan Cox wrote:
> On Mon, 30 Apr 2007 11:50:09 +0100
> Christoph Hellwig <[EMAIL PROTECTED]> 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 <[EMAIL PROTECTED]>
>>>   
>> 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 [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH] [39/40] i386: Export paravirt_ops for non GPL modules too

2007-04-30 Thread Andi Kleen
On Monday 30 April 2007 16:55:48 Alan Cox wrote:
> On Mon, 30 Apr 2007 11:50:09 +0100
> Christoph Hellwig <[EMAIL PROTECTED]> 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 <[EMAIL PROTECTED]>
> > 
> > Ingo was dead-set against this and I kinda agree. 
> 
> Ditto - do the work first then merge it.

Ok. Jeremy has come up with a ingenious simple solution. He promised 
a patch.

-Andi
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH] [39/40] i386: Export paravirt_ops for non GPL modules too

2007-04-30 Thread Alan Cox
On Mon, 30 Apr 2007 11:50:09 +0100
Christoph Hellwig <[EMAIL PROTECTED]> 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 <[EMAIL PROTECTED]>
> 
> Ingo was dead-set against this and I kinda agree. 

Ditto - do the work first then merge it.

NAK the patch
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH] [39/40] i386: Export paravirt_ops for non GPL modules too

2007-04-30 Thread Andi Kleen
> FWIW I think doing this first will be better, exposing _all_ to non GNU
> modules will weaken whatever case we might have to take it away later.

I have no problems taking it away later again. Or rather taking
away the symbols where non GPL code clearly has no business messing
with.

I don't think that applies to save_fl/restore_fl/irq_disable/irq_enable 
though. Undecided yet about the page table manipulation code (set_pte etc.)


-Andi
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH] [39/40] i386: Export paravirt_ops for non GPL modules too

2007-04-30 Thread Peter Zijlstra
On Mon, 2007-04-30 at 13:19 +0200, Andi Kleen wrote:
> On Monday 30 April 2007 13:15:36 Jan Engelhardt wrote:
> > 
> > On Apr 30 2007 13:00, Andi Kleen wrote:
> > >On Monday 30 April 2007 12:50:09 Christoph Hellwig 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 <[EMAIL PROTECTED]>
> > >> 
> > >> Ingo was dead-set against this and I kinda agree. 
> > >
> > >The problem is that without this non GPL modules cannot even disable
> > >interrupts anymore. That is imho too radical.
> > 
> > Perhaps we can have a paravirt_ops2 that specifically deals with
> > interrupt en/disable, and export that instead?
> 
> Yes that is what the "Longer term ..." paragraph above refers to.
> However it would need some restructuring in the code.

FWIW I think doing this first will be better, exposing _all_ to non GNU
modules will weaken whatever case we might have to take it away later.

So, NACK from me too.

I don't want to hear the whining; but it was allowed in .22, so why
should we not be able to do this in .23 or whatever.



-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH] [39/40] i386: Export paravirt_ops for non GPL modules too

2007-04-30 Thread Andi Kleen
On Monday 30 April 2007 13:15:36 Jan Engelhardt wrote:
> 
> On Apr 30 2007 13:00, Andi Kleen wrote:
> >On Monday 30 April 2007 12:50:09 Christoph Hellwig 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 <[EMAIL PROTECTED]>
> >> 
> >> Ingo was dead-set against this and I kinda agree. 
> >
> >The problem is that without this non GPL modules cannot even disable
> >interrupts anymore. That is imho too radical.
> 
> Perhaps we can have a paravirt_ops2 that specifically deals with
> interrupt en/disable, and export that instead?

Yes that is what the "Longer term ..." paragraph above refers to.
However it would need some restructuring in the code.

-Andi
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH] [39/40] i386: Export paravirt_ops for non GPL modules too

2007-04-30 Thread Jan Engelhardt

On Apr 30 2007 13:00, Andi Kleen wrote:
>On Monday 30 April 2007 12:50:09 Christoph Hellwig 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 <[EMAIL PROTECTED]>
>> 
>> Ingo was dead-set against this and I kinda agree. 
>
>The problem is that without this non GPL modules cannot even disable
>interrupts anymore. That is imho too radical.

Perhaps we can have a paravirt_ops2 that specifically deals with
interrupt en/disable, and export that instead?


Jan
-- 
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH] [39/40] i386: Export paravirt_ops for non GPL modules too

2007-04-30 Thread Jan Engelhardt

On Apr 30 2007 11:50, Christoph Hellwig 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 <[EMAIL PROTECTED]>
>
>Ingo was dead-set against this and I kinda agree. 

So would I, as unimportant as I am in that virtualization area.


Jan
-- 
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH] [39/40] i386: Export paravirt_ops for non GPL modules too

2007-04-30 Thread Andi Kleen
On Monday 30 April 2007 12:50:09 Christoph Hellwig 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 <[EMAIL PROTECTED]>
> 
> Ingo was dead-set against this and I kinda agree. 

The problem is that without this non GPL modules cannot even disable
interrupts anymore. That is imho too radical.

-Andi

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH] [39/40] i386: Export paravirt_ops for non GPL modules too

2007-04-30 Thread Christoph Hellwig
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 <[EMAIL PROTECTED]>

Ingo was dead-set against this and I kinda agree. 
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH] [39/40] i386: Export paravirt_ops for non GPL modules too

2007-04-30 Thread Christoph Hellwig
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 [EMAIL PROTECTED]

Ingo was dead-set against this and I kinda agree. 
-
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH] [39/40] i386: Export paravirt_ops for non GPL modules too

2007-04-30 Thread Andi Kleen
On Monday 30 April 2007 12:50:09 Christoph Hellwig 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 [EMAIL PROTECTED]
 
 Ingo was dead-set against this and I kinda agree. 

The problem is that without this non GPL modules cannot even disable
interrupts anymore. That is imho too radical.

-Andi

-
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH] [39/40] i386: Export paravirt_ops for non GPL modules too

2007-04-30 Thread Jan Engelhardt

On Apr 30 2007 11:50, Christoph Hellwig 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 [EMAIL PROTECTED]

Ingo was dead-set against this and I kinda agree. 

So would I, as unimportant as I am in that virtualization area.


Jan
-- 
-
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH] [39/40] i386: Export paravirt_ops for non GPL modules too

2007-04-30 Thread Jan Engelhardt

On Apr 30 2007 13:00, Andi Kleen wrote:
On Monday 30 April 2007 12:50:09 Christoph Hellwig 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 [EMAIL PROTECTED]
 
 Ingo was dead-set against this and I kinda agree. 

The problem is that without this non GPL modules cannot even disable
interrupts anymore. That is imho too radical.

Perhaps we can have a paravirt_ops2 that specifically deals with
interrupt en/disable, and export that instead?


Jan
-- 
-
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH] [39/40] i386: Export paravirt_ops for non GPL modules too

2007-04-30 Thread Andi Kleen
On Monday 30 April 2007 13:15:36 Jan Engelhardt wrote:
 
 On Apr 30 2007 13:00, Andi Kleen wrote:
 On Monday 30 April 2007 12:50:09 Christoph Hellwig 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 [EMAIL PROTECTED]
  
  Ingo was dead-set against this and I kinda agree. 
 
 The problem is that without this non GPL modules cannot even disable
 interrupts anymore. That is imho too radical.
 
 Perhaps we can have a paravirt_ops2 that specifically deals with
 interrupt en/disable, and export that instead?

Yes that is what the Longer term ... paragraph above refers to.
However it would need some restructuring in the code.

-Andi
-
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH] [39/40] i386: Export paravirt_ops for non GPL modules too

2007-04-30 Thread Peter Zijlstra
On Mon, 2007-04-30 at 13:19 +0200, Andi Kleen wrote:
 On Monday 30 April 2007 13:15:36 Jan Engelhardt wrote:
  
  On Apr 30 2007 13:00, Andi Kleen wrote:
  On Monday 30 April 2007 12:50:09 Christoph Hellwig 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 [EMAIL PROTECTED]
   
   Ingo was dead-set against this and I kinda agree. 
  
  The problem is that without this non GPL modules cannot even disable
  interrupts anymore. That is imho too radical.
  
  Perhaps we can have a paravirt_ops2 that specifically deals with
  interrupt en/disable, and export that instead?
 
 Yes that is what the Longer term ... paragraph above refers to.
 However it would need some restructuring in the code.

FWIW I think doing this first will be better, exposing _all_ to non GNU
modules will weaken whatever case we might have to take it away later.

So, NACK from me too.

I don't want to hear the whining; but it was allowed in .22, so why
should we not be able to do this in .23 or whatever.



-
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH] [39/40] i386: Export paravirt_ops for non GPL modules too

2007-04-30 Thread Andi Kleen
 FWIW I think doing this first will be better, exposing _all_ to non GNU
 modules will weaken whatever case we might have to take it away later.

I have no problems taking it away later again. Or rather taking
away the symbols where non GPL code clearly has no business messing
with.

I don't think that applies to save_fl/restore_fl/irq_disable/irq_enable 
though. Undecided yet about the page table manipulation code (set_pte etc.)


-Andi
-
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH] [39/40] i386: Export paravirt_ops for non GPL modules too

2007-04-30 Thread Alan Cox
On Mon, 30 Apr 2007 11:50:09 +0100
Christoph Hellwig [EMAIL PROTECTED] 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 [EMAIL PROTECTED]
 
 Ingo was dead-set against this and I kinda agree. 

Ditto - do the work first then merge it.

NAK the patch
-
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH] [39/40] i386: Export paravirt_ops for non GPL modules too

2007-04-30 Thread Andi Kleen
On Monday 30 April 2007 16:55:48 Alan Cox wrote:
 On Mon, 30 Apr 2007 11:50:09 +0100
 Christoph Hellwig [EMAIL PROTECTED] 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 [EMAIL PROTECTED]
  
  Ingo was dead-set against this and I kinda agree. 
 
 Ditto - do the work first then merge it.

Ok. Jeremy has come up with a ingenious simple solution. He promised 
a patch.

-Andi
-
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH] [39/40] i386: Export paravirt_ops for non GPL modules too

2007-04-30 Thread Jeremy Fitzhardinge
Alan Cox wrote:
 On Mon, 30 Apr 2007 11:50:09 +0100
 Christoph Hellwig [EMAIL PROTECTED] 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 [EMAIL PROTECTED]
   
 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 [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/