From owner-cvs-src@FreeBSD.ORG Fri Feb 27 10:02:59 2004 Return-Path: Delivered-To: cvs-src@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 3C93416A4CE; Fri, 27 Feb 2004 10:02:59 -0800 (PST) Received: from smtp.netcabo.pt (smtp.netcabo.pt [212.113.174.9]) by mx1.FreeBSD.org (Postfix) with ESMTP id AF38F43D39; Fri, 27 Feb 2004 10:02:58 -0800 (PST) (envelope-from truckman@FreeBSD.org) Received: from mail pickup service by smtp.netcabo.pt with Microsoft SMTPSVC; Fri, 27 Feb 2004 18:02:38 +0000 Received: from rt.dgc.tvcabo.pt ([212.113.163.4]) by smtp.netcabo.pt with Microsoft SMTPSVC(5.0.2195.6713); Thu, 26 Feb 2004 02:18:07 +0000 Received: (qmail 23669 invoked by uid 512); 26 Feb 2004 02:10:23 -0000 Received: from owner-cvs-all@freebsd.org by legolas.hdi.tvcabo.pt by uid 504 with qmail-scanner-1.20st (clamuko: 0.66. spamassassin: 2.63. Clear:RC:1(212.113.174.9):. Processed in 1.857023 secs); 26 Feb 2004 02:10:23 -0000 X-Antivirus-TVCABO-Mail-From: owner-cvs-all@freebsd.org via legolas.hdi.tvcabo.pt X-Antivirus-TVCABO: 1.20st (Clear:RC:1(212.113.174.9):. Processed in 1.857023 secs) process 23668 Received: from smtp.netcabo.pt (212.113.174.9) by rt.dgc.tvcabo.pt with SMTP; 26 Feb 2004 02:10:20 -0000 Received: from mx2.freebsd.org ([216.136.204.119]) by smtp.netcabo.pt with Microsoft SMTPSVC(5.0.2195.6713); Thu, 26 Feb 2004 00:27:39 +0000 Received: from hub.freebsd.org (hub.freebsd.org [216.136.204.18]) by mx2.freebsd.org (Postfix) with ESMTP id 6FF4B5706C; Wed, 25 Feb 2004 16:27:34 -0800 (PST) (envelope-from owner-cvs-all@freebsd.org) Received: from hub.freebsd.org (localhost [127.0.0.1]) by hub.freebsd.org (Postfix) with ESMTP id 76C7816A50B; Wed, 25 Feb 2004 16:27:12 -0800 (PST) Delivered-To: cvs-all@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id AAAB516A4E8; Wed, 25 Feb 2004 16:27:04 -0800 (PST) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8EBA443D1F; Wed, 25 Feb 2004 16:27:04 -0800 (PST) (envelope-from truckman@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.10/8.12.10) with ESMTP id i1Q0R4Ge078749; Wed, 25 Feb 2004 16:27:04 -0800 (PST) (envelope-from truckman@repoman.freebsd.org) Received: (from truckman@localhost) by repoman.freebsd.org (8.12.10/8.12.10/Submit) id i1Q0R4lP078748; Wed, 25 Feb 2004 16:27:04 -0800 (PST) (envelope-from truckman) Message-Id: <200402260027.i1Q0R4lP078748@repoman.freebsd.org> From: Don Lewis Date: Wed, 25 Feb 2004 16:27:04 -0800 (PST) To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org X-FreeBSD-CVS-Branch: HEAD X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Sender: owner-cvs-all@freebsd.org Errors-To: owner-cvs-all@freebsd.org X-OriginalArrivalTime: 26 Feb 2004 00:27:41.0550 (UTC) FILETIME=[587068E0:01C3FBFF] Subject: cvs commit: src/sys/kern kern_descrip.c kern_fork.c kern_linker.c kern_proc.c kern_sysctl.c vfs_subr.c src/sys/netinet ip_divert.c tcp_subr.c udp_usrreq.c src/sys/netncp ncp_conn.c src/sys/netsmb... X-BeenThere: cvs-src@freebsd.org List-Id: CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Feb 2004 18:02:59 -0000 truckman 2004/02/25 16:27:04 PST FreeBSD src repository Modified files: sys/kern kern_descrip.c kern_fork.c kern_linker.c kern_proc.c kern_sysctl.c vfs_subr.c sys/netinet ip_divert.c tcp_subr.c udp_usrreq.c sys/netncp ncp_conn.c sys/netsmb smb_conn.c sys/sys sysctl.h sys/vm vm_extern.h vm_glue.c vm_mmap.c Log: Split the mlock() kernel code into two parts, mlock(), which unpacks the syscall arguments and does the suser() permission check, and kern_mlock(), which does the resource limit checking and calls vm_map_wire(). Split munlock() in a similar way. Enable the RLIMIT_MEMLOCK checking code in kern_mlock(). Replace calls to vslock() and vsunlock() in the sysctl code with calls to kern_mlock() and kern_munlock() so that the sysctl code will obey the wired memory limits. Nuke the vslock() and vsunlock() implementations, which are no longer used. Add a member to struct sysctl_req to track the amount of memory that is wired to handle the request. Modify sysctl_wire_old_buffer() to return an error if its call to kern_mlock() fails. Only wire the minimum of the length specified in the sysctl request and the length specified in its argument list. It is recommended that sysctl handlers that use sysctl_wire_old_buffer() should specify reasonable estimates for the amount of data they want to return so that only the minimum amount of memory is wired no matter what length has been specified by the request. Modify the callers of sysctl_wire_old_buffer() to look for the error return. Modify sysctl_old_user to obey the wired buffer length and clean up its implementation. Reviewed by: bms Revision Changes Path 1.228 +3 -1 src/sys/kern/kern_descrip.c 1.215 +3 -1 src/sys/kern/kern_fork.c 1.109 +3 -1 src/sys/kern/kern_linker.c 1.199 +3 -1 src/sys/kern/kern_proc.c 1.150 +32 -19 src/sys/kern/kern_sysctl.c 1.483 +3 -1 src/sys/kern/vfs_subr.c 1.85 +4 -1 src/sys/netinet/ip_divert.c 1.183 +3 -1 src/sys/netinet/tcp_subr.c 1.148 +3 -1 src/sys/netinet/udp_usrreq.c 1.25 +3 -2 src/sys/netncp/ncp_conn.c 1.11 +3 -1 src/sys/netsmb/smb_conn.c 1.124 +2 -1 src/sys/sys/sysctl.h 1.69 +2 -2 src/sys/vm/vm_extern.h 1.190 +0 -29 src/sys/vm/vm_glue.c 1.179 +41 -24 src/sys/vm/vm_mmap.c _______________________________________________ cvs-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/cvs-all To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"