From owner-svn-src-head@freebsd.org Mon May 7 23:10:13 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C7164FC0BAB; Mon, 7 May 2018 23:10:13 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 6A1996DBF3; Mon, 7 May 2018 23:10:13 +0000 (UTC) (envelope-from mjg@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 6506721D80; Mon, 7 May 2018 23:10:13 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w47NADfA087244; Mon, 7 May 2018 23:10:13 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w47NAD0E087242; Mon, 7 May 2018 23:10:13 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <201805072310.w47NAD0E087242@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Mon, 7 May 2018 23:10:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r333342 - in head/sys: kern sys X-SVN-Group: head X-SVN-Commit-Author: mjg X-SVN-Commit-Paths: in head/sys: kern sys X-SVN-Commit-Revision: 333342 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 07 May 2018 23:10:14 -0000 Author: mjg Date: Mon May 7 23:10:12 2018 New Revision: 333342 URL: https://svnweb.freebsd.org/changeset/base/333342 Log: Change trap_enotcap to bool and annotate with __read_frequently It is read on each return to user space. Modified: head/sys/kern/sys_capability.c head/sys/sys/capsicum.h Modified: head/sys/kern/sys_capability.c ============================================================================== --- head/sys/kern/sys_capability.c Mon May 7 23:10:02 2018 (r333341) +++ head/sys/kern/sys_capability.c Mon May 7 23:10:12 2018 (r333342) @@ -85,8 +85,8 @@ __FBSDID("$FreeBSD$"); #include #include -int trap_enotcap; -SYSCTL_INT(_kern, OID_AUTO, trap_enotcap, CTLFLAG_RW, &trap_enotcap, 0, +bool __read_frequently trap_enotcap; +SYSCTL_BOOL(_kern, OID_AUTO, trap_enotcap, CTLFLAG_RW, &trap_enotcap, 0, "Deliver SIGTRAP on ENOTCAPABLE"); #ifdef CAPABILITY_MODE Modified: head/sys/sys/capsicum.h ============================================================================== --- head/sys/sys/capsicum.h Mon May 7 23:10:02 2018 (r333341) +++ head/sys/sys/capsicum.h Mon May 7 23:10:12 2018 (r333342) @@ -370,7 +370,7 @@ int cap_ioctl_check(struct filedesc *fdp, int fd, u_lo int cap_fcntl_check_fde(struct filedescent *fde, int cmd); int cap_fcntl_check(struct filedesc *fdp, int fd, int cmd); -extern int trap_enotcap; +extern bool trap_enotcap; #else /* !_KERNEL */