mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH v3 0/3] x86: Clean up fast syscall return validation
@ 2023-10-11 22:43 Brian Gerst
  2023-10-11 22:43 ` [PATCH v3 1/3] x86/entry/64: Convert SYSRET validation tests to C Brian Gerst
                   ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: Brian Gerst @ 2023-10-11 22:43 UTC (permalink / raw)
  To: linux-kernel, x86
  Cc: Ingo Molnar, Thomas Gleixner, Borislav Petkov, H . Peter Anvin,
	Andy Lutomirski, Brian Gerst

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(-)

-- 
2.41.0


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2023-10-13 13:06 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-10-11 22:43 [PATCH v3 0/3] x86: Clean up fast syscall return validation Brian Gerst
2023-10-11 22:43 ` [PATCH v3 1/3] x86/entry/64: Convert SYSRET validation tests to C Brian Gerst
2023-10-13 11:18   ` [tip: x86/entry] " tip-bot2 for Brian Gerst
2023-10-13 12:39   ` [PATCH v3 1/3] " Nikolay Borisov
2023-10-13 13:05     ` Brian Gerst
2023-10-11 22:43 ` [PATCH v3 2/3] x86/entry/64: Use TASK_SIZE_MAX for canonical RIP test Brian Gerst
2023-10-13 11:18   ` [tip: x86/entry] " tip-bot2 for Brian Gerst
2023-10-11 22:43 ` [PATCH v3 3/3] x86/entry/32: Clean up syscall fast exit tests Brian Gerst
2023-10-13 11:18   ` [tip: x86/entry] " tip-bot2 for Brian Gerst

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome