mm/debug_vm_pgtable.c:860 warning triggered

David Hildenbrand david at
Mon Nov 6 20:06:03 AEDT 2023

On 06.11.23 07:06, Michael Ellerman wrote:
> Anshuman Khandual <anshuman.khandual at> writes:
>> Hello Daniel,
>> This test just ensures that PFN is preserved during pte <--> swap pte transformations
>> , and the warning here seems to have been caused by powerpc platform specific helpers
>> and/or its pte_t representation. Adding powerpc folks and platform mailing list here.

32bit swp_entry_t with 64bit pte is supported by making sure that we 
never store a swap offset larger than what we can actually fit into the 

There is common code in place to handle that: see 
generic_max_swapfile_size(), which does to conversion back and forth to 
see how many bits of the offset actually survive the conversion.

> Doesn't the test need a similar treatment to:
>    2321ba3e3733 ("mm/debug_vm_pgtable: more pte_swp_exclusive() sanity checks")
> Which said:
>      Especially, the pfn_pte() is dodgy when the swap PTE layout differs
>      heavily from ordinary PTEs.  Let's properly construct a swap PTE from swap
>      type+offset.

Sounds reasonable to me.


David / dhildenb

More information about the Linuxppc-dev mailing list