Skip to content

Commit

Permalink
arm64: fix syscall_fn_t type
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Sami Tolvanen authored and Will Deacon committed May 29, 2019
1 parent d76cac6 commit 8ef8f36
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion arch/arm64/include/asm/syscall.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
#include <linux/compat.h>
#include <linux/err.h>

typedef long (*syscall_fn_t)(struct pt_regs *regs);
typedef long (*syscall_fn_t)(const struct pt_regs *regs);

extern const syscall_fn_t sys_call_table[];

Expand Down

0 comments on commit 8ef8f36

Please sign in to comment.