On 25.04.24 11:48, Mounesh Badiger wrote:
Thanks for the confirmation. I am using remap_pfn_range(). I can use alloc_pages() instead of kmalloc().
Okay, for remap_pfn_range() it doesn't matter, because we'll never touch the "struct page" metadata (pages are considered not refcounted).
vm_insert_page() would likely have refused the kmalloc'ed pages because validate_page_before_insert() would refuse mapping any slab folios.
Should be working for you as expected. -- Cheers, David / dhildenb