Commit cc42c045 authored by Brian Gerst's avatar Brian Gerst Committed by Thomas Gleixner

x86/entry/64: Move sys_ni_syscall stub to common.c

so it can be available to multiple syscall tables.  Also directly return
-ENOSYS instead of bouncing to the generic sys_ni_syscall().
Signed-off-by: default avatarBrian Gerst <brgerst@gmail.com>
Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
Link: https://lkml.kernel.org/r/20200313195144.164260-7-brgerst@gmail.com
parent 27dd84fa
......@@ -438,3 +438,10 @@ __visible long do_fast_syscall_32(struct pt_regs *regs)
#endif
}
#endif
#ifdef CONFIG_X86_64
SYSCALL_DEFINE0(ni_syscall)
{
return -ENOSYS;
}
#endif
......@@ -8,13 +8,6 @@
#include <asm/asm-offsets.h>
#include <asm/syscall.h>
extern asmlinkage long sys_ni_syscall(void);
SYSCALL_DEFINE0(ni_syscall)
{
return sys_ni_syscall();
}
#define __SYSCALL_64(nr, sym, qual) extern asmlinkage long sym(const struct pt_regs *);
#define __SYSCALL_X32(nr, sym, qual) __SYSCALL_64(nr, sym, qual)
#include <asm/syscalls_64.h>
......
......@@ -8,6 +8,9 @@
struct pt_regs;
extern asmlinkage long __x64_sys_ni_syscall(const struct pt_regs *regs);
extern asmlinkage long __ia32_sys_ni_syscall(const struct pt_regs *regs);
/* Mapping of registers to parameters for syscalls on x86-64 and x32 */
#define SC_X86_64_REGS_TO_ARGS(x, ...) \
__MAP(x,__SC_ARGS \
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment