mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-10 21:07:02 +09:00
FROMLIST: arm64: use the correct function type in SYSCALL_DEFINE0
Although a syscall defined using SYSCALL_DEFINE0 doesn't accept parameters, use the correct function type to avoid indirect call type mismatches with Control-Flow Integrity checking. Bug: 133186739 Change-Id: I45d1235f4b93c69451ed3610b676d0948cef5ee1 Link: https://lkml.org/lkml/2019/5/3/691 Signed-off-by: Sami Tolvanen <samitolvanen@google.com>
This commit is contained in:
committed by
Alistair Strachan
parent
568a3e2eee
commit
d09a3e0de2
@@ -30,10 +30,10 @@
|
||||
} \
|
||||
static inline long __do_compat_sys##name(__MAP(x,__SC_DECL,__VA_ARGS__))
|
||||
|
||||
#define COMPAT_SYSCALL_DEFINE0(sname) \
|
||||
asmlinkage long __arm64_compat_sys_##sname(void); \
|
||||
ALLOW_ERROR_INJECTION(__arm64_compat_sys_##sname, ERRNO); \
|
||||
asmlinkage long __arm64_compat_sys_##sname(void)
|
||||
#define COMPAT_SYSCALL_DEFINE0(sname) \
|
||||
asmlinkage long __arm64_compat_sys_##sname(const struct pt_regs *__unused); \
|
||||
ALLOW_ERROR_INJECTION(__arm64_compat_sys_##sname, ERRNO); \
|
||||
asmlinkage long __arm64_compat_sys_##sname(const struct pt_regs *__unused)
|
||||
|
||||
#define COND_SYSCALL_COMPAT(name) \
|
||||
cond_syscall(__arm64_compat_sys_##name);
|
||||
@@ -62,11 +62,11 @@
|
||||
static inline long __do_sys##name(__MAP(x,__SC_DECL,__VA_ARGS__))
|
||||
|
||||
#ifndef SYSCALL_DEFINE0
|
||||
#define SYSCALL_DEFINE0(sname) \
|
||||
SYSCALL_METADATA(_##sname, 0); \
|
||||
asmlinkage long __arm64_sys_##sname(void); \
|
||||
ALLOW_ERROR_INJECTION(__arm64_sys_##sname, ERRNO); \
|
||||
asmlinkage long __arm64_sys_##sname(void)
|
||||
#define SYSCALL_DEFINE0(sname) \
|
||||
SYSCALL_METADATA(_##sname, 0); \
|
||||
asmlinkage long __arm64_sys_##sname(const struct pt_regs *__unused); \
|
||||
ALLOW_ERROR_INJECTION(__arm64_sys_##sname, ERRNO); \
|
||||
asmlinkage long __arm64_sys_##sname(const struct pt_regs *__unused)
|
||||
#endif
|
||||
|
||||
#ifndef COND_SYSCALL
|
||||
|
||||
Reference in New Issue
Block a user