Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796147367; b=YDrHUgLgXj6YbhWpaJbnUCdag1eIALYsfjk5j09cKcsgY8PzZ+RJyTrtOpXgUk/8Lo7C LtbgtPDJ1sD0iB1ljjAxPvbPcWFdouXWMJmvflu6LYg2ytXRt7azdgDdaVSlwfnlj3G0b wcx68+cmi/5tKuqQ5AY0wuSbyxqoTv+Qk/+5DDulmlTCuCIeP2RAFesMfgoaHggXAsHY5 UTAexg/KtPaLr2rmG+JW9hl9XTEu8ECVf2l2YMWVihgD96Pnh3E+oJpHh7nov8vPESNSO qHezf/gn+0uACG4vWIGOtklJoSWbgd+q8/cSRY5oTNrlwQ4xetrr0O7f8TS7/jNfEFQ== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796147367; h=Received:DKIM-Signature:Message-ID:From:Subject:Reply-To:To:Cc: In-Reply-To:References:Content-Type:Content-Transfer-Encoding:Date; bh=vn6NMYMU4y9bALkOiHRCQsrAWQgLxWkOMQFMyFB+taI=; b=Zk8T3buCfwsKBIAs2aPw3x99hkPbH7XnIsrVuh+9s2rGEmTJ4jLYk8Bq0zm+goQvVGW2 ab91Tv/aBStBZmmZdPU+sBcDgFs261j262UqAFKmFGWyGnokAJIjyWXKGLOylPaemYCv5 FjlLw3U7Bb/upqM1+ITST1jWKrFQ1xDwehZi/N5GXoXSJ2OCzdTW8dCB4CT6IBZpYxrXG h9U4dMKtKTstNsbUV89dxEW4j3CsRPKGjo/5jK4Ksys/GS4sdMCpYOa5OTp4RdhSud4mf zGA18dB1TVOZCV7iCQV6+VUiDWjKf07sUKTzh5mepYq8C8OQ0V5ihtSB9hpHNHDRRIw== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=l7Z5ho1n; arc=none smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 09B14606A32A for ; Tue, 1 Dec 2026 17:49:26 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key, unprotected) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=l7Z5ho1n Received: by smtp.kernel.org (Postfix) with ESMTPSA id 00BCB1F0089B; Tue, 1 Dec 2026 17:49:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1796147366; bh=vn6NMYMU4y9bALkOiHRCQsrAWQgLxWkOMQFMyFB+taI=; h=From:Subject:Reply-To:To:Cc:In-Reply-To:References:Date; b=l7Z5ho1nKPqrrUmKvOLx/gOEItgmi03tvgRNK3ZW7ipyeeqBlfEWS6hpPXrUIvaEC 5kYkROYqro46lMaUdowuiF5bevyibVkgXDgYOSSxE353XAVbf+bOn2n/XitMYBePsy MpZCT+GrXtZsI6ImXYgORPsrd2No0cW8i8nYzlQEO/2H/xS0hseI6pL1aY+WWAbfDS AgvrwGz22hBTzZpvnyhuyJwh3t+R2WONfIruKtECW7N7Tiq2kfKP5wNgf5P/09gmAi zezQguf9Q9JRTsl2vIdDJPsaS+FZuQoVNEyxeVQNk8+wTCuxyQhD19+hJItf2Pqy/y oOodZM+4hVhng== Message-ID: From: sashiko-bot@kernel.org Subject: Re: [PATCH v4 01/20] mm/pgtable: define (pgd|p4d|pud)_offset_lockless() for folded page tables Reply-To: sashiko-reviews@lists.linux.dev To: "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" , "David Hildenbrand" , "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" Cc: linux-mm@kvack.org, kvm@vger.kernel.org, "Muhammad Usama Anjum" In-Reply-To: <20261201-dummy_ptxp3-v4-1-9dec1da6a49a@arm.com> References: <20261201-dummy_ptxp3-v4-0-9dec1da6a49a@arm.com> <20261201-dummy_ptxp3-v4-1-9dec1da6a49a@arm.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Date: Tue, 01 Dec 2026 17:49:23 +0000 X-Mailing-List: kvm@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list Thank you for your contribution! Sashiko AI review found 2 potential issues to consider: - [Low] mm/pgtable: malformed Fixes trailer and invalid SHA in commit message - [Low] mm/pgtable: commit subject names pgd instead of pmd in offset_lockless list -- commit 3b1d2e59bba595ca6fbc88297f617523c490c14d Author: David Hildenbrand (Arm) > mm/pgtable: define (pgd|p4d|pud)_offset_lockless() for folded page tables [Severity: Low] As reported by David Hildenbrand (Arm) on v3 [1], the commit subject lists (pgd|p4d|pud)_offset_lockless(), whereas the patch and changelog define (p4d|pud|pmd)_offset_lockless(). > The default helpers fall back to (p4d|pud|pmd)_offset(), passing a pointer > to the stack value. > > Let's provide variants that do exactly what (p4d|pud|pmd)_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. > > While at it, drop the arm64 custom variant that did that. As it documents: > > Note: reusing the original pointer means that we may > dereference 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. > > No need to document this, as we will avoid the double-read next. > > Consequently, the rechecks in fast GUP now read the live entry instead > of a stack copy when a page table level is folded at compile time, so > concurrent changes are detected again. This affects the pud leaf > recheck when the pud is folded (e.g., arm64 with 3 levels), and the pmd > leaf recheck plus the pmd recheck in gup_fast_pte_range() when the pmd > is folded (e.g., arm64 with 2 levels). > > Link: [1] https://lore.kernel.org/all/0019d675-ce3d-4a5c-89ed-f126c45145c= 9@kernel.org/ > Cc: > Fixes: Fixes: d3f7b1bb2049 ("mm/gup: fix gup_fast with dynamic page table= folding") > Tested-by: Muhammad Usama Anjum > Signed-off-by: David Hildenbrand (Arm) [Severity: Low] As reported by David Hildenbrand (Arm) on v3 [2], the Fixes: tag has a duplicated prefix and a truncated commit SHA (d3f7b1bb2049 instead of d3f7b1bb2040). It should be: Fixes: d3f7b1bb2040 ("mm/gup: fix gup_fast with dynamic page table foldin= g") [1] https://lore.kernel.org/r/1a14468d-5764-419f-9ff6-cf75e5bd74a6@kernel.o= rg [2] https://lore.kernel.org/r/f6d66801-bed7-4dfd-8fc8-70ccc41c5f95@kernel.o= rg --=20 Sashiko AI review =C2=B7 https://sashiko.dev/#/patchset/20261201-dummy_ptxp= 3-v4-0-9dec1da6a49a@arm.com?part=3D1