From: Peter Zijlstra <peterz@infradead.org>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Lai Jiangshan <jiangshanlai@gmail.com>, X86 ML <x86@kernel.org>,
Josh Poimboeuf <jpoimboe@redhat.com>,
Brian Gerst <brgerst@gmail.com>,
Andrew Cooper <Andrew.Cooper3@citrix.com>,
LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v3] x86,entry: Use PUSH_AND_CLEAR_REGS for compat
Date: Sat, 30 Apr 2022 00:14:28 +0200 [thread overview]
Message-ID: <YmxjRIh4SiTiqQKD@hirez.programming.kicks-ass.net> (raw)
In-Reply-To: <CAHk-=wg1p87BAj3ebiugG9Q5YaKNUDpEWmjLKam69Ak3g__Aug@mail.gmail.com>
On Fri, Apr 29, 2022 at 02:30:45PM -0700, Linus Torvalds wrote:
> On Fri, Apr 29, 2022 at 2:13 PM Peter Zijlstra <peterz@infradead.org> wrote:
> >
> > (Linus, can I add your SoB to the thing?)
>
> If you teste this with some actual old int80 compat syscalls, then absolutely:
I ran tools/testing/selftests/x86/*_32 on it. That definitely tickles
the int80 path. Also, without the off-by-one fixed that gives some
generous helpings of segfault.
> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Thanks!
> > + pushq %rdi /* pt_regs->di */
> > pushq %rsi /* pt_regs->si */
> > xorl %esi, %esi /* nospec si */
>
> It would probably make sense to add a comment about why %rdi isn't
> cleared when pushed, like all the other registers are.
>
> Even if that comment is just "%rdi will be overwritten as arg0 of the
> call to C, so no need to clear it".
>
> Maybe as part of the PUSH_AND_CLEAR_REGS changes?
I'll stick the comment on.
prev parent reply other threads:[~2022-04-29 22:14 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-04-29 9:13 [PATCH v3] x86,entry: Use PUSH_AND_CLEAR_REGS for compat Peter Zijlstra
2022-04-29 12:00 ` Lai Jiangshan
2022-04-29 21:12 ` Peter Zijlstra
2022-04-29 21:17 ` [PATCH v4] " Peter Zijlstra
2022-04-29 21:30 ` [PATCH v3] " Linus Torvalds
2022-04-29 22:14 ` Peter Zijlstra [this message]
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=YmxjRIh4SiTiqQKD@hirez.programming.kicks-ass.net \
--to=peterz@infradead.org \
--cc=Andrew.Cooper3@citrix.com \
--cc=brgerst@gmail.com \
--cc=jiangshanlai@gmail.com \
--cc=jpoimboe@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=torvalds@linux-foundation.org \
--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