From nobody Wed Nov 04 16:23:25 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4jKW2k2W10z6y9Nd for ; Wed, 04 Nov 2026 16:23:26 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 4jKW2j4cHlz4kPx for ; Wed, 04 Nov 2026 16:23:25 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1793809405; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=iHHusA6qlNQjRNSmUCsebw8OrYvu5dimpwD88Le3xLU=; b=HsYxB4XDDvg+tuwppICdzy0/JL38hns+ZI8bpNNTDWwoXqZgdiGttfqAdDtHJnMSKfjuwC vlAhJmQ+7Wt/aGJx8vEE/2KIfY1gkMI6A8zKtyxGR6Em97OvXxMMfi9yYpWqHDd05xmLDJ 5jdIfDNRHZ19RzqjdAY+BRuQAHx1rOlCNC/YuFLIfbC9QVgbazNoGFWvwFjQu+jx+Ydy4m OBspqKc+dkCzmeBT80tEhTfmKr2qYTDti7a6yUyecXggkxAHTcAqqacMQn50hpxQ889JVj haqJZpGAzlFMSoYd/hQntyIV5hdhQQXtVy5RcBKUxuR5WAoGT31tDR3e5JmfPg== ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1793809405; b=ps+AdwnYhcvBcQGnxiSbbm2GjW3FeiXQwoUzJ5ndVHFcwBMPh9gUMDLFcny1isikfFmpKk dOMcnIv8OezLtiuF++jxgM1Xj7P2SZvivCsMnAw6BDcXkppPPbDGHmZMsWIdBphxQHWHJg G3Q9b3XZ5Yq8LwmqG5kTfxLooZjPUS6ooiOSNQf1+YrRWsMu5oJDvjxNirYAIXXiHp6aD6 3UJuVFm6uHyfW5r4/bom8mOIuqIqG91wY0Wz7FJDqx1LXilmsJlu9KsoSJJDKc0jax3lJO wsII0UtC8rFjmRntcWSzSexSHpYvrDT973B01GPKsFSQ6YboxLRzeludeoRzbw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1793809405; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=iHHusA6qlNQjRNSmUCsebw8OrYvu5dimpwD88Le3xLU=; b=wJxBC5/asJfVbdm/pmyvP7iS02giS3V/l+DkvnUEuxzuGgFR7/ewzkhIxlzT8/lzTX6Cg7 /pihEtIWYACRZ9Emgd/MDl4EnhUekp9vU9U3nDIodoiOtRK6H2+2ZOuwAXzEOMSOgaNJJ2 K3dFKcSIkEE/qJ2bqBSh1Pg1o5JuqP5ubvl2rebeMoPKiviNRtl7ptcciNMPYerC/+PzM3 eKwnSmkC9/A6S3T96nTq4SXOBERdZsDPA10vg4IZn62rxdixJps+zQYBAQ21hyeyOezAeG 6q4927o2QHIbt8/NWE/k9JTZqeU8gs0gPxINPEaaGKfc74xzpjqwuPsV9U3PRw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4jKW2j4HWqz19YK for ; Wed, 04 Nov 2026 16:23:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 20225 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 04 Nov 2026 16:23:25 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Konstantin Belousov Subject: git: 82bbfe16ae1e - main - cap_enter.2: document new behavior, in particular EBUSY List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: Commit messages for all branches of the src repository List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 82bbfe16ae1eaa9eca970cb50abe8ac9162fe9cb Auto-Submitted: auto-generated Date: Wed, 04 Nov 2026 16:23:25 +0000 Message-Id: <6aeb5bfd.20225.711f3e2e@gitrepo.freebsd.org> The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=82bbfe16ae1eaa9eca970cb50abe8ac9162fe9cb commit 82bbfe16ae1eaa9eca970cb50abe8ac9162fe9cb Author: Konstantin Belousov AuthorDate: 2026-10-21 23:18:36 +0000 Commit: Konstantin Belousov CommitDate: 2026-11-04 16:23:11 +0000 cap_enter.2: document new behavior, in particular EBUSY Reviewed by: markj Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D60963 --- lib/libsys/cap_enter.2 | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/lib/libsys/cap_enter.2 b/lib/libsys/cap_enter.2 index 90c089ae9b07..d1248d4d8b8f 100644 --- a/lib/libsys/cap_enter.2 +++ b/lib/libsys/cap_enter.2 @@ -64,6 +64,10 @@ When combined with may be used to create kernel-enforced sandboxes in which appropriately-crafted applications or application components may be run. .Pp +Other threads are stopped while the call runs, so some of their +interrupted system calls may return +.Er EINTR . +.Pp .Fn cap_getmode returns a flag indicating whether or not the process is in a capability mode sandbox. @@ -116,6 +120,18 @@ The running kernel was compiled without .El .Pp The +.Fn cap_enter +system call may also return the following error: +.Bl -tag -width Er +.It Bq Er EBUSY +The file descriptor table or the current/root directory state of the +process is shared with another process, see +.Xr rfork 2 . +Sharing would allow the other process to grant additional privileges +to the process after it entered capability mode, without its consent. +.El +.Pp +The .Fn cap_getmode system call may also return the following error: .Bl -tag -width Er