Change trap_enotcap to bool and annotate with __read_frequently
It is read on each return to user space.
This commit is contained in:
parent
79ca7cbf09
commit
75e9b455a9
@ -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
|
||||
|
@ -370,7 +370,7 @@ int cap_ioctl_check(struct filedesc *fdp, int fd, u_long cmd);
|
||||
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 */
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user