diff options
author | Dominik Brodowski <linux@dominikbrodowski.net> | 2018-04-05 11:53:01 +0200 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2018-04-05 16:59:25 +0200 |
commit | 1bd21c6c21e848996339508d3ffb106d505256a8 (patch) | |
tree | 34cb9bbb4d695798b192a08f45cbf6aeda984e8b /init | |
parent | dfe64506c01e57159a4c550fe537c13a317ff01b (diff) | |
download | linux-1bd21c6c21e848996339508d3ffb106d505256a8.tar.bz2 |
syscalls/core: Introduce CONFIG_ARCH_HAS_SYSCALL_WRAPPER=y
It may be useful for an architecture to override the definitions of the
SYSCALL_DEFINE0() and __SYSCALL_DEFINEx() macros in <linux/syscalls.h>,
in particular to use a different calling convention for syscalls.
This patch provides a mechanism to do so: It introduces
CONFIG_ARCH_HAS_SYSCALL_WRAPPER. If it is enabled, <asm/sycall_wrapper.h>
is included in <linux/syscalls.h> and may be used to define the macros
mentioned above. Moreover, as the syscall calling convention may be
different if CONFIG_ARCH_HAS_SYSCALL_WRAPPER is set, the syscall function
prototypes in <linux/syscalls.h> are #ifndef'd out in that case.
Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
Acked-by: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Andy Lutomirski <luto@kernel.org>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Brian Gerst <brgerst@gmail.com>
Cc: Denys Vlasenko <dvlasenk@redhat.com>
Cc: H. Peter Anvin <hpa@zytor.com>
Cc: Josh Poimboeuf <jpoimboe@redhat.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Link: http://lkml.kernel.org/r/20180405095307.3730-3-linux@dominikbrodowski.net
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'init')
-rw-r--r-- | init/Kconfig | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/init/Kconfig b/init/Kconfig index 2852692d7c9c..068eb6c3bbf7 100644 --- a/init/Kconfig +++ b/init/Kconfig @@ -1923,3 +1923,10 @@ source "kernel/Kconfig.locks" config ARCH_HAS_SYNC_CORE_BEFORE_USERMODE bool + +# It may be useful for an architecture to override the definitions of the +# SYSCALL_DEFINE() and __SYSCALL_DEFINEx() macros in <linux/syscalls.h>, +# in particular to use a different calling convention for syscalls. +config ARCH_HAS_SYSCALL_WRAPPER + def_bool n + depends on !COMPAT |