Date: Wed, 16 Feb 2000 13:11:38 -0800 (PST) From: Matt Dillon <dillon@FreeBSD.org> To: cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: cvs commit: src/sys/kern kern_malloc.c src/sys/sys kernel.h src/sys/vm vm_kern.h vm_map.c vm_mmap.c src/lib/libc/sys mmap.2 Message-ID: <200002162111.NAA83143@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
dillon 2000/02/16 13:11:37 PST
Modified files:
sys/kern kern_malloc.c
sys/sys kernel.h
sys/vm vm_kern.h vm_map.c vm_mmap.c
lib/libc/sys mmap.2
Log:
Fix null-pointer dereference crash when the system is intentionally
run out of KVM through a mmap()/fork() bomb that allocates hundreds
of thousands of vm_map_entry structures.
Add panic to make null-pointer dereference crash a little more verbose.
Add a new sysctl, vm.max_proc_mmap, which specifies the maximum number
of mmap()'d spaces (discrete vm_map_entry's in the process). The value
defaults to around 9000 for a 128MB machine. The test is scaled for the
number of processes sharing a vmspace (aka linux threads). Setting
the value to 0 disables the feature.
PR: kern/16573
Approved by: jkh
Revision Changes Path
1.64 +3 -2 src/sys/kern/kern_malloc.c
1.62 +2 -1 src/sys/sys/kernel.h
1.22 +2 -1 src/sys/vm/vm_kern.h
1.186 +8 -2 src/sys/vm/vm_map.c
1.107 +43 -5 src/sys/vm/vm_mmap.c
1.20 +3 -2 src/lib/libc/sys/mmap.2
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe cvs-all" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200002162111.NAA83143>
