From mboxrd@z Thu Jan 1 00:00:00 1970 From: Peter Zijlstra Subject: Re: [PATCH v4 07/11] READ_ONCE: Enforce atomicity for {READ,WRITE}_ONCE() memory accesses Date: Fri, 24 Apr 2020 19:43:34 +0200 Message-ID: <20200424174334.GB13592@hirez.programming.kicks-ass.net> References: <20200421151537.19241-1-will@kernel.org> <20200421151537.19241-8-will@kernel.org> <20200424171135.GJ21141@willie-the-truck> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46168 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1727049AbgDXRoS (ORCPT ); Fri, 24 Apr 2020 13:44:18 -0400 Content-Disposition: inline In-Reply-To: <20200424171135.GJ21141@willie-the-truck> Sender: linux-arch-owner@vger.kernel.org List-ID: To: Will Deacon Cc: Jann Horn , kernel list , linux-arch , kernel-team , Mark Rutland , Michael Ellerman , Linus Torvalds , Segher Boessenkool , Christian Borntraeger , Luc Van Oostenryck , Arnd Bergmann , Peter Oberparleiter , Masahiro Yamada , Nick Desaulniers On Fri, Apr 24, 2020 at 06:11:35PM +0100, Will Deacon wrote: > My apologies, you're completely right. I thought that PAE mandated 64-bit > atomicity, like it does on 32-bit ARM, but that's apparently not the case > and looking at the 32-bit x86 pgtable code they have to be really careful > there. They added CMPXCHG8B for PAE, but then we never used it for that because it's dead slow (MS did use it I think). Instead we play horrible split word games, grep for CONFIG_GUP_GET_PTE_LOW_HIGH.