aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86_64
diff options
context:
space:
mode:
authorArjan van de Ven <arjan@infradead.org>2006-01-06 03:12:05 -0500
committerLinus Torvalds <torvalds@g5.osdl.org>2006-01-06 11:33:36 -0500
commitbb152f53120d66c98c1f16518407df6a84f23714 (patch)
tree6696d5eccee5af88a7326edaebbd819e628b3e2c /arch/x86_64
parent67df197b1a07944c2e0e40ded3d4fd07d108e110 (diff)
[PATCH] x86/x86_64: mark rodata section read-only: make some datastructures const
Mark some key kernel datastructures readonly. This patch was previously posted on Jun 28th but was back then not merged because nothing was enforcing rodata anyway.. well that changed now :) Patch by Christoph Lameter <christoph@lameter.com> and Dave Jones <davej@redhat.com> Signed-off-by: Arjan van de Ven <arjan@infradead.org> Signed-off-by: Ingo Molnar <mingo@elte.hu> Cc: Andi Kleen <ak@muc.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'arch/x86_64')
-rw-r--r--arch/x86_64/ia32/ia32entry.S2
-rw-r--r--arch/x86_64/kernel/syscall.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/arch/x86_64/ia32/ia32entry.S b/arch/x86_64/ia32/ia32entry.S
index e0eb0c712fe9..df0773c9bdbe 100644
--- a/arch/x86_64/ia32/ia32entry.S
+++ b/arch/x86_64/ia32/ia32entry.S
@@ -341,7 +341,7 @@ ENTRY(ia32_ptregs_common)
341 jmp ia32_sysret /* misbalances the return cache */ 341 jmp ia32_sysret /* misbalances the return cache */
342 CFI_ENDPROC 342 CFI_ENDPROC
343 343
344 .data 344 .section .rodata,"a"
345 .align 8 345 .align 8
346 .globl ia32_sys_call_table 346 .globl ia32_sys_call_table
347ia32_sys_call_table: 347ia32_sys_call_table:
diff --git a/arch/x86_64/kernel/syscall.c b/arch/x86_64/kernel/syscall.c
index e263685f864c..7c176b3edde0 100644
--- a/arch/x86_64/kernel/syscall.c
+++ b/arch/x86_64/kernel/syscall.c
@@ -19,7 +19,7 @@ typedef void (*sys_call_ptr_t)(void);
19 19
20extern void sys_ni_syscall(void); 20extern void sys_ni_syscall(void);
21 21
22sys_call_ptr_t sys_call_table[__NR_syscall_max+1] __cacheline_aligned = { 22const sys_call_ptr_t sys_call_table[__NR_syscall_max+1] = {
23 /* Smells like a like a compiler bug -- it doesn't work when the & below is removed. */ 23 /* Smells like a like a compiler bug -- it doesn't work when the & below is removed. */
24 [0 ... __NR_syscall_max] = &sys_ni_syscall, 24 [0 ... __NR_syscall_max] = &sys_ni_syscall,
25#include <asm-x86_64/unistd.h> 25#include <asm-x86_64/unistd.h>