Skip to contentSkip to conversation

archs: add Kconfig symbol for set memory ro feature

PATCH In review Marco Stornelli 1 participant 2 messages Oct 30, 2010 – Nov 3, 2010 x86

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 archs: add Kconfig symbol for set memory ro feature

From: Marco Stornelli <[email protected]>

This patch adds a new Kconfig symbol to recognize which arch implements a couple of functions set_memory_ro/set_memory_rw. These functions sets/unsets read-only flag at page table entry level. Until now only x86 has got these functions. Next target will be arm and powerpc.

---

arch/Kconfig +3 -0
@@ -83,6 +83,9 @@ config USER_RETURN_NOTIFIER
 config HAVE_IOREMAP_PROT
 	bool
 
+config HAVE_SET_MEMORY_RO
+	bool
+
 config HAVE_KPROBES
 	bool
 
arch/x86/Kconfig +1 -0
@@ -26,6 +26,7 @@ config X86
 	select HAVE_OPROFILE
 	select HAVE_PERF_EVENTS if (!M386 && !M486)
 	select HAVE_IOREMAP_PROT
+	select HAVE_SET_MEMORY_RO
 	select HAVE_KPROBES
 	select ARCH_WANT_OPTIONAL_GPIOLIB
 	select ARCH_WANT_FRAME_POINTERS
#1 lore raw

2010/10/30 Marco Stornelli <[email protected]>:

Quoted 6 lines

From: Marco Stornelli <[email protected]>

This patch adds a new Kconfig symbol to recognize which arch implements a couple of functions set_memory_ro/set_memory_rw. These functions sets/unsets read-only flag at page table entry level. Until now only x86 has got these functions. Next target will be arm and powerpc.

Any comments?

Marco