From owner-svn-src-stable@freebsd.org Tue Jul 18 18:15:30 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 33D61D9C24C; Tue, 18 Jul 2017 18:15:30 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 030FC7D2B8; Tue, 18 Jul 2017 18:15:29 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v6IIFTP2077724; Tue, 18 Jul 2017 18:15:29 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v6IIFSoX077718; Tue, 18 Jul 2017 18:15:28 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201707181815.v6IIFSoX077718@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Tue, 18 Jul 2017 18:15:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r321145 - stable/11/lib/libc/sys X-SVN-Group: stable-11 X-SVN-Commit-Author: ngie X-SVN-Commit-Paths: stable/11/lib/libc/sys X-SVN-Commit-Revision: 321145 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 Jul 2017 18:15:30 -0000 Author: ngie Date: Tue Jul 18 18:15:28 2017 New Revision: 321145 URL: https://svnweb.freebsd.org/changeset/base/321145 Log: MFC r318715,r318717,r318718,r318719,r318720,r318721: r318715: _umtx_op(2): fix minor manlint issues - Sort .Xr entries in SEE ALSO section. - Sort SEE ALSO and STANDARDS sections properly, in terms of the entire document. r318717: cap_enter(2): fix manlint issues - Sort SEE ALSO section appropriately. - Correct section for sysctl(9). r318718: rctl_add_rule(2): fix manlint warnings - Fix commas (either missing or misused) after .Nm entries in SYNOPSIS r318719: open(2): fix manlint warnings - Sort SEE ALSO .Xr entries. - Sort sections (HISTORY comes after STANDARDS). r318720: ptrace(2): clean up trailing whitespace r318721: kill(2): add missing section for sysctl(9) Modified: stable/11/lib/libc/sys/_umtx_op.2 stable/11/lib/libc/sys/cap_enter.2 stable/11/lib/libc/sys/kill.2 stable/11/lib/libc/sys/open.2 stable/11/lib/libc/sys/ptrace.2 stable/11/lib/libc/sys/rctl_add_rule.2 Directory Properties: stable/11/ (props changed) Modified: stable/11/lib/libc/sys/_umtx_op.2 ============================================================================== --- stable/11/lib/libc/sys/_umtx_op.2 Tue Jul 18 18:09:26 2017 (r321144) +++ stable/11/lib/libc/sys/_umtx_op.2 Tue Jul 18 18:15:28 2017 (r321145) @@ -28,7 +28,7 @@ .\" .\" $FreeBSD$ .\" -.Dd May 29, 2016 +.Dd May 23, 2017 .Dt _UMTX_OP 2 .Os .Sh NAME @@ -1382,32 +1382,11 @@ Mutex lock requests without timeout specified are rest The error is not returned to userspace code since restart is handled by usual adjustment of the instruction counter. .El -.Sh BUGS -A window between a unlocking robust mutex and resetting the pointer in the -.Dv robust_inact_offset -member of the registered -.Vt struct umtx_robust_lists_params -allows another thread to destroy the mutex, thus making the kernel inspect -freed or reused memory. -The -.Li libthr -implementation is only vulnerable to this race when operating on -a shared mutex. -A possible fix for the current implementation is to strengthen the checks -for shared mutexes before terminating them, in particular, verifying -that the mutex memory is mapped from a shared memory object allocated -by the -.Dv UMTX_OP_SHM -request. -This is not done because it is believed that the race is adequately -covered by other consistency checks, while adding the check would -prevent alternative implementations of -.Li libpthread . .Sh SEE ALSO .Xr clock_gettime 2 , .Xr mmap 2 , -.Xr shm_open 2 , .Xr setrlimit 2 , +.Xr shm_open 2 , .Xr sigaction 2 , .Xr thr_exit 2 , .Xr thr_kill 2 , @@ -1425,3 +1404,24 @@ to implement .St -p1003.1-2001 .Xr pthread 3 functionality. +.Sh BUGS +A window between a unlocking robust mutex and resetting the pointer in the +.Dv robust_inact_offset +member of the registered +.Vt struct umtx_robust_lists_params +allows another thread to destroy the mutex, thus making the kernel inspect +freed or reused memory. +The +.Li libthr +implementation is only vulnerable to this race when operating on +a shared mutex. +A possible fix for the current implementation is to strengthen the checks +for shared mutexes before terminating them, in particular, verifying +that the mutex memory is mapped from a shared memory object allocated +by the +.Dv UMTX_OP_SHM +request. +This is not done because it is believed that the race is adequately +covered by other consistency checks, while adding the check would +prevent alternative implementations of +.Li libpthread . Modified: stable/11/lib/libc/sys/cap_enter.2 ============================================================================== --- stable/11/lib/libc/sys/cap_enter.2 Tue Jul 18 18:09:26 2017 (r321144) +++ stable/11/lib/libc/sys/cap_enter.2 Tue Jul 18 18:15:28 2017 (r321145) @@ -28,7 +28,7 @@ .\" .\" $FreeBSD$ .\" -.Dd September 27, 2016 +.Dd May 23, 2017 .Dt CAP_ENTER 2 .Os .Sh NAME @@ -139,11 +139,11 @@ points outside the process's allocated address space. .Xr cap_fcntls_limit 2 , .Xr cap_ioctls_limit 2 , .Xr cap_rights_limit 2 , -.Xr procctl 2 , -.Xr sysctl 2 , .Xr fexecve 2 , +.Xr procctl 2 , .Xr cap_sandboxed 3 , -.Xr capsicum 4 +.Xr capsicum 4 , +.Xr sysctl 9 .Sh HISTORY Support for capabilities and capabilities mode was developed as part of the .Tn TrustedBSD Modified: stable/11/lib/libc/sys/kill.2 ============================================================================== --- stable/11/lib/libc/sys/kill.2 Tue Jul 18 18:09:26 2017 (r321144) +++ stable/11/lib/libc/sys/kill.2 Tue Jul 18 18:15:28 2017 (r321145) @@ -71,7 +71,7 @@ A single exception is the signal SIGCONT, which may al to any process with the same session ID as the sender. In addition, if the .Va security.bsd.conservative_signals -.Xr sysctl +.Xr sysctl 9 is set to 1, the user is not a super-user, and the receiver is set-uid, then only job control and terminal control signals may Modified: stable/11/lib/libc/sys/open.2 ============================================================================== --- stable/11/lib/libc/sys/open.2 Tue Jul 18 18:09:26 2017 (r321144) +++ stable/11/lib/libc/sys/open.2 Tue Jul 18 18:15:28 2017 (r321145) @@ -471,16 +471,8 @@ is specified and the file is not a directory. .Xr read 2 , .Xr umask 2 , .Xr write 2 , -.Xr fopen 3 -.Sh HISTORY -The -.Fn open -function appeared in -.At v6 . -The -.Fn openat -function was introduced in -.Fx 8.0 . +.Xr fopen 3 , +.Xr capsicum 4 .Sh STANDARDS These functions are specified by .St -p1003.1-2008 . @@ -497,6 +489,15 @@ when is set in flags and the final component of pathname is a symbolic link to distinguish it from the case of too many symbolic link traversals in one of its non-final components. +.Sh HISTORY +The +.Fn open +function appeared in +.At v6 . +The +.Fn openat +function was introduced in +.Fx 8.0 . .Sh BUGS The Open Group Extended API Set 2 specification requires that the test for whether Modified: stable/11/lib/libc/sys/ptrace.2 ============================================================================== --- stable/11/lib/libc/sys/ptrace.2 Tue Jul 18 18:09:26 2017 (r321144) +++ stable/11/lib/libc/sys/ptrace.2 Tue Jul 18 18:15:28 2017 (r321145) @@ -166,7 +166,7 @@ new child processes will execute without tracing enabl This event flag controls tracing of LWP .Pq kernel thread creation and destruction. -When this event is enabled, +When this event is enabled, new LWPs will stop and report an event with .Dv PL_FLAG_BORN set before executing their first instruction, @@ -215,7 +215,7 @@ or includes only .Dv PTRACE_EXEC events. -All other event flags are disabled. +All other event flags are disabled. .Pp The .Fa request Modified: stable/11/lib/libc/sys/rctl_add_rule.2 ============================================================================== --- stable/11/lib/libc/sys/rctl_add_rule.2 Tue Jul 18 18:09:26 2017 (r321144) +++ stable/11/lib/libc/sys/rctl_add_rule.2 Tue Jul 18 18:15:28 2017 (r321145) @@ -28,10 +28,10 @@ .Dt RCTL_ADD_RULE 2 .Os .Sh NAME -.Nm rctl_add_rule, -.Nm rctl_get_limits -.Nm rctl_get_racct, -.Nm rctl_get_rules, +.Nm rctl_add_rule , +.Nm rctl_get_limits , +.Nm rctl_get_racct , +.Nm rctl_get_rules , .Nm rctl_remove_rule .Nd manipulate and query the resource limits database .Sh LIBRARY