Skip to contentSkip to conversation

kernel/module.c: use linux/set_memory.h

PATCH New [email protected] 1 participant 1 message Jul 6, 2017

lore
Share & tools
lore
#0 lore raw

PATCH 12/108 kernel/module.c: use linux/set_memory.h

From: Michael Ellerman <[email protected]>
Subject: kernel/module.c: use linux/set_memory.h

This header always exists, so doesn't require an ifdef around its inclusion. When CONFIG_ARCH_HAS_SET_MEMORY=y it includes the asm header, otherwise it provides empty versions of the set_memory_xx() routines.

The usages of set_memory_xx() are still guarded by CONFIG_STRICT_MODULE_RWX.

---

 kernel/module.c |    4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
kernel/module.c renamed from kernel/module.c~module-use-linux-set_memoryh +1 -3
diff -puN kernel/module.c~module-use-linux-set_memoryh kernel/module.c
@@ -49,9 +49,7 @@
 #include <linux/rculist.h>
 #include <linux/uaccess.h>
 #include <asm/cacheflush.h>
-#ifdef CONFIG_STRICT_MODULE_RWX
-#include <asm/set_memory.h>
-#endif
+#include <linux/set_memory.h>
 #include <asm/mmu_context.h>
 #include <linux/license.h>
 #include <asm/sections.h>

_