freebsd-skq/sys/vm
Ryan Libby ca293436d1 uma: trash memory when ctor/dtor supplied too
On INVARIANTS kernels, UMA has a use-after-free detection mechanism.
This mechanism previously required that all of the ctor/dtor/uminit/fini
arguments to uma_zcreate() be NULL in order to function.  Now, it only
requires that uminit and fini be NULL; now, the trash ctor and dtor will
be called in addition to any supplied ctor or dtor.

Also do a little refactoring for readability of the resulting logic.

This enables use-after-free detection for more zones, and will allow for
simplification of some callers that worked around the previous
restriction (see kern_mbuf.c).

Reviewed by:	jeff, markj
Sponsored by:	Dell EMC Isilon
Differential Revision:	https://reviews.freebsd.org/D20722
2019-11-27 19:49:55 +00:00
..
_vm_radix.h sys: general adoption of SPDX licensing ID tags. 2017-11-27 15:23:17 +00:00
default_pager.c SPDX: wrong license. 2017-11-30 15:45:42 +00:00
device_pager.c (4/6) Protect page valid with the busy lock. 2019-10-15 03:45:41 +00:00
memguard.c Add a vm_page_wired() predicate. 2019-06-02 01:00:17 +00:00
memguard.h sys: general adoption of SPDX licensing ID tags. 2017-11-27 15:23:17 +00:00
phys_pager.c (4/6) Protect page valid with the busy lock. 2019-10-15 03:45:41 +00:00
pmap.h Remove page locking from pmap_mincore(). 2019-10-16 22:03:27 +00:00
redzone.c sys: general adoption of SPDX licensing ID tags. 2017-11-27 15:23:17 +00:00
redzone.h sys: general adoption of SPDX licensing ID tags. 2017-11-27 15:23:17 +00:00
sg_pager.c (4/6) Protect page valid with the busy lock. 2019-10-15 03:45:41 +00:00
swap_pager.c Simplify anonymous memory handling with an OBJ_ANON flag. This eliminates 2019-11-19 23:19:43 +00:00
swap_pager.h sys: further adoption of SPDX licensing ID tags. 2017-11-20 19:43:44 +00:00
uma_core.c uma: trash memory when ctor/dtor supplied too 2019-11-27 19:49:55 +00:00
uma_dbg.c Fix compilation failures on different arches that have vm_machdep.c not 2019-01-15 19:33:47 +00:00
uma_dbg.h sys: general adoption of SPDX licensing ID tags. 2017-11-27 15:23:17 +00:00
uma_int.h uma: trash memory when ctor/dtor supplied too 2019-11-27 19:49:55 +00:00
uma.h Revise the page cache size policy. 2019-11-22 16:30:47 +00:00
vm_domainset.c Add a !NUMA definition for vm_domainset_iter_policy_ref_init(). 2018-10-24 17:09:20 +00:00
vm_domainset.h Refactor domainset iterators for use by malloc(9) and UMA. 2018-10-23 16:35:58 +00:00
vm_extern.h Improve MD page fault handlers. 2019-09-27 18:43:36 +00:00
vm_fault.c Simplify anonymous memory handling with an OBJ_ANON flag. This eliminates 2019-11-19 23:19:43 +00:00
vm_glue.c Revise the page cache size policy. 2019-11-22 16:30:47 +00:00
vm_init.c Do not reserve KVA for paging bufs in vm_ksubmap_init(), since now 2019-01-16 20:14:16 +00:00
vm_kern.c Apply mapping protections to preloaded kernel modules on amd64. 2019-10-18 13:56:45 +00:00
vm_kern.h Do not reserve KVA for paging bufs in vm_ksubmap_init(), since now 2019-01-16 20:14:16 +00:00
vm_map.c Move anonymous object copying for fork into its own routine and so that we 2019-11-25 07:13:05 +00:00
vm_map.h Instead of looking up a predecessor or successor to the current map 2019-11-20 16:06:48 +00:00
vm_meter.c Simplify anonymous memory handling with an OBJ_ANON flag. This eliminates 2019-11-19 23:19:43 +00:00
vm_mmap.c Define wrapper functions vm_map_entry_{succ,pred} to act as wrappers 2019-11-13 15:56:07 +00:00
vm_object.c Use atomics in more cases for object references. We now can completely 2019-11-27 00:39:23 +00:00
vm_object.h Only keep anonymous objects on shadow lists. This eliminates locking of 2019-11-20 00:31:14 +00:00
vm_page.c Record part of the owner struct thread pointer into busy_lock. 2019-11-24 19:12:23 +00:00
vm_page.h Record part of the owner struct thread pointer into busy_lock. 2019-11-24 19:12:23 +00:00
vm_pageout.c Simplify vm_pageout_init_domain() and add a "big picture" comment. 2019-11-22 16:31:43 +00:00
vm_pageout.h Fix OOM handling of some corner cases. 2019-08-16 09:43:49 +00:00
vm_pagequeue.h Simplify vm_pageout_init_domain() and add a "big picture" comment. 2019-11-22 16:31:43 +00:00
vm_pager.c Add couple more assertions to vm_pager_assert_in(). The bogus page is 2019-10-25 16:59:54 +00:00
vm_pager.h vm pager: writemapping accounting for OBJT_SWAP 2019-09-03 20:31:48 +00:00
vm_param.h Improve MD page fault handlers. 2019-09-27 18:43:36 +00:00
vm_phys.c Remove unnecessary debugging from r351181 that caused powerpc build to fail. 2019-08-18 08:07:31 +00:00
vm_phys.h Encapsulate phys_avail manipulation in a set of simple routines. Add a 2019-08-18 07:06:31 +00:00
vm_radix.c vm: stop passing M_ZERO when allocating radix nodes 2018-06-24 13:08:05 +00:00
vm_radix.h sys: general adoption of SPDX licensing ID tags. 2017-11-27 15:23:17 +00:00
vm_reserv.c Fix locking in vm_reserv_reclaim_contig(). 2019-11-22 16:28:52 +00:00
vm_reserv.h Fix locking in vm_reserv_reclaim_contig(). 2019-11-22 16:28:52 +00:00
vm_swapout_dummy.c SPDX: Consider code from Carnegie-Mellon University. 2017-11-30 15:48:35 +00:00
vm_swapout.c (4/6) Protect page valid with the busy lock. 2019-10-15 03:45:41 +00:00
vm_unix.c Provide separate accounting for user-wired pages. 2019-05-13 16:38:48 +00:00
vm.h Move vm_ndomains to vm.h where it can be used with a single header include 2018-03-27 03:27:02 +00:00
vnode_pager.c Use atomics in more cases for object references. We now can completely 2019-11-27 00:39:23 +00:00
vnode_pager.h vm pager: writemapping accounting for OBJT_SWAP 2019-09-03 20:31:48 +00:00