lkml.org 
[lkml]   [2018]   [Jan]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH v6 11/10] x86/retpoline: Avoid return buffer underflows on context switch
From
Date
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]
\
 
 \ /
  Last update: 2018-01-14 23:18    [W:0.130 / U:0.032 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site