[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <568EDD03.6020508@redhat.com>
Date: Thu, 7 Jan 2016 22:47:47 +0100
From: Paolo Bonzini <pbonzini@...hat.com>
To: Andy Lutomirski <luto@...capital.net>,
Marcelo Tosatti <mtosatti@...hat.com>
Cc: Andy Lutomirski <luto@...nel.org>, X86 ML <x86@...nel.org>,
Radim Krcmar <rkrcmar@...hat.com>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
kvm list <kvm@...r.kernel.org>, Alexander Graf <agraf@...e.de>
Subject: Re: [PATCH] x86/vdso/pvclock: Protect STABLE check with the seqcount
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@...hat.com>
Paolo
Powered by blists - more mailing lists