From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=217.140.110.172 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796143749; b=QKPB7OB8G9v9sHjeM02EAb/zNIc+6I+ob8m2W+Av3qGjECqQPDjcLfn0ZFGDfjsxqCgy MXkeHRvhnt/av6nBb2jRPlKehw63BWnWaB2VP0P9RjTFt+B3AMTse5Lq8OVgiAd7pvmcM Bko3nhIWVXsyfYYib3edkoMEGUOdT/tY99HUHHlQp32QVUD1VClJeTo0VXG2LBJEE5HVc mF68X1YJOinzpgP9rMItKpIgUWlErNP2IQuwaswZV8uIMdvFnr9DTaefjOj/Y26B5rfCb uKCApVjKeIPU0Iobo/ATXMgu2ulAoaSTRo760eWUVARjEk+BW8PGK3PO0PrgRTztBQg== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796143749; h=DMARC-Filter:Received:Received:DKIM-Signature:Date:From:To:Cc: Subject:Message-ID:References:MIME-Version:Content-Type: Content-Disposition:In-Reply-To; bh=ezD7iHPI6egYn2zIK9m+Ltj5YWBoJQg64zchsO6wZ+k=; b=S3gCWeAe/dDv+UstxTsdsZ/2IgRpIi8rfRvBUmARPRJUfTiSw/VTZo1Kk0NoyC1lJmPe sSjopmfSTQje5IKWxm6EvrLNw+DeX+fP4KxtOnGoz+2GOU9ZzbrVyERxnDivZbgYywZjn ZBF8ImDWikFCAL9B7iMt+O9W+brG68gVSyuG6NcoMTyD9U9OufC7fLhgYDM5dbxWbOu5K jSrlbw7/UtQgugeic3SYHf6rKlXg2xO9uUT+/dCxk8KfR1tK9O5oDn/NvA2bdP2+4yRkp OmtXghsFXrLdUs1nH6jFn455XVhHOZ/HeJqo+F4DOKFQhjrsi+PcCpCCbsf4MwN7w2w== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=arm.com; spf=pass smtp.mailfrom=arm.com; dkim=pass header.d=arm.com header.i=@arm.com header.a=rsa-sha256 header.s=foss header.b=q34jO64c; arc=none smtp.remote-ip=217.140.110.172 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 3C4C7606A31A; Tue, 1 Dec 2026 16:49:09 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 3C4C7606A31A Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=arm.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=arm.com header.i=@arm.com header.a=rsa-sha256 header.s=foss header.b=q34jO64c Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id C9E3719F0; Tue, 1 Dec 2026 08:49:05 -0800 (PST) Received: from e129823.arm.com (e129823.arm.com [10.2.213.3]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 1319B3F86F; Tue, 1 Dec 2026 08:49:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=arm.com; s=foss; t=1796143748; bh=Puzsh3vA1l/TDN1MUa7oGbBgUI+wtcPTwleRFmSyhE8=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=q34jO64cyCD1vHQnFzQaOi++EvjLlAHwwHdyJ5h1P/1lGjqq8tVcoEEyTJASx+S6e EAi8LezbQFW+pbLFXYz3Phhn/gTPxz8P8xPAHFH5w6Q5Czw7oe8Wd6UMpp/fNpEmFu 4po5p+N6cCv3MgOmnDJsEprVsV9s3Ou1Fqkgb9v0= Date: Tue, 1 Dec 2026 16:48:59 +0000 From: Yeoreum Yun To: "David Hildenbrand (Arm)" Cc: Yeoreum Yun , Russell King , Huacai Chen , WANG Xuerui , Thomas Bogendoerfer , Catalin Marinas , Will Deacon , Arnd Bergmann , Andrew Morton , Kairui Song , Qi Zheng , Shakeel Butt , Barry Song , Axel Rasmussen , Yuanchu Xie , Wei Xu , Johannes Weiner , Michal Hocko , Lorenzo Stoakes , Tianrui Zhao , Bibo Mao , Anup Patel , Atish Patra , Paul Walmsley , Palmer Dabbelt , Albert Ou , Alexandre Ghiti , Dave Hansen , Andy Lutomirski , Peter Zijlstra , Thomas Gleixner , Ingo Molnar , Borislav Petkov , x86@kernel.org, "H. Peter Anvin" , "Liam R. Howlett" , Vlastimil Babka , Mike Rapoport , Suren Baghdasaryan , Michal Hocko , Jonas Bonn , Stefan Kristiansson , Stafford Horne , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, loongarch@lists.linux.dev, linux-mips@vger.kernel.org, linux-arch@vger.kernel.org, linux-mm@kvack.org, kvm@vger.kernel.org, kvm-riscv@lists.infradead.org, linux-riscv@lists.infradead.org, linux-openrisc@vger.kernel.org, stable@vger.kernel.org Subject: Re: [PATCH v3 01/20] mm/pgtable: define (pgd|p4d|pud)_offset_lockless() for folded page tables Message-ID: References: <20261130-dummy_ptxp3-v3-0-456081a8ed0e@arm.com> <20261130-dummy_ptxp3-v3-1-456081a8ed0e@arm.com> <1a14468d-5764-419f-9ff6-cf75e5bd74a6@kernel.org> X-Mailing-List: linux-arch@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1a14468d-5764-419f-9ff6-cf75e5bd74a6@kernel.org> On Tue, Dec 01, 2026 at 12:21:46PM +0100, David Hildenbrand (Arm) wrote: > On 11/30/26 18:18, Yeoreum Yun wrote: > > From: "David Hildenbrand (Arm)" > > We should adjust the title to > > > mm/pgtable: define (p4d|pud|pmd)_offset_lockless() for folded page tables > > > > > The default helpers fallback to pud_offset(), passing a pointer to the > > stack value. > > > > Let's provide variants that do exactly what (pgd|p4d|pud)_offset() do, > > but ignore the passed pgd_t/p4d_t/pud_t, consequently not working on a > > pointer to the stack value like the default handlers would. > > > > With this patch, Drop the arm64 custom variant that did that. As it documents: > > s/Drop/drop/ > > > > > Note: reusing the original pointer means that it may be > > dereferenced the same (live) page-table entry multiple times. > > This is safe because it is still only loaded once in the > > context of each level and the CPU guarantees same-address > > read-after-read ordering. > > That's not the actual comment we had in there ;) > > > All things I can fix up. Thanks! -- Sincerely, Yeoreum Yun