Skip to content

x86: Clean up fast syscall return validation

Brian Gerst 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. v3 Latest3 patches 2 repliesApplied
  2. v26 patches 11 repliesApplied
  3. v16 patches 5 repliesSuperseded

Changes in v3 from the cover letter

- Remove patches already applied to -tip.
- Keep Xen alternatives on the asm side to skip testing the return value.
- Add patch to simplify canonical-RIP test.

Patches in v3 Applied

#Subject and filesSizeRepliesApplied
1/3x86/entry/64: Convert SYSRET validation tests to Carch/x86/entry/common.c arch/x86/entry/entry_64.S arch/x86/include/asm/syscall.h+45 -532 replies
2/3x86/entry/64: Use TASK_SIZE_MAX for canonical RIP testarch/x86/entry/common.c+3 -30 replies
3/3x86/entry/32: Clean up syscall fast exit testsarch/x86/entry/common.c+22 -260 replies

Reviews trailers per patch

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

Read the v3 thread

Cover letter [PATCH v3 0/3] x86: Clean up fast syscall return validation

This patch set cleans up the tests done to determine if a fast syscall return instruction can be used to return to userspace. It converts the code to C, and refactors existing code to be more readable.

v3:
- Remove patches already applied to -tip.
- Keep Xen alternatives on the asm side to skip testing the return value.
- Add patch to simplify canonical-RIP test.

v2:
- Fix shift value for canonical RIP test and use
__is_canonical_address()

Brian Gerst (3):
x86/entry/64: Convert SYSRET validation tests to C x86/entry/64: Use TASK_SIZE_MAX for canonical RIP test x86/entry/32: Clean up syscall fast exit tests

 arch/x86/entry/common.c        | 91 ++++++++++++++++++++++++----------
 arch/x86/entry/entry_64.S      | 53 +-------------------
 arch/x86/include/asm/syscall.h |  2 +-
 3 files changed, 67 insertions(+), 79 deletions(-)
Signature · 1 line
2.41.0