On 06.11.23 07:06, Michael Ellerman wrote:
Anshuman Khandual <anshuman.khandual@xxxxxxx> 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
swp_entry_t.
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.
--
Cheers,
David / dhildenb