# SOME DESCRIPTIVE TITLE # Copyright (C) YEAR Free Software Foundation, Inc. # This file is distributed under the same license as the PACKAGE package. # FIRST AUTHOR , YEAR. # #, fuzzy msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "POT-Creation-Date: 2024-06-01 06:20+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" "Language: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #. type: TH #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "seccomp_unotify" msgstr "" #. type: TH #: archlinux debian-unstable opensuse-tumbleweed #, no-wrap msgid "2024-05-02" msgstr "" #. type: TH #: archlinux debian-unstable #, no-wrap msgid "Linux man-pages 6.8" msgstr "" #. type: SH #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "NAME" msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "seccomp_unotify - Seccomp user-space notification mechanism" msgstr "" #. type: SH #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "LIBRARY" msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "Standard C library (I, I<-lc>)" msgstr "" #. type: SH #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "SYNOPSIS" msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "" "B<#include Elinux/seccomp.hE>\n" "B<#include Elinux/filter.hE>\n" "B<#include Elinux/audit.hE>\n" msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "BIB<, unsigned int >IB<, void *>IB<);>\n" msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "B<#include Esys/ioctl.hE>\n" msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "" "BIB<, SECCOMP_IOCTL_NOTIF_RECV,>\n" "B< struct seccomp_notif *>IB<);>\n" "BIB<, SECCOMP_IOCTL_NOTIF_SEND,>\n" "B< struct seccomp_notif_resp *>IB<);>\n" "BIB<, SECCOMP_IOCTL_NOTIF_ID_VALID, __u64 *>IB<);>\n" "BIB<, SECCOMP_IOCTL_NOTIF_ADDFD,>\n" "B< struct seccomp_notif_addfd *>IB<);>\n" msgstr "" #. type: SH #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "DESCRIPTION" msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "This page describes the user-space notification mechanism provided by the " "Secure Computing (seccomp) facility. As well as the use of the " "B flag, the B " "action value, and the B operation described in " "B(2), this mechanism involves the use of a number of related " "B(2) operations (described below)." msgstr "" #. type: SS #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "Overview" msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "In conventional usage of a seccomp filter, the decision about how to treat a " "system call is made by the filter itself. By contrast, the user-space " "notification mechanism allows the seccomp filter to delegate the handling of " "the system call to another user-space process. Note that this mechanism is " "explicitly B intended as a method implementing security policy; see " "NOTES." msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "In the discussion that follows, the thread(s) on which the seccomp filter is " "installed is (are) referred to as the I, and the process that is " "notified by the user-space notification mechanism is referred to as the " "I." msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "A suitably privileged supervisor can use the user-space notification " "mechanism to perform actions on behalf of the target. The advantage of the " "user-space notification mechanism is that the supervisor will usually be " "able to retrieve information about the target and the performed system call " "that the seccomp filter itself cannot. (A seccomp filter is limited in the " "information it can obtain and the actions that it can perform because it is " "running on a virtual machine inside the kernel.)" msgstr "" #. ------------------------------------- #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "An overview of the steps performed by the target and the supervisor is as " "follows:" msgstr "" #. type: IP #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "(1)" msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "The target establishes a seccomp filter in the usual manner, but with two " "differences:" msgstr "" #. type: IP #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "\\[bu]" msgstr "" # # #. FIXME #. Is the last sentence above correct? #. Kees Cook (25 Oct 2020) notes: #. I like this limitation, but I expect that it'll need to change in the #. future. Even with LSMs, we see the need for arbitrary stacking, and the #. idea of there being only 1 supervisor will eventually break down. Right #. now there is only 1 because only container managers are using this #. feature. But if some daemon starts using it to isolate some thread, #. suddenly it might break if a container manager is trying to listen to it #. too, etc. I expect it won't be needed soon, but I do think it'll change. #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "The B(2) I argument includes the flag " "B. Consequently, the return value of the " "(successful) B(2) call is a new \"listening\" file descriptor " "that can be used to receive notifications. Only one \"listening\" seccomp " "filter can be installed for a thread." msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "In cases where it is appropriate, the seccomp filter returns the action " "value B. This return value will trigger a " "notification event." msgstr "" #. type: IP #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "(2)" msgstr "" #. Jann Horn: #. Instead of using unix domain sockets to send the fd to the #. parent, I think you could also use clone3() with #. flags==CLONE_FILES|SIGCHLD, dup2() the seccomp fd to an fd #. that was reserved in the parent, call unshare(CLONE_FILES) #. in the child after setting up the seccomp fd, and wake #. up the parent with something like pthread_cond_signal()? #. I'm not sure whether that'd look better or worse in the #. end though, so maybe just ignore this comment. #. ------------------------------------- #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "In order that the supervisor can obtain notifications using the listening " "file descriptor, (a duplicate of) that file descriptor must be passed from " "the target to the supervisor. One way in which this could be done is by " "passing the file descriptor over a UNIX domain socket connection between the " "target and the supervisor (using the B ancillary message type " "described in B(7)). Another way to do this is through the use of " "B(2)." msgstr "" #. type: IP #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "(3)" msgstr "" #. ------------------------------------- #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "The supervisor will receive notification events on the listening file " "descriptor. These events are returned as structures of type " "I. Because this structure and its size may evolve over " "kernel versions, the supervisor must first determine the size of this " "structure using the B(2) B operation, " "which returns a structure of type I. The supervisor " "allocates a buffer of size I bytes to " "receive notification events. In addition,the supervisor allocates another " "buffer of size I bytes for the " "response (a I structure) that it will provide to " "the kernel (and thus the target)." msgstr "" #. type: IP #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "(4)" msgstr "" #. ------------------------------------- #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "The target then performs its workload, which includes system calls that will " "be controlled by the seccomp filter. Whenever one of these system calls " "causes the filter to return the B action value, the " "kernel does I (yet) execute the system call; instead, execution of the " "target is temporarily blocked inside the kernel (in a sleep state that is " "interruptible by signals) and a notification event is generated on the " "listening file descriptor." msgstr "" #. type: IP #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "(5)" msgstr "" # # # #. FIXME #. Christian Brauner: #. Do we support O_NONBLOCK with SECCOMP_IOCTL_NOTIF_RECV and if #. not should we? #. Michael Kerrisk: #. A quick test suggests that O_NONBLOCK has no effect on the blocking #. behavior of SECCOMP_IOCTL_NOTIF_RECV. #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "The supervisor can now repeatedly monitor the listening file descriptor for " "B-triggered events. To do this, the supervisor uses " "the B B(2) operation to read information " "about a notification event; this operation blocks until an event is " "available. The operation returns a I structure containing " "information about the system call that is being attempted by the target. " "(As described in NOTES, the file descriptor can also be monitored with " "B(2). These interfaces indicate that the file " "descriptor is ready as follows:" msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "When a notification is pending, these interfaces indicate that the file " "descriptor is readable. Following such an indication, a subsequent " "B B(2) will not block, returning either " "information about a notification or else failing with the error B if " "the target has been killed by a signal or its system call has been " "interrupted by a signal handler." msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "After the notification has been received (i.e., by the " "B B(2) operation), these interfaces " "indicate that the file descriptor is writable, meaning that a notification " "response can be sent using the B B(2) " "operation." msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "After the last thread using the filter has terminated and been reaped using " "B(2) (or similar), the file descriptor indicates an end-of-file " "condition (readable in B