From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from Galois.linutronix.de ([146.0.238.70]:45379 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727209AbfBHTa2 (ORCPT ); Fri, 8 Feb 2019 14:30:28 -0500 Date: Fri, 8 Feb 2019 20:30:25 +0100 (CET) From: Thomas Gleixner Subject: Re: [PATCH v2 06/28] kernel: Define gettimeofday vdso common code In-Reply-To: Message-ID: References: <20181129170530.37789-1-vincenzo.frascino@arm.com> <20181129170530.37789-7-vincenzo.frascino@arm.com> <20181207175321.GA11430@edgewater-inn.cambridge.arm.com> <20190208173539.GD24375@fuggles.cambridge.arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Sender: linux-arch-owner@vger.kernel.org List-ID: To: Will Deacon Cc: Vincenzo Frascino , linux-arch@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Catalin Marinas , Arnd Bergmann , Russell King , Ralf Baechle , Paul Burton , Daniel Lezcano , Mark Salyzyn , Peter Collingbourne Message-ID: <20190208193025.P-KrWzBzBwnxg9qWSZw5uwfwS1y9WgVx1Ml-bHSgSMc@z> On Fri, 8 Feb 2019, Thomas Gleixner wrote: > Will, > > On Fri, 8 Feb 2019, Will Deacon wrote: > > On Fri, Dec 07, 2018 at 05:53:21PM +0000, Will Deacon wrote: > > > Anyway, moving the counter read into the protected region is a little fiddly > > > because the memory barriers we have in there won't give us the ordering we > > > need. We'll instead need to do something nasty, like create a dependency > > > from the counter read to the read of the seqlock: > > > > > > Maybe the untested crufty hack below, although this will be a nightmare to > > > implement in C. How is the in kernel ktime_get() correctness guaranteed then? Thanks, tglx