Skip to contentSkip to conversation

ARM: mm: allow set_memory_*() to be used on the vmalloc region

PATCH New Russell King 1 participant 1 message Nov 21, 2016 Arm (32-bit)

lore
Share & tools
lore
#0 lore raw

PATCH 2/2 ARM: mm: allow set_memory_*() to be used on the vmalloc region

We can allow modules to be loaded into the vmalloc region, where they should also benefit from the same protections as those loaded into the more efficient module region. Allow these functions to operate there as well.

---
 arch/arm/mm/pageattr.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
arch/arm/mm/pageattr.c +2 -1
index db09f2e7efda..ad8032bfe734 100644
@@ -55,7 +55,8 @@ static int change_memory_common(unsigned long addr, int numpages,
 	if (!size)
 		return 0;
 
-	if (!in_range(start, size, MODULES_VADDR, MODULES_END))
+	if (!in_range(start, size, MODULES_VADDR, MODULES_END) &&
+	    !in_range(start, size, VMALLOC_START, VMALLOC_END))
 		return -EINVAL;
 
 	data.set_mask = set_mask;
Signature · 1 line
2.7.4