]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blob - releases/4.19.54/arm64-fix-syscall_fn_t-type.patch
Linux 4.19.54
[thirdparty/kernel/stable-queue.git] / releases / 4.19.54 / arm64-fix-syscall_fn_t-type.patch
1 From 3dc9bb878a575471a09978a77615d42cab18a7df Mon Sep 17 00:00:00 2001
2 From: Sami Tolvanen <samitolvanen@google.com>
3 Date: Fri, 24 May 2019 15:11:16 -0700
4 Subject: arm64: fix syscall_fn_t type
5
6 [ Upstream commit 8ef8f368ce72b5e17f7c1f1ef15c38dcfd0fef64 ]
7
8 Syscall wrappers in <asm/syscall_wrapper.h> use const struct pt_regs *
9 as the argument type. Use const in syscall_fn_t as well to fix indirect
10 call type mismatches with Control-Flow Integrity checking.
11
12 Signed-off-by: Sami Tolvanen <samitolvanen@google.com>
13 Reviewed-by: Mark Rutland <mark.rutland@arm.com>
14 Signed-off-by: Will Deacon <will.deacon@arm.com>
15 Signed-off-by: Sasha Levin <sashal@kernel.org>
16 ---
17 arch/arm64/include/asm/syscall.h | 2 +-
18 1 file changed, 1 insertion(+), 1 deletion(-)
19
20 diff --git a/arch/arm64/include/asm/syscall.h b/arch/arm64/include/asm/syscall.h
21 index ad8be16a39c9..58102652bf9e 100644
22 --- a/arch/arm64/include/asm/syscall.h
23 +++ b/arch/arm64/include/asm/syscall.h
24 @@ -20,7 +20,7 @@
25 #include <linux/compat.h>
26 #include <linux/err.h>
27
28 -typedef long (*syscall_fn_t)(struct pt_regs *regs);
29 +typedef long (*syscall_fn_t)(const struct pt_regs *regs);
30
31 extern const syscall_fn_t sys_call_table[];
32
33 --
34 2.20.1
35