Skip to contentSkip to conversation

Export handle_mm_fault to modules.

PATCH In review Stelian Pop 5 participants 8 messages Aug 5, 2005 – Aug 8, 2005

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Export handle_mm_fault to modules.

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).

mm/memory.c +1 -0
Index: linux-2.6.git/mm/memory.c
===================================================================
@@ -2061,6 +2061,7 @@
 	spin_unlock(&mm->page_table_lock);
 	return VM_FAULT_OOM;
 }
+EXPORT_SYMBOL(__handle_mm_fault);
 
 #ifndef __PAGETABLE_PUD_FOLDED
 /*
Signature · 1 line
Stelian Pop <[email protected]>
#1 lore raw
Quoted 7 lines · Stelian Pop

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

#2 lore raw
In reply to Stelian Pop
Quoted 4 lines · Stelian Pop

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

#3 lore raw
Quoted 6 lines · Linus Torvalds

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

#4 lore raw
Quoted 5 lines · Olof Johansson
Quoted 2 lines · Linus Torvalds

The only thing that has ever exported it afaik is

Quoted 7 lines
Quoted 4 lines

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

arch/ppc/kernel/ppc_ksyms.c +1 -1
@@ -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;
#5 lore raw
Quoted 9 lines · Linus Torvalds
Quoted 7 lines · Olof Johansson
Quoted 4 lines · Linus Torvalds

The only thing that has ever exported it afaik is

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

Quoted 7 lines
Quoted 5 lines
Quoted 2 lines

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.

Quoted 16 lines

Linus
---

arch/ppc/kernel/ppc_ksyms.c +1 -1
@@ -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;
Signature · 1 line
Stelian Pop <[email protected]>
#6 lore raw
In reply to Linus Torvalds
Quoted 9 lines · Linus Torvalds
arch/ppc/kernel/ppc_ksyms.c +0 -0
@@ -324,7 +324,7 @@ EXPORT_SYMBOL(__res);


 EXPORT_SYMBOL(next_mmu_context);
 EXPORT_SYMBOL(set_context);

arch/ppc/kernel/ppc_ksyms.c +1 -1
-EXPORT_SYMBOL(handle_mm_fault); /* For MOL */
+EXPORT_SYMBOL_GPL(__handle_mm_fault); /* For MOL */
Quoted 3 lines

 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 <><
#7 lore raw
Quoted 5 lines · Arnd Bergmann

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