[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAMzpN2hN4xtJfZ0Jpu=TkMcX-5gNartYVQ867Ni8J1YW14qbXw@mail.gmail.com>
Date: Sun, 10 Apr 2022 11:20:46 -0400
From: Brian Gerst <brgerst@...il.com>
To: Peter Zijlstra <peterz@...radead.org>
Cc: "the arch/x86 maintainers" <x86@...nel.org>,
Lai Jiangshan <jiangshanlai@...il.com>,
Josh Poimboeuf <jpoimboe@...hat.com>,
Andrew Cooper <Andrew.Cooper3@...rix.com>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [RFC][PATCH] x86: PUSH_AND_CLEAR_REGS_COMPAT
On Sat, Apr 9, 2022 at 1:44 PM Peter Zijlstra <peterz@...radead.org> wrote:
>
> On Sat, Apr 09, 2022 at 12:38:27AM +0200, Peter Zijlstra wrote:
> >
> > How insane?
>
> Anyway, the questino is; since int80 doesn't wipe the high regs, can we
> get away with the SYS*_compat things not doing that either and then all
> using the normal PUSH_AND_CLEAR_REGS without having to invent _COMPAT
> for that?
For a pure 32-bit process it doesn't matter whether the upper
registers are preserved or not, since they are inaccessible.
Mixed-mode code may assume the upper registers are preserved across a
call to 32-bit code, although it would be very unlikely to encounter
SYSENTER or SYSCALL instructions anywhere but the Linux VDSO (and use
anywhere else would cause undesirable results).
There is no compelling reason to not preserve them, and code
simplification is a good benefit.
--
Brian Gerst
Powered by blists - more mailing lists