[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20220420145137.GG2731@worktop.programming.kicks-ass.net>
Date: Wed, 20 Apr 2022 16:51:37 +0200
From: Peter Zijlstra <peterz@...radead.org>
To: Andy Lutomirski <luto@...nel.org>
Cc: the arch/x86 maintainers <x86@...nel.org>,
Josh Poimboeuf <jpoimboe@...hat.com>,
Brian Gerst <brgerst@...il.com>,
Lai Jiangshan <jiangshanlai@...il.com>,
Andrew Cooper <Andrew.Cooper3@...rix.com>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 2/2] x86,entry: Use PUSH_AND_CLEAR_REGS for compat
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.
Powered by blists - more mailing lists