diff options
author | Andy Lutomirski <luto@kernel.org> | 2016-01-28 18:11:24 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2016-01-29 03:46:38 -0500 |
commit | cfcbadb49dabb05efa23e1a0f95f3391c0a815bc (patch) | |
tree | 4db34be982c4d1e4604bd9c4fbe9e3bb6ce432aa /arch/x86/um | |
parent | 3e65654e3db6df6aba9c5b895f8b8e6a8d8eb508 (diff) |
x86/syscalls: Add syscall entry qualifiers
This will let us specify something like 'sys_xyz/foo' instead of
'sys_xyz' in the syscall table, where the 'foo' qualifier conveys
some extra information to the C code.
The intent is to allow things like sys_execve/ptregs to indicate
that sys_execve() touches pt_regs.
Signed-off-by: Andy Lutomirski <luto@kernel.org>
Cc: Andy Lutomirski <luto@amacapital.net>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Brian Gerst <brgerst@gmail.com>
Cc: Denys Vlasenko <dvlasenk@redhat.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: H. Peter Anvin <hpa@zytor.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Link: http://lkml.kernel.org/r/2de06e33dce62556b3ec662006fcb295504e296e.1454022279.git.luto@kernel.org
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'arch/x86/um')
-rw-r--r-- | arch/x86/um/sys_call_table_32.c | 4 | ||||
-rw-r--r-- | arch/x86/um/sys_call_table_64.c | 4 | ||||
-rw-r--r-- | arch/x86/um/user-offsets.c | 4 |
3 files changed, 6 insertions, 6 deletions
diff --git a/arch/x86/um/sys_call_table_32.c b/arch/x86/um/sys_call_table_32.c index d4669a679fd0..bfce503dffae 100644 --- a/arch/x86/um/sys_call_table_32.c +++ b/arch/x86/um/sys_call_table_32.c | |||
@@ -25,11 +25,11 @@ | |||
25 | 25 | ||
26 | #define old_mmap sys_old_mmap | 26 | #define old_mmap sys_old_mmap |
27 | 27 | ||
28 | #define __SYSCALL_I386(nr, sym) extern asmlinkage long sym(unsigned long, unsigned long, unsigned long, unsigned long, unsigned long, unsigned long) ; | 28 | #define __SYSCALL_I386(nr, sym, qual) extern asmlinkage long sym(unsigned long, unsigned long, unsigned long, unsigned long, unsigned long, unsigned long) ; |
29 | #include <asm/syscalls_32.h> | 29 | #include <asm/syscalls_32.h> |
30 | 30 | ||
31 | #undef __SYSCALL_I386 | 31 | #undef __SYSCALL_I386 |
32 | #define __SYSCALL_I386(nr, sym) [ nr ] = sym, | 32 | #define __SYSCALL_I386(nr, sym, qual) [ nr ] = sym, |
33 | 33 | ||
34 | extern asmlinkage long sys_ni_syscall(unsigned long, unsigned long, unsigned long, unsigned long, unsigned long, unsigned long); | 34 | extern asmlinkage long sys_ni_syscall(unsigned long, unsigned long, unsigned long, unsigned long, unsigned long, unsigned long); |
35 | 35 | ||
diff --git a/arch/x86/um/sys_call_table_64.c b/arch/x86/um/sys_call_table_64.c index 6ee5268beb05..f306413d3eb6 100644 --- a/arch/x86/um/sys_call_table_64.c +++ b/arch/x86/um/sys_call_table_64.c | |||
@@ -35,11 +35,11 @@ | |||
35 | #define stub_execveat sys_execveat | 35 | #define stub_execveat sys_execveat |
36 | #define stub_rt_sigreturn sys_rt_sigreturn | 36 | #define stub_rt_sigreturn sys_rt_sigreturn |
37 | 37 | ||
38 | #define __SYSCALL_64(nr, sym) extern asmlinkage long sym(unsigned long, unsigned long, unsigned long, unsigned long, unsigned long, unsigned long) ; | 38 | #define __SYSCALL_64(nr, sym, qual) extern asmlinkage long sym(unsigned long, unsigned long, unsigned long, unsigned long, unsigned long, unsigned long) ; |
39 | #include <asm/syscalls_64.h> | 39 | #include <asm/syscalls_64.h> |
40 | 40 | ||
41 | #undef __SYSCALL_64 | 41 | #undef __SYSCALL_64 |
42 | #define __SYSCALL_64(nr, sym) [ nr ] = sym, | 42 | #define __SYSCALL_64(nr, sym, qual) [ nr ] = sym, |
43 | 43 | ||
44 | extern asmlinkage long sys_ni_syscall(unsigned long, unsigned long, unsigned long, unsigned long, unsigned long, unsigned long); | 44 | extern asmlinkage long sys_ni_syscall(unsigned long, unsigned long, unsigned long, unsigned long, unsigned long, unsigned long); |
45 | 45 | ||
diff --git a/arch/x86/um/user-offsets.c b/arch/x86/um/user-offsets.c index 6c9a9c1eae32..470564bbd08e 100644 --- a/arch/x86/um/user-offsets.c +++ b/arch/x86/um/user-offsets.c | |||
@@ -9,12 +9,12 @@ | |||
9 | #include <asm/types.h> | 9 | #include <asm/types.h> |
10 | 10 | ||
11 | #ifdef __i386__ | 11 | #ifdef __i386__ |
12 | #define __SYSCALL_I386(nr, sym) [nr] = 1, | 12 | #define __SYSCALL_I386(nr, sym, qual) [nr] = 1, |
13 | static char syscalls[] = { | 13 | static char syscalls[] = { |
14 | #include <asm/syscalls_32.h> | 14 | #include <asm/syscalls_32.h> |
15 | }; | 15 | }; |
16 | #else | 16 | #else |
17 | #define __SYSCALL_64(nr, sym) [nr] = 1, | 17 | #define __SYSCALL_64(nr, sym, qual) [nr] = 1, |
18 | static char syscalls[] = { | 18 | static char syscalls[] = { |
19 | #include <asm/syscalls_64.h> | 19 | #include <asm/syscalls_64.h> |
20 | }; | 20 | }; |