public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Peter Zijlstra <peterz@infradead.org>
To: Andy Lutomirski <luto@kernel.org>
Cc: the arch/x86 maintainers <x86@kernel.org>,
	Josh Poimboeuf <jpoimboe@redhat.com>,
	Brian Gerst <brgerst@gmail.com>,
	Lai Jiangshan <jiangshanlai@gmail.com>,
	Andrew Cooper <Andrew.Cooper3@citrix.com>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 2/2] x86,entry: Use PUSH_AND_CLEAR_REGS for compat
Date: Wed, 20 Apr 2022 16:51:37 +0200	[thread overview]
Message-ID: <20220420145137.GG2731@worktop.programming.kicks-ass.net> (raw)
In-Reply-To: <ed167304-0d43-42fb-9da1-1358dded3a2f@www.fastmail.com>

On Wed, Apr 20, 2022 at 07:26:54AM -0700, Andy Lutomirski wrote:
> 
> 
> On Tue, Apr 19, 2022, at 1:41 PM, Peter Zijlstra wrote:
> > Since the upper regs don't exist for ia32 code, preserving them
> > doesn't hurt and it simplifies the code.
> 
> They exist for compat code, though, and should be preserved for ABI
> purposes. Programs that do int $0x80 in 64-bit code do exist.

So this patch preserves semantics for int80, it changes things for
sysenter/syscall, those currently clear the high registers, whereas
after this patch they behave identical to int80.

So the earlier patch:

  https://lkml.kernel.org/r/20220408223827.GR2731@worktop.programming.kicks-ass.net

preserves semantics across the board but is slightly more complicated.

And as argued elsewhere in thie thread; if preserving instead of
clearing the high regs is a valid attach surface, then int80 already
provides it, so I don't see how doing the same to sys* is any worse.


      reply	other threads:[~2022-04-20 14:51 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-19 20:41 [PATCH 0/2] x86: A few random cleanups Peter Zijlstra
2022-04-19 20:41 ` [PATCH 1/2] x86: Simplify Retpoline thunk Peter Zijlstra
2022-04-20 15:27   ` Josh Poimboeuf
2022-04-20 15:51     ` Peter Zijlstra
2022-04-20 16:01       ` Josh Poimboeuf
2022-04-19 20:41 ` [PATCH 2/2] x86,entry: Use PUSH_AND_CLEAR_REGS for compat Peter Zijlstra
2022-04-20  3:21   ` Josh Poimboeuf
2022-04-20  7:07     ` Peter Zijlstra
2022-04-20 14:58       ` Josh Poimboeuf
2022-04-20  4:29   ` Lai Jiangshan
2022-04-20 14:26   ` Andy Lutomirski
2022-04-20 14:51     ` 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=20220420145137.GG2731@worktop.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=luto@kernel.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