lkml.org 
[lkml]   [2019]   [Jan]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] x86/speculation: Update TIF_SPEC_IB before ibpb barrier
On Wed, 23 Jan 2019, Thomas Gleixner wrote:

> On Fri, 18 Jan 2019, Zhenzhong Duan wrote:
>
> > When a task is set for updating TIF_SPEC_IB throuth SECCOMP by others
> > and it's scheduled in the first time, a stale TIF_SPEC_IB value is
> > picked in cond_ibpb(). This is due to TIF_SPEC_IB is updated later at
> > __switch_to_xtra().
> >
> > Add an extra call to speculation_ctrl_update_tif() to update it before
> > IBPB barrier.
>
> Errm. No. It adds that call to speculation_ctrl_update_tif() for every
> mm switch, most of the time for nothing.
>
> If at all, and we discussed that before and decided not to worry about it
> (because it gets fixed up on the next context switch), then you want to
> handle ibpb() from there:

Actually we need to do that. It's not only the scheduled in first
problem. That whole thing might become completely stale in either
direction. Care to whip up a patch?

Thanks,

tglx

\
 
 \ /
  Last update: 2019-01-25 16:40    [W:0.258 / U:0.052 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site