On Thu, 05 Sep 2024 20:11:24 +1200, Barry Song wrote: > According to David and Ryan, there isn't a bug here, even though we > don't advance the PTE entry, because __ptep_set_access_flags() only > uses the access flags from the entry. > > However, we always check pte_same(pte, entry) using the first entry > in __ptep_set_access_flags(). This means that the checks from 1 to > nr - 1 are not comparing the same PTE indexes (thus, they always > return false), which can be a bit confusing. To clarify the code, let's > add some comments. > > [...] Applied to arm64 (for-next/mm), thanks! [1/1] mm: arm64: document why pte is not advanced in contpte_ptep_set_access_flags() https://git.kernel.org/arm64/c/70565f2be880 Cheers, -- Will https://fixes.arm64.dev https://next.arm64.dev https://will.arm64.dev