Messages in this thread | | | Subject | Re: [PATCH v6 11/10] x86/retpoline: Avoid return buffer underflows on context switch | From | David Woodhouse <> | Date | Tue, 09 Jan 2018 00:55:42 +0000 |
| |
On Mon, 2018-01-08 at 16:48 -0800, Linus Torvalds wrote: > On Mon, Jan 8, 2018 at 4:42 PM, David Woodhouse <dwmw2@infradead.org> 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.[unhandled content-type:application/x-pkcs7-signature] | |