freebsd-src/sys/vm
Mark Johnston 517c585458 vm_phys: Make sure that vm_phys_enq_chunk() stays in bounds
vm_phys_enq_chunk() inserts a run of pages into the buddy queues.  When
lazy initialization is enabled, only the first page of each run is
initialized; vm_phys_enq_chunk() thus initializes the page following the
just-inserted run.

This fails to account for the possibility that the page following the
run doesn't belong to the segment.  Handle that in vm_phys_enq_chunk().

Reported by:	KASAN
Reported by:	syzbot+1097ef4cee8dfb240e31@syzkaller.appspotmail.com
Fixes:	b16b4c22d2 ("vm_page: Implement lazy page initialization")
2024-06-14 15:55:02 -04:00
..
_vm_phys.h Revert "subr_pctrie: use ilog2(x) instead of fls(x)-1" 2024-06-03 13:07:42 -05:00
_vm_radix.h
device_pager.c cdev_pager_allocate(): ensure that the cdev_pager_ops ctr is called only once 2024-05-12 04:13:00 +03:00
memguard.c
memguard.h
phys_pager.c
pmap.h pmap: move the smp_targeted_tlb_shutdown pointer stuff to amd64 pmap.h 2024-06-06 08:15:08 +03:00
redzone.c
redzone.h
sg_pager.c
swap_pager.c pctrie: avoid typecast 2024-06-14 02:19:03 -05:00
swap_pager.h
uma_align_mask.h
uma_core.c uma: Fix improper uses of UMA_MD_SMALL_ALLOC 2024-05-26 07:27:37 +02:00
uma_dbg.c
uma_dbg.h
uma_int.h
uma.h
vm_domainset.c
vm_domainset.h
vm_dumpset.h
vm_extern.h vm: Change the return types of kernacc and useracc to bool 2024-05-10 13:43:56 -07:00
vm_fault.c pmap: Skip some superpage promotion attempts that will fail 2024-06-04 00:38:05 -05:00
vm_glue.c vm: Change the return types of kernacc and useracc to bool 2024-05-10 13:43:56 -07:00
vm_init.c Adjust comments referencing vm_mem_init() 2024-05-27 18:37:40 -03:00
vm_kern.c
vm_kern.h vm: improve kstack_object pindex calculation to avoid pindex holes 2024-04-10 17:37:20 +02:00
vm_map.c vm: Reduce address space fragmentation 2024-06-13 15:13:45 -05:00
vm_map.h
vm_meter.c
vm_mmap.c
vm_object.c vm: Eliminate a redundant call to vm_reserv_break_all() 2024-06-05 12:39:47 -05:00
vm_object.h
vm_page.c vm_page: Implement lazy page initialization 2024-06-13 21:19:00 -04:00
vm_page.h vm_page: Let vm_page_init_page() take a pool parameter 2024-06-13 21:18:59 -04:00
vm_pageout.c vm_pageout_scan_inactive: take a lock break 2024-05-24 08:52:58 -07:00
vm_pageout.h
vm_pagequeue.h vm_pageout_scan_inactive: take a lock break 2024-05-24 08:52:58 -07:00
vm_pager.c pbuf_ctor(): Stop using LK_NOWAIT, use LK_NOWITNESS 2024-05-26 10:20:52 -07:00
vm_pager.h
vm_param.h
vm_phys.c vm_phys: Make sure that vm_phys_enq_chunk() stays in bounds 2024-06-14 15:55:02 -04:00
vm_phys.h vm_page: Implement lazy page initialization 2024-06-13 21:19:00 -04:00
vm_radix.c uma: Deduplicate uma_small_alloc 2024-05-25 19:24:46 +02:00
vm_radix.h vm_radix: define vm_radix_insert_lookup_lt and use in vm_page_rename 2024-06-06 10:26:50 -07:00
vm_reserv.c Revert "subr_pctrie: use ilog2(x) instead of fls(x)-1" 2024-06-03 13:07:42 -05:00
vm_reserv.h
vm_swapout_dummy.c
vm_swapout.c vm: improve kstack_object pindex calculation to avoid pindex holes 2024-04-10 17:37:20 +02:00
vm_unix.c
vm.h pmap: Skip some superpage promotion attempts that will fail 2024-06-04 00:38:05 -05:00
vnode_pager.c Stop treating size 0 as unknown size in vnode_create_vobject(). 2024-05-23 06:08:14 +00:00
vnode_pager.h