diff options
author | Matthew Dillon <dillon@FreeBSD.org> | 2000-02-16 21:11:33 +0000 |
---|---|---|
committer | Matthew Dillon <dillon@FreeBSD.org> | 2000-02-16 21:11:33 +0000 |
commit | 1f6889a1eb5070dfa739f4158cfb33f13b7a462d (patch) | |
tree | ffa24ad6f287af901091f289951217e582cb5261 /sys/vm/vm_kern.h | |
parent | c2ebb466e57077c7d5851580569936c90ba1e24d (diff) | |
download | src-1f6889a1eb5070dfa739f4158cfb33f13b7a462d.tar.gz src-1f6889a1eb5070dfa739f4158cfb33f13b7a462d.zip |
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
Notes
Notes:
svn path=/head/; revision=57263
Diffstat (limited to 'sys/vm/vm_kern.h')
-rw-r--r-- | sys/vm/vm_kern.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/sys/vm/vm_kern.h b/sys/vm/vm_kern.h index 2f1fe76aae44..a962c1782f53 100644 --- a/sys/vm/vm_kern.h +++ b/sys/vm/vm_kern.h @@ -75,6 +75,7 @@ extern vm_map_t mb_map; extern int mb_map_full; extern vm_map_t clean_map; extern vm_map_t exec_map; +extern u_int vm_kmem_size; extern vm_offset_t kernel_vm_end; /* XXX - elsewhere? */ |