Skip to content

x86: fix syscall function type mismatches

Sami Tolvanen lkml 3 versions – Applied

Status from this message: The following commit has been merged into the x86/entry branch of tip:

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest posting 2/25 patches 2 repliesApplied
  2. v2 posting 1/25 patches 0 repliesSuperseded
  3. v11 patch 3 repliesApplied

Changes in v2 from the cover letter

- Use SYSCALL_DEFINE0 for __x64_sys_ni_syscall.
- Include Andy's COMPAT_SYSCALL_DEFINE0 patch and use the macro for (rt_)sigreturn.

Patches in v2 posting 2/2 Applied

#Subject and filesSizeRepliesApplied
1/5x86: use the correct function type in SYSCALL_DEFINE0arch/x86/include/asm/syscall_wrapper.h+12 -110 replies
2/5x86/syscalls: Wire up COMPAT_SYSCALL_DEFINE0arch/x86/include/asm/syscall_wrapper.h+30 -20 replies
3/5x86: use COMPAT_SYSCALL_DEFINE0 for IA32 (rt_)sigreturnarch/x86/entry/syscalls/syscall_32.tbl arch/x86/ia32/ia32_signal.c+5 -40 replies
4/5x86: use the correct function type for sys_ni_syscallarch/x86/entry/syscall_32.c arch/x86/entry/syscall_64.c arch/x86/entry/syscalls/syscall_32.tbl+15 -110 replies
5/5x86: fix function types in COND_SYSCALLarch/x86/include/asm/syscall_wrapper.h+16 -50 replies

Reviews trailers per patch

1 of 5 patches has a Reviewed-by or Acked-by.

PatchAndy Lutomirski
1/5A-b
2/5
3/5
4/5
5/5

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v2 thread

Cover letter [RESEND PATCH v2 0/5] x86: fix syscall function type mismatches

This patch set changes x86 syscall wrappers and related functions to use function types that match sys_call_ptr_t. This fixes indirect call mismatches with Control-Flow Integrity (CFI) checking.

Changes since v1:
- Use SYSCALL_DEFINE0 for __x64_sys_ni_syscall.
- Include Andy's COMPAT_SYSCALL_DEFINE0 patch and use the macro for (rt_)sigreturn.

Andy Lutomirski (1):
x86/syscalls: Wire up COMPAT_SYSCALL_DEFINE0

Sami Tolvanen (4):
x86: use the correct function type in SYSCALL_DEFINE0
x86: use COMPAT_SYSCALL_DEFINE0 for IA32 (rt_)sigreturn
x86: use the correct function type for sys_ni_syscall
x86: fix function types in COND_SYSCALL

 arch/x86/entry/syscall_32.c            |  8 +--
 arch/x86/entry/syscall_64.c            | 14 +++--
 arch/x86/entry/syscalls/syscall_32.tbl |  8 +--
 arch/x86/ia32/ia32_signal.c            |  5 +-
 arch/x86/include/asm/syscall_wrapper.h | 76 ++++++++++++++++++++------
 5 files changed, 78 insertions(+), 33 deletions(-)
Signature · 1 line
2.23.0.581.g78d2f28ef7-goog