Page MenuHomeFreeBSD

lkpi_vmf_insert_pfn_prot_locked(): detect uninitialized pages
Needs ReviewPublic

Authored by kib on Tue, Sep 8, 12:18 PM.

Details

Reviewers
alc
markj
Summary
This would not detect an unitialized page at the physical address zero,
but otherwise should be reliable.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

kib requested review of this revision.Tue, Sep 8, 12:18 PM

I understand that the immediate objection would be that memset's on the vm_page_array[] are slow and somewhat against the lazy initialization of vm_pages. But this is plain memset instead of the CPU-intensive calculations of proper vm_pages.

This should work against the class of drivers bugs where vma is created against a region that is not registered with the fictitious managed range. I was bitten by drm 6.12 on my new (but quite old) KabyLake notebook.