From owner-svn-src-all@FreeBSD.ORG Tue Dec 25 13:43:02 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 2C808DB2; Tue, 25 Dec 2012 13:43:02 +0000 (UTC) (envelope-from zont@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 1041E8FC0A; Tue, 25 Dec 2012 13:43:02 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qBPDh15s065023; Tue, 25 Dec 2012 13:43:01 GMT (envelope-from zont@svn.freebsd.org) Received: (from zont@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qBPDh1aM065021; Tue, 25 Dec 2012 13:43:01 GMT (envelope-from zont@svn.freebsd.org) Message-Id: <201212251343.qBPDh1aM065021@svn.freebsd.org> From: Andrey Zonov Date: Tue, 25 Dec 2012 13:43:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r244679 - head/lib/libc/sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 25 Dec 2012 13:43:02 -0000 Author: zont Date: Tue Dec 25 13:43:01 2012 New Revision: 244679 URL: http://svnweb.freebsd.org/changeset/base/244679 Log: - Update manual pages accordingly to r244384 and r244385. Approved by: kib (mentor) MFC after: 1 week Modified: head/lib/libc/sys/mlock.2 head/lib/libc/sys/mlockall.2 Modified: head/lib/libc/sys/mlock.2 ============================================================================== --- head/lib/libc/sys/mlock.2 Tue Dec 25 13:01:58 2012 (r244678) +++ head/lib/libc/sys/mlock.2 Tue Dec 25 13:43:01 2012 (r244679) @@ -28,7 +28,7 @@ .\" @(#)mlock.2 8.2 (Berkeley) 12/11/93 .\" $FreeBSD$ .\" -.Dd July 27, 2010 +.Dd December 25, 2012 .Dt MLOCK 2 .Os .Sh NAME @@ -94,12 +94,15 @@ limited in how much they can lock down. A single process can .Fn mlock the minimum of -a system-wide ``wired pages'' limit and -the per-process +a system-wide ``wired pages'' limit +.Va vm.max_wired +and the per-process .Li RLIMIT_MEMLOCK resource limit. .Pp -These calls are only available to the super-user. +If +.Va security.bsd.unprivileged_mlock +is set to 0 these calls are only available to the super-user. .Sh RETURN VALUES .Rv -std .Pp @@ -112,7 +115,8 @@ system call will fail if: .Bl -tag -width Er .It Bq Er EPERM -The caller is not the super-user. +.Va security.bsd.unprivileged_mlock +is set to 0 and the caller is not the super-user. .It Bq Er EINVAL The address given is not page aligned or the length is negative. .It Bq Er EAGAIN @@ -129,7 +133,8 @@ system call will fail if: .Bl -tag -width Er .It Bq Er EPERM -The caller is not the super-user. +.Va security.bsd.unprivileged_mlock +is set to 0 and the caller is not the super-user. .It Bq Er EINVAL The address given is not page aligned or the length is negative. .It Bq Er ENOMEM Modified: head/lib/libc/sys/mlockall.2 ============================================================================== --- head/lib/libc/sys/mlockall.2 Tue Dec 25 13:01:58 2012 (r244678) +++ head/lib/libc/sys/mlockall.2 Tue Dec 25 13:43:01 2012 (r244679) @@ -30,7 +30,7 @@ .\" .\" $FreeBSD$ .\" -.Dd July 27, 2010 +.Dd December 25, 2012 .Dt MLOCKALL 2 .Os .Sh NAME @@ -68,11 +68,22 @@ Since physical memory is a potentially s limited in how much they can lock down. A single process can lock the minimum of a system-wide .Dq wired pages -limit and the per-process +limit +.Va vm.max_wired +and the per-process .Dv RLIMIT_MEMLOCK resource limit. .Pp -These calls are only available to the super-user. +If +.Va security.bsd.unprivileged_mlock +is set to 0 these calls are only available to the super-user. +If +.Va vm.old_mlock +is set to 1 the per-process +.Dv RLIMIT_MEMLOCK +resource limit will not be applied for +.Fn mlockall +calls. .Pp The .Fn munlockall