mbox series

[v3,0/3] fix function type mismatches in syscall wrappers

Message ID 20190524221118.177548-1-samitolvanen@google.com (mailing list archive)
Headers show
Series fix function type mismatches in syscall wrappers | expand

Message

Sami Tolvanen May 24, 2019, 10:11 p.m. UTC
These patches fix type mismatches in arm64 syscall wrapper
definitions, which trip indirect call checks with Control-Flow
Integrity.

Changes in v3:
- instead of SYSCALL_DEFINE0, just define __arm64_sys_ni_syscall
  with the correct type to avoid unnecessary error injection

Changes in v2:
- more informative commit message for the syscall_fn_t change
- added a patch for fixing sys_ni_syscall

Sami Tolvanen (3):
  arm64: fix syscall_fn_t type
  arm64: use the correct function type in SYSCALL_DEFINE0
  arm64: use the correct function type for __arm64_sys_ni_syscall

 arch/arm64/include/asm/syscall.h         |  2 +-
 arch/arm64/include/asm/syscall_wrapper.h | 18 +++++++++---------
 arch/arm64/kernel/sys.c                  | 14 +++++++++-----
 arch/arm64/kernel/sys32.c                |  7 ++-----
 4 files changed, 21 insertions(+), 20 deletions(-)

Comments

Will Deacon May 29, 2019, 3:09 p.m. UTC | #1
On Fri, May 24, 2019 at 03:11:15PM -0700, Sami Tolvanen wrote:
> These patches fix type mismatches in arm64 syscall wrapper
> definitions, which trip indirect call checks with Control-Flow
> Integrity.
> 
> Changes in v3:
> - instead of SYSCALL_DEFINE0, just define __arm64_sys_ni_syscall
>   with the correct type to avoid unnecessary error injection

Thanks, I've picked this up for -rc3.

Will