diff options
author | Sami Tolvanen <samitolvanen@google.com> | 2019-05-24 15:11:18 -0700 |
---|---|---|
committer | Will Deacon <will.deacon@arm.com> | 2019-05-29 13:46:00 +0100 |
commit | 1e29ab3186e33c77dbb2d7566172a205b59fa390 (patch) | |
tree | 1afbe4c0b12c895cf99c20f0ef80616a3fbd73e1 /arch/arm64/kernel/sys32.c | |
parent | 0e358bd7b7ebd27e491dabed938eae254c17fe3b (diff) | |
download | linux-1e29ab3186e33c77dbb2d7566172a205b59fa390.tar.bz2 |
arm64: use the correct function type for __arm64_sys_ni_syscall
Calling sys_ni_syscall through a syscall_fn_t pointer trips indirect
call Control-Flow Integrity checking due to a function type
mismatch. Use SYSCALL_DEFINE0 for __arm64_sys_ni_syscall instead and
remove the now unnecessary casts.
Signed-off-by: Sami Tolvanen <samitolvanen@google.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
Diffstat (limited to 'arch/arm64/kernel/sys32.c')
-rw-r--r-- | arch/arm64/kernel/sys32.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/arch/arm64/kernel/sys32.c b/arch/arm64/kernel/sys32.c index 0f8bcb7de700..3c80a40c1c9d 100644 --- a/arch/arm64/kernel/sys32.c +++ b/arch/arm64/kernel/sys32.c @@ -133,17 +133,14 @@ COMPAT_SYSCALL_DEFINE6(aarch32_fallocate, int, fd, int, mode, return ksys_fallocate(fd, mode, arg_u64(offset), arg_u64(len)); } -asmlinkage long sys_ni_syscall(const struct pt_regs *); -#define __arm64_sys_ni_syscall sys_ni_syscall - #undef __SYSCALL #define __SYSCALL(nr, sym) asmlinkage long __arm64_##sym(const struct pt_regs *); #include <asm/unistd32.h> #undef __SYSCALL -#define __SYSCALL(nr, sym) [nr] = (syscall_fn_t)__arm64_##sym, +#define __SYSCALL(nr, sym) [nr] = __arm64_##sym, const syscall_fn_t compat_sys_call_table[__NR_compat_syscalls] = { - [0 ... __NR_compat_syscalls - 1] = (syscall_fn_t)sys_ni_syscall, + [0 ... __NR_compat_syscalls - 1] = __arm64_sys_ni_syscall, #include <asm/unistd32.h> }; |