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

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
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -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
+0 −7
Original line number Diff line number Diff line
@@ -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>
+3 −0
Original line number Diff line number Diff line
@@ -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						\