Date: Mon, 7 May 2018 23:10:13 +0000 (UTC) From: Mateusz Guzik <mjg@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r333342 - in head/sys: kern sys Message-ID: <201805072310.w47NAD0E087242@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
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 <vm/uma.h> #include <vm/vm.h> -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 */
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201805072310.w47NAD0E087242>