Skip to content

Commit a074335

Browse files
author
H. Peter Anvin
committed
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. Cc: Jeff Dike <jdike@addtoit.com> Cc: Richard Weinberger <richard@nod.at> Link: http://lkml.kernel.org/r/tip-45db1c6176c8171d9ae6fa6d82e07d115a5950ca@git.kernel.org Signed-off-by: H. Peter Anvin <hpa@zytor.com>
1 parent 45db1c6 commit a074335

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

arch/x86/um/sys_call_table_32.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ typedef void (*sys_call_ptr_t)(void);
4343

4444
extern void sys_ni_syscall(void);
4545

46-
sys_call_ptr_t sys_call_table[] __cacheline_aligned = {
46+
const sys_call_ptr_t sys_call_table[] __cacheline_aligned = {
4747
/*
4848
* Smells like a compiler bug -- it doesn't work
4949
* when the & below is removed.

arch/x86/um/sys_call_table_64.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ typedef void (*sys_call_ptr_t)(void);
4545

4646
extern void sys_ni_syscall(void);
4747

48-
sys_call_ptr_t sys_call_table[] __cacheline_aligned = {
48+
const sys_call_ptr_t sys_call_table[] __cacheline_aligned = {
4949
/*
5050
* Smells like a compiler bug -- it doesn't work
5151
* when the & below is removed.

0 commit comments

Comments
 (0)