syscalls/x86: Fix function types in COND_SYSCALL
authorSami Tolvanen <samitolvanen@google.com>
Tue, 8 Oct 2019 22:40:49 +0000 (15:40 -0700)
committerIngo Molnar <mingo@kernel.org>
Fri, 11 Oct 2019 10:49:19 +0000 (12:49 +0200)
commit6e4847640c6aebcaa2d9b3686cecc91b41f09269
tree791552641998f2b65b58819c7ddc1b56f7ef425d
parentf48f01a92cca09e86d46c91d8edf9d5a71c61727
syscalls/x86: Fix function types in COND_SYSCALL

Define a weak function in COND_SYSCALL instead of a weak alias to
sys_ni_syscall(), which has an incompatible type. This fixes indirect
call 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-6-samitolvanen@google.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
arch/x86/include/asm/syscall_wrapper.h