summaryrefslogtreecommitdiff
path: root/init
diff options
context:
space:
mode:
authorArjan van de Ven <arjan@infradead.org>2006-01-06 00:12:01 -0800
committerLinus Torvalds <torvalds@g5.osdl.org>2006-01-06 08:33:36 -0800
commit37b73c828185731f6236a6387c02d7b08c150810 (patch)
tree312b9f082f78072aba62ee2230e417928156873e /init
parentd89c145c0344fe2180336af6a309a59a8bc8c1c0 (diff)
downloadlinux-37b73c828185731f6236a6387c02d7b08c150810.tar.gz
linux-37b73c828185731f6236a6387c02d7b08c150810.tar.xz
[PATCH] x86/x86_64: mark rodata section read only: generic infrastructure
Generic prep-work for marking the .rodata section readonly: * Align the rodata section at 4Kb boundary * call the mark_rodata_ro() function when available Signed-off-by: Arjan van de Ven <arjan@infradead.org> Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Adrian Bunk <bunk@stusta.de> Cc: Andi Kleen <ak@muc.de> Signed-off-by: Jesper Juhl <jesper.juhl@gmail.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'init')
-rw-r--r--init/main.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/init/main.c b/init/main.c
index 54aaf561cf66..2ed3638deec7 100644
--- a/init/main.c
+++ b/init/main.c
@@ -52,6 +52,7 @@
#include <asm/bugs.h>
#include <asm/setup.h>
#include <asm/sections.h>
+#include <asm/cacheflush.h>
/*
* This is one of the first .c files built. Error out early
@@ -99,6 +100,9 @@ extern void acpi_early_init(void);
#else
static inline void acpi_early_init(void) { }
#endif
+#ifndef CONFIG_DEBUG_RODATA
+static inline void mark_rodata_ro(void) { }
+#endif
#ifdef CONFIG_TC
extern void tc_init(void);
@@ -708,6 +712,7 @@ static int init(void * unused)
*/
free_initmem();
unlock_kernel();
+ mark_rodata_ro();
system_state = SYSTEM_RUNNING;
numa_default_policy();