mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-08 11:50:43 +09:00
ANDROID: x86: 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 type mismatches with Control-Flow Integrity checking. Bug: 133186739 Change-Id: I246d27e4418695231979f4f9a6d98c8eb6776167 Signed-off-by: Sami Tolvanen <samitolvanen@google.com>
This commit is contained in:
committed by
Alistair Strachan
parent
0a90c27ba0
commit
2d96fcbd8b
@@ -48,12 +48,13 @@
|
||||
* To keep the naming coherent, re-define SYSCALL_DEFINE0 to create an alias
|
||||
* named __ia32_sys_*()
|
||||
*/
|
||||
#define SYSCALL_DEFINE0(sname) \
|
||||
SYSCALL_METADATA(_##sname, 0); \
|
||||
asmlinkage long __x64_sys_##sname(void); \
|
||||
ALLOW_ERROR_INJECTION(__x64_sys_##sname, ERRNO); \
|
||||
SYSCALL_ALIAS(__ia32_sys_##sname, __x64_sys_##sname); \
|
||||
asmlinkage long __x64_sys_##sname(void)
|
||||
|
||||
#define SYSCALL_DEFINE0(sname) \
|
||||
SYSCALL_METADATA(_##sname, 0); \
|
||||
asmlinkage long __x64_sys_##sname(const struct pt_regs *__unused);\
|
||||
ALLOW_ERROR_INJECTION(__x64_sys_##sname, ERRNO); \
|
||||
SYSCALL_ALIAS(__ia32_sys_##sname, __x64_sys_##sname); \
|
||||
asmlinkage long __x64_sys_##sname(const struct pt_regs *__unused)
|
||||
|
||||
#define COND_SYSCALL(name) \
|
||||
cond_syscall(__x64_sys_##name); \
|
||||
@@ -183,9 +184,9 @@
|
||||
#ifndef SYSCALL_DEFINE0
|
||||
#define SYSCALL_DEFINE0(sname) \
|
||||
SYSCALL_METADATA(_##sname, 0); \
|
||||
asmlinkage long __x64_sys_##sname(void); \
|
||||
asmlinkage long __x64_sys_##sname(const struct pt_regs *__unused);\
|
||||
ALLOW_ERROR_INJECTION(__x64_sys_##sname, ERRNO); \
|
||||
asmlinkage long __x64_sys_##sname(void)
|
||||
asmlinkage long __x64_sys_##sname(const struct pt_regs *__unused)
|
||||
#endif
|
||||
|
||||
#ifndef COND_SYSCALL
|
||||
|
||||
Reference in New Issue
Block a user