Re: [PATCH v6 11/10] x86/retpoline: Avoid return buffer underflows on context switch
From: David Woodhouse
Date: Mon Jan 08 2018 - 19:55:53 EST
On Mon, 2018-01-08 at 16:48 -0800, Linus Torvalds wrote:
> On Mon, Jan 8, 2018 at 4:42 PM, David Woodhouse <dwmw2@xxxxxxxxxxxxx> wrote:
> >
> >
> > Hm... on a context switch you're reloading the registers that were in
> > the other saved context.
>
> Actually, iirc we used to very actively try to minimize that by having
> the inline asm mark a lot of registers as clobbered.
Sure, in that case it makes sense purely as a matter of hygiene to
explicitly clear the registers which were marked as clobbered.
In the original patch set from that Intel were collecting â before they
threw it all out the fucking window and started again from scratch on
the day the embargo broke â there were patches to do the same thing on
syscall entry too, for precisely the same reason.Attachment:
smime.p7s
Description: S/MIME cryptographic signature