[PATCH RFC 33/35] kfence: drop nth_page() usage
David Hildenbrand
david at redhat.com
Thu Aug 21 20:32:29 UTC 2025
On 21.08.25 22:06, David Hildenbrand wrote:
> We want to get rid of nth_page(), and kfence init code is the last user.
>
> Unfortunately, we might actually walk a PFN range where the pages are
> not contiguous, because we might be allocating an area from memblock
> that could span memory sections in problematic kernel configs (SPARSEMEM
> without SPARSEMEM_VMEMMAP).
>
> We could check whether the page range is contiguous
> using page_range_contiguous() and failing kfence init, or making kfence
> incompatible these problemtic kernel configs.
>
> Let's keep it simple and simply use pfn_to_page() by iterating PFNs.
>
Fortunately this series is RFC due to lack of detailed testing :P
Something gives me a NULL-pointer pointer here (maybe the virt_to_phys()).
Will look into that tomorrow.
--
Cheers
David / dhildenb
More information about the Intel-gfx
mailing list