From mboxrd@z Thu Jan 1 00:00:00 1970 From: Paolo Bonzini Subject: Re: [PATCH] x86/vdso/pvclock: Protect STABLE check with the seqcount Date: Thu, 7 Jan 2016 22:47:47 +0100 Message-ID: <568EDD03.6020508@redhat.com> References: <20160104225904.GA4947@amt.cnet> <755dcedb17269e1d7ce12a9a713dea303835137e.1451949191.git.luto@kernel.org> <20160107210216.GA19334@amt.cnet> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Cc: Andy Lutomirski , X86 ML , Radim Krcmar , "linux-kernel@vger.kernel.org" , kvm list , Alexander Graf To: Andy Lutomirski , Marcelo Tosatti Return-path: In-Reply-To: Sender: linux-kernel-owner@vger.kernel.org List-Id: kvm.vger.kernel.org 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 Paolo