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: Brian Gerst <brgerst@gmail.com> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Link: https://lkml.kernel.org/r/20200313195144.164260-7-brgerst@gmail.com
This commit is contained in:
parent
27dd84fafc
commit
cc42c045af
@ -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 \
|
||||
|
Loading…
Reference in New Issue
Block a user