Skip to content

compat: in_compat_syscall() differs on x86

Dmitry Safonov linux-efi lkml netdev 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 1 replyIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2x86/compat: Adjust in_compat_syscall() to generic code under !COMPATarch/x86/include/asm/compat.h arch/x86/include/asm/ftrace.h arch/x86/kernel/process_64.c +4 more+22 -161 reply
2/2compat: Cleanup in_compat_syscall() callersdrivers/firmware/efi/efivars.c kernel/time/time.c net/xfrm/xfrm_state.c +1 more+5 -170 replies

Reviews trailers per patch

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

PatchAndy Lutomirski
1/2R-b Apologized-for-by
2/2

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

Read the v1 thread

Cover letter [RFC-resend 0/2] compat: in_compat_syscall() differs on x86

Reading xfrm (ipsec) code I've found such code:

: #ifdef CONFIG_COMPAT
: if (in_compat_syscall())
: return -EOPNOTSUPP;
: #endif

While I can read that it's false on native i386, it's a bit misleading and in result it's better to introduce a helper for that. Grepping other code, I've found that there are already such helpers. And the uniq behavior of in_compat_syscall() on x86 is disturbing.

Adjusting it to generic with the following..

(on the first non-resend RFC I managed to forget Cc'ing Andy..
sorry about that, was sure I did add him).

Cc Ard Biesheuvel <[email protected]>
Cc Andy Lutomirsky <[email protected]>
Cc "David S. Miller" <[email protected]>
Cc Herbert Xu <[email protected]>
Cc "H. Peter Anvin" <[email protected]>
Cc Ingo Molnar <[email protected]>
Cc John Stultz <[email protected]>
Cc "Kirill A. Shutemov" <[email protected]>
Cc Oleg Nesterov <[email protected]>
Cc Steffen Klassert <[email protected]>
Cc Stephen Boyd <[email protected]>
Cc Steven Rostedt <[email protected]>
Cc Thomas Gleixner <[email protected]>
Cc Dmitry Safonov <[email protected]>

Dmitry Safonov (2):
x86/compat: Adjust in_compat_syscall() to generic code under !COMPAT
compat: Cleanup in_compat_syscall() callers

 arch/x86/include/asm/compat.h  |  9 ++++++++-
 arch/x86/include/asm/ftrace.h  |  4 +---
 arch/x86/kernel/process_64.c   |  4 ++--
 arch/x86/kernel/sys_x86_64.c   | 11 ++++++-----
 arch/x86/mm/hugetlbpage.c      |  4 ++--
 arch/x86/mm/mmap.c             |  2 +-
 drivers/firmware/efi/efivars.c | 16 ++++------------
 include/linux/compat.h         |  4 ++--
 kernel/time/time.c             |  2 +-
 net/xfrm/xfrm_state.c          |  2 --
 net/xfrm/xfrm_user.c           |  2 --
 11 files changed, 27 insertions(+), 33 deletions(-)
Signature · 1 line
2.13.6