lkml.org 
[lkml]   [2016]   [Jan]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] x86/vdso/pvclock: Protect STABLE check with the seqcount
From
Date


On 07/01/2016 22:13, Andy Lutomirski wrote:
> I don't understand what you mean.
>
> In the old code (4.3 and 4.4), the vdso checks STABLE_BIT at the end,
> which is correct as long as STABLE_BIT can never change from 0 to 1.
>
> In the -tip code, it's clearly wrong.
>
> In the code in this patch, it should be correct regardless of how
> STABLE_BIT changes as long as the seqcount works. Given that the
> performance cost of doing that is zero, I'd rather keep it that way.
> If we're really paranoid, we could move it after the rest of the pvti
> reads and add a barrier, but is there really any host on which that
> matters?

I agree that your patch is fine.

Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>

Paolo

\
 
 \ /
  Last update: 2016-01-07 23:01    [W:0.413 / U:0.424 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site