The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=665895db262fa596b347e40f6857b37e0f43b184
commit 665895db262fa596b347e40f6857b37e0f43b184 Author: Konstantin Belousov <k...@freebsd.org> AuthorDate: 2021-08-01 21:58:21 +0000 Commit: Konstantin Belousov <k...@freebsd.org> CommitDate: 2021-08-02 00:28:33 +0000 amd64 pmap_vm_page_alloc_check(): loose the assert Current expression checks that vm_page_alloc(9) never returns a page belonging to the preload area. This is not true if something was freed from there, for instance a preloaded module was unloaded, or ucode update freed. Only check that we never allow to allocate a page belonging to the kernel proper, check against _end. Reported and tested by: dhw Sponsored by: The FreeBSD Foundation MFC after: 1 week --- sys/amd64/include/pmap.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/sys/amd64/include/pmap.h b/sys/amd64/include/pmap.h index 518dc544ac0d..375a86f95e9f 100644 --- a/sys/amd64/include/pmap.h +++ b/sys/amd64/include/pmap.h @@ -457,9 +457,10 @@ extern int invpcid_works; #define pmap_unmapbios(va, sz) pmap_unmapdev((va), (sz)) #define pmap_vm_page_alloc_check(m) \ - KASSERT(m->phys_addr < kernphys || m->phys_addr >= KERNend, \ - ("allocating kernel page %p pa %#lx kernphys %#lx kernend %#lx", \ - m, m->phys_addr, kernphys, KERNend)); + KASSERT(m->phys_addr < kernphys || \ + m->phys_addr >= kernphys + (vm_offset_t)&_end - KERNSTART, \ + ("allocating kernel page %p pa %#lx kernphys %#lx end %p", \ + m, m->phys_addr, kernphys, &_end)); struct thread; _______________________________________________ dev-commits-src-main@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/dev-commits-src-main To unsubscribe, send any mail to "dev-commits-src-main-unsubscr...@freebsd.org"