[PATCH] arm64: mm: refresh stale pmd snapshot after split_contpmd()

David Hildenbrand (Arm) david at kernel.org
Fri Jun 26 09:03:39 PDT 2026


On 6/26/26 15:03, Dev Jain wrote:
> 
> 
> On 25/06/26 5:09 pm, lirongqing wrote:
>> From: Li RongQing <lirongqing at baidu.com>
>>
>> split_contpmd() modifies the pmd entries in-place by clearing the CONT
>> bit, but the local 'pmd' variable still holds the old snapshot with CONT
>> set. The subsequent split_pmd() call uses this stale value to derive the
>> pgprot for the new PTE entries via pmd_pgprot(), causing the resulting
>> PTEs to be populated with incorrect protection bits.
> 
> Since the block was CONTPMD, it means the pgprot was uniform on that block,
> so after splitting, it should be safe to derive the pgprot from individual pmd's
> right?

I'm also confused by that, can we get some details why (and how) the cont bit
misguides  pmd_pgprot?

-- 
Cheers,

David



More information about the linux-arm-kernel mailing list