Skip to content

x86: Untangle and standardize x86 system call entry point names

Ingo Molnar lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest4 patches 5 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4x86/asm/entry: Rename compat syscall entry pointsDocumentation/x86/entry_64.txt arch/x86/entry/entry_64_compat.S arch/x86/entry/syscall_32.c +5 more+15 -151 reply
2/4x86/asm/entry: Untangle 'ia32_sysenter_target' into two entry points: entry_SYSENTER_32 and entry_SYSENTER_compatarch/x86/entry/entry_32.S arch/x86/entry/entry_64_compat.S arch/x86/include/asm/proto.h +2 more+12 -113 replies
3/4x86/asm/entry: Untangle 'system_call' into two entry points: entry_SYSCALL_64 and entry_INT80_32arch/x86/entry/entry_32.S arch/x86/entry/entry_64.S arch/x86/include/asm/proto.h +3 more+14 -140 replies
4/4x86/asm/entry/32: Clean up entry_32.Sarch/x86/entry/entry_32.S+570 -57120 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/4] x86: Untangle and standardize x86 system call entry point names

This series does the following renames:

        system_call (32)             -> entry_INT80_32
        system_call (64)             -> entry_SYSCALL_64
        ia32_cstar_target            -> entry_SYSCALL_compat
        ia32_syscall                 -> entry_INT80_compat
        ia32_sysenter_target (32)    -> entry_SYSENTER_32
        ia32_sysenter_target (64)    -> entry_SYSENTER_compat

As can be seen from that list alone, the naming was a mess:

- system_call() had two distinct uses, depending on
bitness: INT80 entry on 32-bit, SYSCALL entry on 64-bit.

- ia32_sysenter_target with its different semantics on 32-bit and compat kernels had the same name as well.

- 'ia32' in a generic x86 name makes no sense, neither does 'cstar'.

It was so confusing that even the x86 documentation got it wrong:

"- ia32_syscall, ia32_sysenter: syscall and sysenter from 32-bit"

In reality ia32_syscall is an INT80 entry.

The new naming scheme is simple, coherent and unambiguous in any context:

entry_MNEMONIC_qualifier

where:

- 'MNEMONIC' is one of INT80, SYSCALL or SYSENTER
- 'qualifier' is one of _32, _64 or _compat.

Plus while at it I've done some cleanups to the native 32-bit entry code as well.

Thanks,

Ingo

====================================>
Ingo Molnar (4):
x86/asm/entry: Rename compat syscall entry points
x86/asm/entry: Untangle 'ia32_sysenter_target' into two entry points: entry_SYSENTER_32 and entry_SYSENTER_compat x86/asm/entry: Untangle 'system_call' into two entry points: entry_SYSCALL_64 and entry_INT80_32 x86/asm/entry/32: Clean up entry_32.S

 Documentation/x86/entry_64.txt   |    4 +-
 arch/x86/entry/entry_32.S        | 1149 +++++++++++++++++++++++++++++-----------------------------
 arch/x86/entry/entry_64.S        |   10 +-
 arch/x86/entry/entry_64_compat.S |   12 +-
 arch/x86/entry/syscall_32.c      |    6 +-
 arch/x86/include/asm/proto.h     |   10 +-
 arch/x86/kernel/asm-offsets_64.c |    2 +-
 arch/x86/kernel/cpu/common.c     |    8 +-
 arch/x86/kernel/traps.c          |    7 +-
 arch/x86/xen/xen-asm_64.S        |    6 +-
 10 files changed, 607 insertions(+), 607 deletions(-)
Signature · 1 line
2.1.4