[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
On Mon, Jan 8, 2018 at 4:42 PM, David Woodhouse <> 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.

We moved away from that and now have that "switch_to_asm()" call
instead, but that was for unrelated reasons.

If I remember our old inline asm, we actually had *very* little real
data that was actually live on context switch, particularly that last
"branch to new EIP" point.

Partly because we had different targets, one of which was that "return
from fork" case.

But maybe I mis-remember. Wouldn't be the first time. This is code I
used to know well, but that was many many moons ago, now there are
other suckers^W maintainers who actually work with it.


 \ /
  Last update: 2018-01-14 23:18    [W:0.056 / U:3.056 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site