Re: [RFC][PATCH] x86: PUSH_AND_CLEAR_REGS_COMPAT

From: Josh Poimboeuf
Date: Fri Apr 08 2022 - 22:00:49 EST


On Sat, Apr 09, 2022 at 01:14:47AM +0200, Peter Zijlstra 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?

I'd rather not, clearing the register values on the stack is a good
thing as it gives attackers less control. In fact I wish we could do
that for the 64-bit syscalls, but alas, callee-saved registers and all.

--
Josh