mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Brian Gerst <brgerst@gmail.com>
To: linux-kernel@vger.kernel.org, x86@kernel.org
Cc: Ingo Molnar <mingo@kernel.org>,
	Thomas Gleixner <tglx@linutronix.de>,
	Borislav Petkov <bp@alien8.de>, "H . Peter Anvin" <hpa@zytor.com>,
	Andy Lutomirski <luto@kernel.org>,
	Brian Gerst <brgerst@gmail.com>
Subject: [PATCH v3 0/3] x86: Clean up fast syscall return validation
Date: Wed, 11 Oct 2023 18:43:48 -0400	[thread overview]
Message-ID: <20231011224351.130935-1-brgerst@gmail.com> (raw)

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


             reply	other threads:[~2023-10-11 22:44 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-11 22:43 Brian Gerst [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20231011224351.130935-1-brgerst@gmail.com \
    --to=brgerst@gmail.com \
    --cc=bp@alien8.de \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=luto@kernel.org \
    --cc=mingo@kernel.org \
    --cc=tglx@linutronix.de \
    --cc=x86@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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