From: Ingo Molnar <mingo@kernel.org>
To: Brian Gerst <brgerst@gmail.com>
Cc: linux-kernel@vger.kernel.org, x86@kernel.org,
"Thomas Gleixner" <tglx@linutronix.de>,
"Borislav Petkov" <bp@alien8.de>,
"H . Peter Anvin" <hpa@zytor.com>,
"Andy Lutomirski" <luto@kernel.org>,
"Mika Penttilä" <mpenttil@redhat.com>,
"Linus Torvalds" <torvalds@linux-foundation.org>,
"Uros Bizjak" <ubizjak@gmail.com>,
"Denys Vlasenko" <dvlasenk@redhat.com>,
"Peter Zijlstra" <peterz@infradead.org>,
"Josh Poimboeuf" <jpoimboe@redhat.com>
Subject: Re: [PATCH v2 0/6] x86: Clean up fast syscall return validation
Date: Thu, 5 Oct 2023 10:22:37 +0200 [thread overview]
Message-ID: <ZR5yTecBhCFsVOtQ@gmail.com> (raw)
In-Reply-To: <20230721161018.50214-1-brgerst@gmail.com>
* Brian Gerst <brgerst@gmail.com> wrote:
> 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.
>
> v2:
> - Fix shift value for canonical RIP test and use
> __is_canonical_address()
>
> Brian Gerst (6):
> x86/entry/64: Remove obsolete comment on tracing vs. SYSRET
> x86/entry/64: Convert SYSRET validation tests to C
> x86/entry/compat: Combine return value test from syscall handler
> x86/entry/32: Convert do_fast_syscall_32() to bool return type
> x86/entry/32: Remove SEP test for SYSEXIT
> x86/entry/32: Clean up syscall fast exit tests
>
> arch/x86/entry/common.c | 99 +++++++++++++++++++++-----------
> arch/x86/entry/entry_32.S | 2 +-
> arch/x86/entry/entry_64.S | 68 +---------------------
> arch/x86/entry/entry_64_compat.S | 12 ++--
> arch/x86/include/asm/syscall.h | 6 +-
> 5 files changed, 77 insertions(+), 110 deletions(-)
Ok, so I've applied patches #1, #3, #4 and #5 to tip:x86/entry,
(ie. skipped #2 & #6 for now), as they look correct and are good
improvements. None of these four patches depend on the skipped
patches in some way I missed, correct?
As for #2, I looked at the before/after disassembly, and the new
C code in do_syscall_64() looked suboptimal on x86-64 defconfig,
if I was reading it right.
Mind re-evaluating that, and if you still think the C conversion
is a good idea, mind putting a before/after analysis of the
generated instructions into the changelog? This is our primary
system call return path after all.
Thanks,
Ingo
next prev parent reply other threads:[~2023-10-05 14:17 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-21 16:10 Brian Gerst
2023-07-21 16:10 ` [PATCH v2 1/6] x86/entry/64: Remove obsolete comment on tracing vs. SYSRET Brian Gerst
2023-10-05 8:28 ` [tip: x86/entry] " tip-bot2 for Brian Gerst
2023-07-21 16:10 ` [PATCH v2 2/6] x86/entry/64: Convert SYSRET validation tests to C Brian Gerst
2023-07-23 9:53 ` Li, Xin3
2023-07-23 11:17 ` Brian Gerst
2023-07-21 16:10 ` [PATCH v2 3/6] x86/entry/compat: Combine return value test from syscall handler Brian Gerst
2023-10-05 8:28 ` [tip: x86/entry] " tip-bot2 for Brian Gerst
2023-07-21 16:10 ` [PATCH v2 4/6] x86/entry/32: Convert do_fast_syscall_32() to bool return type Brian Gerst
2023-10-05 8:28 ` [tip: x86/entry] " tip-bot2 for Brian Gerst
2023-07-21 16:10 ` [PATCH v2 5/6] x86/entry/32: Remove SEP test for SYSEXIT Brian Gerst
2023-10-05 8:28 ` [tip: x86/entry] " tip-bot2 for Brian Gerst
2023-07-21 16:10 ` [PATCH v2 6/6] x86/entry/32: Clean up syscall fast exit tests Brian Gerst
2023-10-05 8:22 ` Ingo Molnar [this message]
2023-10-05 15:13 ` [PATCH v2 0/6] x86: Clean up fast syscall return validation Brian Gerst
2023-10-05 20:20 ` Ingo Molnar
2023-10-06 18:59 ` H. Peter Anvin
2023-10-06 21:32 ` Brian Gerst
2023-10-07 9:42 ` Ingo Molnar
2023-10-06 23:58 ` H. Peter Anvin
2023-10-07 9:56 ` Uros Bizjak
2023-10-07 18:07 ` Linus Torvalds
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=ZR5yTecBhCFsVOtQ@gmail.com \
--to=mingo@kernel.org \
--cc=bp@alien8.de \
--cc=brgerst@gmail.com \
--cc=dvlasenk@redhat.com \
--cc=hpa@zytor.com \
--cc=jpoimboe@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=luto@kernel.org \
--cc=mpenttil@redhat.com \
--cc=peterz@infradead.org \
--cc=tglx@linutronix.de \
--cc=torvalds@linux-foundation.org \
--cc=ubizjak@gmail.com \
--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