From owner-cvs-all Wed Feb 16 13:11:47 2000 Delivered-To: cvs-all@freebsd.org Received: from builder.freebsd.org (builder.FreeBSD.ORG [204.216.27.24]) by hub.freebsd.org (Postfix) with ESMTP id 801B437B54D; Wed, 16 Feb 2000 13:11:44 -0800 (PST) (envelope-from dillon@FreeBSD.org) Received: from freefall.freebsd.org (freefall.FreeBSD.ORG [204.216.27.21]) by builder.freebsd.org (Postfix) with ESMTP id 6AA5C132F6; Wed, 16 Feb 2000 13:11:07 -0800 (PST) Received: (from dillon@localhost) by freefall.freebsd.org (8.9.3/8.9.2) id NAA83143; Wed, 16 Feb 2000 13:11:39 -0800 (PST) (envelope-from dillon@FreeBSD.org) Message-Id: <200002162111.NAA83143@freefall.freebsd.org> From: Matt Dillon Date: Wed, 16 Feb 2000 13:11:38 -0800 (PST) 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 Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk 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