x86: Fix sys_call_table type in asm/syscall.h
PATCH 1/1 x86: Fix sys_call_table type in asm/syscall.h
From: Andi Kleen <[email protected]>
Make the sys_call_table type defined in asm/syscall.h match the definition in syscall_64.c
--- arch/x86/include/asm/syscall.h | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-)
arch/x86/include/asm/syscall.h +2 -1
@@ -16,7 +16,8 @@#include <linux/sched.h> #include <linux/err.h> -extern const unsigned long sys_call_table[]; +typedef void (*sys_call_ptr_t )(void ); +extern const sys_call_ptr_t sys_call_table[];/* * Only the low 32 bits of orig_ax are meaningful, so we return int.
Signature · 1 line
1.7.4.4
Quoted 16 lines · Andi Kleen
From: Andi Kleen <[email protected]>
Make the
sys_call_tabletype defined inasm/syscall.hmatch the definition insyscall_64.cSigned-off-by Andi Kleen <[email protected]>--- arch/x86/include/asm/syscall.h | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-)arch/x86/include/asm/syscall.h +0
-0
arch/x86/include/asm/syscall.h line 23
Quoted 9 lines
arch/x86/include/asm/syscall.h +2
-1@@ -16,7 +16,8 @@#include <linux/sched.h> #include <linux/err.h> -extern const unsigned long sys_call_table[]; +typedef void (*sys_call_ptr_t )(void ); +extern const sys_call_ptr_t sys_call_table[];/* * Only the low 32 bits of orig_ax are meaningful, so we return int.
There's an obvious problem with this patch, please fix it and resend.
Thanks,
Ingo
Quoted 1 line
There's an obvious problem with this patch, please fix it and resend.
Nothing obvious to me. Can you be more specific?
-Andi
Quoted 3 lines · Andi Kleen
Quoted 1 line
There's an obvious problem with this patch, please fix it and resend.
Nothing obvious to me. Can you be more specific?
Sure, a trivial git grep of the sys_call_ptr_t typedef you added to syscall.h shows:
~/tip> git grep sys_call_ptr_t arch/um/sys-x86_64/syscall_table.c:typedef void (*sys_call_ptr_t)(void); arch/x86/include/asm/syscall.h:typedef void (*sys_call_ptr_t)(void); arch/x86/kernel/syscall_64.c:typedef void (*sys_call_ptr_t)(void);
So you've now added a third typedef in addition to the two existing ones. We obivously only want one in the kernel - the one you added to the header file.
Thanks,
Ingo