Skip to contentSkip to conversation

x86, um: Mark system call tables readonly

tip:x86/syscall tip-bot for H. Peter Anvin 1 participant 1 message Dec 6, 2011 1 message not in the archive

Subsystems (2)
lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw
Commit-ID:  a074335a370eca6d72f2ec890e4ae22923a2aea4
Gitweb:     http://git.kernel.org/tip/a074335a370eca6d72f2ec890e4ae22923a2aea4
Author:     H. Peter Anvin <[email protected]>
AuthorDate: Mon, 5 Dec 2011 22:48:49 -0800
Committer:  H. Peter Anvin <[email protected]>
CommitDate: Mon, 5 Dec 2011 22:56:38 -0800

x86, um: Mark system call tables readonly

Mark the system call tables readonly, as they already are on native, and the 32-bit UM version was in the previous assembly version. The 32-bit version lost it due to copy and paste from the 64-bit version, which was missing the const.

---
 arch/x86/um/sys_call_table_32.c |    2 +-
 arch/x86/um/sys_call_table_64.c |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
arch/x86/um/sys_call_table_32.c +1 -1
index b897fca..0606aa3 100644
@@ -43,7 +43,7 @@ typedef void (*sys_call_ptr_t)(void);
 
 extern void sys_ni_syscall(void);
 
-sys_call_ptr_t sys_call_table[] __cacheline_aligned = {
+const sys_call_ptr_t sys_call_table[] __cacheline_aligned = {
 	/*
 	 * Smells like a compiler bug -- it doesn't work
 	 * when the & below is removed.
arch/x86/um/sys_call_table_64.c +1 -1
index 797a639..fe626c3 100644
@@ -45,7 +45,7 @@ typedef void (*sys_call_ptr_t)(void);
 
 extern void sys_ni_syscall(void);
 
-sys_call_ptr_t sys_call_table[] __cacheline_aligned = {
+const sys_call_ptr_t sys_call_table[] __cacheline_aligned = {
 	/*
 	 * Smells like a compiler bug -- it doesn't work
 	 * when the & below is removed.