Re: [PATCH RFC 33/35] kfence: drop nth_page() usage
David Hildenbrand <[email protected]>
| Newsgroups | com.zx2c4.lists.wireguard,dev.linux.lists.iommu,dev.linux.lists.virtualization,org.freedesktop.lists.dri-devel,org.freedesktop.lists.intel-gfx,org.infradead.lists.linux-arm-kernel,org.infradead.lists.linux-riscv,org.kernel.vger.io-uring,org.kernel.vger.kvm,org.kernel.vger.linux-crypto,org.kernel.vger.linux-ide,org.kernel.vger.linux-kernel,org.kernel.vger.linux-kselftest,org.kernel.vger.linux-mips,org.kernel.vger.linux-mmc,org.kernel.vger.linux-s390,org.kernel.vger.linux-scsi,org.kernel.vger.netdev,org.kvack.linux-mm |
|---|---|
| Message-ID | <[email protected]> |
On 21.08.25 22:32, David Hildenbrand wrote: > 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. Okay, easy: relying on i but not updating it /me facepalm -- Cheers David / dhildenb