aboutsummaryrefslogtreecommitdiff
path: root/sys/kern/capabilities.conf
diff options
context:
space:
mode:
authorKonstantin Belousov <kib@FreeBSD.org>2020-12-23 14:14:04 +0000
committerKonstantin Belousov <kib@FreeBSD.org>2020-12-27 10:57:26 +0000
commit7a202823aa54ba18c485bdbcf355269bcfee1ab9 (patch)
treea6a53d2d79199defb8e4b96dae58c166f08788cf /sys/kern/capabilities.conf
parent7cb901bf227f1591f208a9df5ddc948c6124e0a8 (diff)
downloadsrc-7a202823aa54ba18c485bdbcf355269bcfee1ab9.tar.gz
src-7a202823aa54ba18c485bdbcf355269bcfee1ab9.zip
Expose eventfd in the native API/ABI using a new __specialfd syscall
eventfd is a Linux system call that produces special file descriptors for event notification. When porting Linux software, it is currently usually emulated by epoll-shim on top of kqueues. Unfortunately, kqueues are not passable between processes. And, as noted by the author of epoll-shim, even if they were, the library state would also have to be passed somehow. This came up when debugging strange HW video decode failures in Firefox. A native implementation would avoid these problems and help with porting Linux software. Since we now already have an eventfd implementation in the kernel (for the Linuxulator), it's pretty easy to expose it natively, which is what this patch does. Submitted by: greg@unrelenting.technology Reviewed by: markj (previous version) MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D26668
Diffstat (limited to 'sys/kern/capabilities.conf')
-rw-r--r--sys/kern/capabilities.conf5
1 files changed, 5 insertions, 0 deletions
diff --git a/sys/kern/capabilities.conf b/sys/kern/capabilities.conf
index 09d09515c816..3d552255d823 100644
--- a/sys/kern/capabilities.conf
+++ b/sys/kern/capabilities.conf
@@ -56,6 +56,11 @@ __mac_set_fd
__mac_set_proc
##
+## Allow creating special file descriptors like eventfd(2).
+##
+__specialfd
+
+##
## Allow sysctl(2) as we scope internal to the call; this is a global
## namespace, but there are several critical sysctls required for almost
## anything to run, such as hw.pagesize. For now that policy lives in the