syscalls/x86: Use the correct function type in SYSCALL_DEFINE0
authorSami Tolvanen <samitolvanen@google.com>
Tue, 8 Oct 2019 22:40:45 +0000 (15:40 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 31 Dec 2019 15:35:09 +0000 (16:35 +0100)
commit0aeb6588f2d45fc8bba3359fb91763c8fc997424
tree83ab6db2781ec23429371a1ecae5f0f1fe7b0d1b
parentfa03f6cc5529d600bb7e15478ae952496946f0c8
syscalls/x86: Use the correct function type in SYSCALL_DEFINE0

[ Upstream commit 8661d769ab77c675b5eb6c3351a372b9fbc1bf40 ]

Although a syscall defined using SYSCALL_DEFINE0 doesn't accept
parameters, use the correct function type to avoid type mismatches
with Control-Flow Integrity (CFI) checking.

Signed-off-by: Sami Tolvanen <samitolvanen@google.com>
Acked-by: Andy Lutomirski <luto@kernel.org>
Cc: Borislav Petkov <bp@alien8.de>
Cc: H . Peter Anvin <hpa@zytor.com>
Cc: Kees Cook <keescook@chromium.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Link: https://lkml.kernel.org/r/20191008224049.115427-2-samitolvanen@google.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
arch/x86/include/asm/syscall_wrapper.h