Skip to content

Commit 8ef8f36

Browse files
samitolvanenwildea01
authored andcommitted
arm64: fix syscall_fn_t type
Syscall wrappers in <asm/syscall_wrapper.h> use const struct pt_regs * as the argument type. Use const in syscall_fn_t as well to fix indirect call type mismatches with Control-Flow Integrity checking. Signed-off-by: Sami Tolvanen <samitolvanen@google.com> Reviewed-by: Mark Rutland <mark.rutland@arm.com> Signed-off-by: Will Deacon <will.deacon@arm.com>
1 parent d76cac6 commit 8ef8f36

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎arch/arm64/include/asm/syscall.h‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
#include <linux/compat.h>
2121
#include <linux/err.h>
2222

23-
typedef long (*syscall_fn_t)(struct pt_regs *regs);
23+
typedef long (*syscall_fn_t)(const struct pt_regs *regs);
2424

2525
extern const syscall_fn_t sys_call_table[];
2626

0 commit comments

Comments
 (0)