public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Export handle_mm_fault to modules.
@ 2005-08-05 21:55 Stelian Pop
  2005-08-05 22:22 ` Dave Jones
  2005-08-05 23:02 ` Linus Torvalds
  0 siblings, 2 replies; 8+ messages in thread
From: Stelian Pop @ 2005-08-05 21:55 UTC (permalink / raw)
  To: Linus Torvalds, Linux Kernel Mailing List

handle_mm_fault changed from an inline function to a non-inline one
(__handle_mm_fault), which is not available to external kernel modules.
The patch below fixes this.

Stelian.

Export __handle_mm_fault to modules (called by the inlined handle_mm_fault function).

Signed-off-by: Stelian Pop <stelian@popies.net>

Index: linux-2.6.git/mm/memory.c
===================================================================
--- linux-2.6.git.orig/mm/memory.c	2005-08-05 22:26:20.000000000 +0200
+++ linux-2.6.git/mm/memory.c	2005-08-05 23:46:49.000000000 +0200
@@ -2061,6 +2061,7 @@
 	spin_unlock(&mm->page_table_lock);
 	return VM_FAULT_OOM;
 }
+EXPORT_SYMBOL(__handle_mm_fault);
 
 #ifndef __PAGETABLE_PUD_FOLDED
 /*

-- 
Stelian Pop <stelian@popies.net>


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] Export handle_mm_fault to modules.
  2005-08-05 21:55 [PATCH] Export handle_mm_fault to modules Stelian Pop
@ 2005-08-05 22:22 ` Dave Jones
  2005-08-05 23:02 ` Linus Torvalds
  1 sibling, 0 replies; 8+ messages in thread
From: Dave Jones @ 2005-08-05 22:22 UTC (permalink / raw)
  To: Stelian Pop; +Cc: Linus Torvalds, Linux Kernel Mailing List

On Fri, Aug 05, 2005 at 11:55:12PM +0200, Stelian Pop wrote:
 > handle_mm_fault changed from an inline function to a non-inline one
 > (__handle_mm_fault), which is not available to external kernel modules.
 > The patch below fixes this.
 > 
 > Stelian.
 > 
 > Export __handle_mm_fault to modules (called by the inlined handle_mm_fault function).

Which modules need this ?

		Dave


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] Export handle_mm_fault to modules.
  2005-08-05 21:55 [PATCH] Export handle_mm_fault to modules Stelian Pop
  2005-08-05 22:22 ` Dave Jones
@ 2005-08-05 23:02 ` Linus Torvalds
  2005-08-05 23:25   ` Olof Johansson
  1 sibling, 1 reply; 8+ messages in thread
From: Linus Torvalds @ 2005-08-05 23:02 UTC (permalink / raw)
  To: Stelian Pop; +Cc: Linux Kernel Mailing List



On Fri, 5 Aug 2005, Stelian Pop wrote:
>
> handle_mm_fault changed from an inline function to a non-inline one
> (__handle_mm_fault), which is not available to external kernel modules.
> The patch below fixes this.

We didn't use to export handle_mm_fault before, and it wasn't an inline 
function in 2.6.12 either. 

And no modules I know of call handle_mm_fault(). What module causes 
problems? That's very much a kernel internal function.

IOW, there's something wrong in your setup. It can't have worked on 2.6.12 
either, 

The only thing that has ever exported it afaik is

	arch/ppc/kernel/ppc_ksyms.c:EXPORT_SYMBOL(handle_mm_fault); /* For MOL */

and that looks pretty suspicious too (what is MOL, and regardless, 
shouldn't it be an EXPORT_SYMBOL_GPL?).

		Linus

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] Export handle_mm_fault to modules.
  2005-08-05 23:02 ` Linus Torvalds
@ 2005-08-05 23:25   ` Olof Johansson
  2005-08-05 23:43     ` Linus Torvalds
  0 siblings, 1 reply; 8+ messages in thread
From: Olof Johansson @ 2005-08-05 23:25 UTC (permalink / raw)
  To: Linus Torvalds; +Cc: Stelian Pop, Linux Kernel Mailing List

On Fri, Aug 05, 2005 at 04:02:13PM -0700, Linus Torvalds wrote:

> The only thing that has ever exported it afaik is
> 
> 	arch/ppc/kernel/ppc_ksyms.c:EXPORT_SYMBOL(handle_mm_fault); /* For MOL */
> 
> and that looks pretty suspicious too (what is MOL, and regardless, 
> shouldn't it be an EXPORT_SYMBOL_GPL?).

Mac-on-Linux, see http://www.maconlinux.org/. Run MacOS in a virtualized
machine under Linux (or the other way around). It's GPL.


-Olof

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] Export handle_mm_fault to modules.
  2005-08-05 23:25   ` Olof Johansson
@ 2005-08-05 23:43     ` Linus Torvalds
  2005-08-06 21:07       ` Stelian Pop
  2005-08-08  8:44       ` Arnd Bergmann
  0 siblings, 2 replies; 8+ messages in thread
From: Linus Torvalds @ 2005-08-05 23:43 UTC (permalink / raw)
  To: Olof Johansson; +Cc: Stelian Pop, Linux Kernel Mailing List



On Fri, 5 Aug 2005, Olof Johansson wrote:
>
> On Fri, Aug 05, 2005 at 04:02:13PM -0700, Linus Torvalds wrote:
> 
> > The only thing that has ever exported it afaik is
> > 
> > 	arch/ppc/kernel/ppc_ksyms.c:EXPORT_SYMBOL(handle_mm_fault); /* For MOL */
> > 
> > and that looks pretty suspicious too (what is MOL, and regardless, 
> > shouldn't it be an EXPORT_SYMBOL_GPL?).
> 
> Mac-on-Linux, see http://www.maconlinux.org/. Run MacOS in a virtualized
> machine under Linux (or the other way around). It's GPL.

Ok. Then I suspect the right patch is this one. Stelian, can you verify?

		Linus
---
diff --git a/arch/ppc/kernel/ppc_ksyms.c b/arch/ppc/kernel/ppc_ksyms.c
--- a/arch/ppc/kernel/ppc_ksyms.c
+++ b/arch/ppc/kernel/ppc_ksyms.c
@@ -324,7 +324,7 @@ EXPORT_SYMBOL(__res);
 
 EXPORT_SYMBOL(next_mmu_context);
 EXPORT_SYMBOL(set_context);
-EXPORT_SYMBOL(handle_mm_fault); /* For MOL */
+EXPORT_SYMBOL_GPL(__handle_mm_fault); /* For MOL */
 EXPORT_SYMBOL(disarm_decr);
 #ifdef CONFIG_PPC_STD_MMU
 extern long mol_trampoline;

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] Export handle_mm_fault to modules.
  2005-08-05 23:43     ` Linus Torvalds
@ 2005-08-06 21:07       ` Stelian Pop
  2005-08-08  8:44       ` Arnd Bergmann
  1 sibling, 0 replies; 8+ messages in thread
From: Stelian Pop @ 2005-08-06 21:07 UTC (permalink / raw)
  To: Linus Torvalds; +Cc: Olof Johansson, Linux Kernel Mailing List

Le vendredi 05 août 2005 à 16:43 -0700, Linus Torvalds a écrit :
> 
> On Fri, 5 Aug 2005, Olof Johansson wrote:
> >
> > On Fri, Aug 05, 2005 at 04:02:13PM -0700, Linus Torvalds wrote:
> > 
> > > The only thing that has ever exported it afaik is
> > > 
> > > 	arch/ppc/kernel/ppc_ksyms.c:EXPORT_SYMBOL(handle_mm_fault); /* For MOL */
> > > 
> > > and that looks pretty suspicious too (what is MOL, and regardless, 
> > > shouldn't it be an EXPORT_SYMBOL_GPL?).
> > 
> > Mac-on-Linux, see http://www.maconlinux.org/. Run MacOS in a virtualized
> > machine under Linux (or the other way around). It's GPL.
> 
> Ok. Then I suspect the right patch is this one. Stelian, can you verify?

I confirm, it works perfectly.

Stelian.

> 
> 		Linus
> ---
> diff --git a/arch/ppc/kernel/ppc_ksyms.c b/arch/ppc/kernel/ppc_ksyms.c
> --- a/arch/ppc/kernel/ppc_ksyms.c
> +++ b/arch/ppc/kernel/ppc_ksyms.c
> @@ -324,7 +324,7 @@ EXPORT_SYMBOL(__res);
>  
>  EXPORT_SYMBOL(next_mmu_context);
>  EXPORT_SYMBOL(set_context);
> -EXPORT_SYMBOL(handle_mm_fault); /* For MOL */
> +EXPORT_SYMBOL_GPL(__handle_mm_fault); /* For MOL */
>  EXPORT_SYMBOL(disarm_decr);
>  #ifdef CONFIG_PPC_STD_MMU
>  extern long mol_trampoline;
> 
-- 
Stelian Pop <stelian@popies.net>


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] Export handle_mm_fault to modules.
  2005-08-05 23:43     ` Linus Torvalds
  2005-08-06 21:07       ` Stelian Pop
@ 2005-08-08  8:44       ` Arnd Bergmann
  2005-08-08 18:42         ` Linus Torvalds
  1 sibling, 1 reply; 8+ messages in thread
From: Arnd Bergmann @ 2005-08-08  8:44 UTC (permalink / raw)
  To: Linus Torvalds; +Cc: Olof Johansson, Stelian Pop, Linux Kernel Mailing List

On Sünnavend 06 August 2005 01:43, Linus Torvalds wrote:
> diff --git a/arch/ppc/kernel/ppc_ksyms.c b/arch/ppc/kernel/ppc_ksyms.c
> --- a/arch/ppc/kernel/ppc_ksyms.c
> +++ b/arch/ppc/kernel/ppc_ksyms.c
> @@ -324,7 +324,7 @@ EXPORT_SYMBOL(__res);
>  
>  EXPORT_SYMBOL(next_mmu_context);
>  EXPORT_SYMBOL(set_context);
> -EXPORT_SYMBOL(handle_mm_fault); /* For MOL */
> +EXPORT_SYMBOL_GPL(__handle_mm_fault); /* For MOL */
>  EXPORT_SYMBOL(disarm_decr);
>  #ifdef CONFIG_PPC_STD_MMU
>  extern long mol_trampoline;

We will need the same export on ppc64 for managing SPEs on the
Cell processor. My current patch removes the export on ppc
and adds a global (*_GPL) one. Should I rather have another
architecture specific export in ppc64?

	Arnd <><

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] Export handle_mm_fault to modules.
  2005-08-08  8:44       ` Arnd Bergmann
@ 2005-08-08 18:42         ` Linus Torvalds
  0 siblings, 0 replies; 8+ messages in thread
From: Linus Torvalds @ 2005-08-08 18:42 UTC (permalink / raw)
  To: Arnd Bergmann; +Cc: Olof Johansson, Stelian Pop, Linux Kernel Mailing List



On Mon, 8 Aug 2005, Arnd Bergmann wrote:
> 
> We will need the same export on ppc64 for managing SPEs on the
> Cell processor. My current patch removes the export on ppc
> and adds a global (*_GPL) one. Should I rather have another
> architecture specific export in ppc64?

I don't see any reason not to make it global if there are two
architectures that need it. Especially as long as it's marked GPL-only so 
that people don't start misusing it.

		Linus

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2005-08-08 18:42 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-08-05 21:55 [PATCH] Export handle_mm_fault to modules Stelian Pop
2005-08-05 22:22 ` Dave Jones
2005-08-05 23:02 ` Linus Torvalds
2005-08-05 23:25   ` Olof Johansson
2005-08-05 23:43     ` Linus Torvalds
2005-08-06 21:07       ` Stelian Pop
2005-08-08  8:44       ` Arnd Bergmann
2005-08-08 18:42         ` Linus Torvalds

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox