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 <[email protected]> Reviewed-by: Mark Rutland <[email protected]> Signed-off-by: Will Deacon <[email protected]>
1 parent d76cac6 commit 8ef8f36

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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)