Skip to contentSkip to conversation

arm: mm: export set_memory_x and set_meory_nx

PATCH New Jungseung Lee 2 participants 2 messages Sep 1, 2016 Arm (32-bit)

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 arm: mm: export set_memory_x and set_meory_nx

This patch exports set_memory_x and set_memory_nx functions. It is still allowed for modules to use these functions in other architectures. In a similar manner to arm, export these functions.

---
 arch/arm/mm/pageattr.c |    2 ++
 1 file changed, 2 insertions(+)
arch/arm/mm/pageattr.c +2 -0
index d19b1ad..abf6695 100644
@@ -88,6 +88,7 @@ int set_memory_nx(unsigned long addr, int numpages)
 					__pgprot(L_PTE_XN),
 					__pgprot(0));
 }
+EXPORT_SYMBOL_GPL(set_memory_nx);
 
 int set_memory_x(unsigned long addr, int numpages)
 {
@@ -95,3 +96,4 @@ int set_memory_x(unsigned long addr, int numpages)
 					__pgprot(0),
 					__pgprot(L_PTE_XN));
 }
+EXPORT_SYMBOL_GPL(set_memory_x);
Signature · 1 line
1.7.9.5
#1 lore raw

PATCH 1/1 arm: mm: export set_memory_x and set_meory_nx

Quoted 3 lines · Jungseung Lee

This patch exports set_memory_x and set_memory_nx functions. It is still allowed for modules to use these functions in other architectures. In a similar manner to arm, export these functions.

They don't work on general kernel memory, so I'd much prefer that these weren't exported.

I see no users of set_memory_nx() in modules. There's one module that uses set_memory_x(), which is drivers/watchdog/hpwdt.c. The three users of that are ifdef'd for x86 cases, and it's used on the result of ioremapping, which will fail on ARMs implementation (which only allows modules memory.)

Signature · 3 lines
RMK's Patch system: http://www.armlinux.org.uk/developer/patches/
FTTC broadband for 0.8mile line: currently at 9.6Mbps down 400kbps up
according to speedtest.net.