From nobody Wed Nov 11 01:07:04 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 4jPQN82kmZz6y1tB for ; Wed, 11 Nov 2026 01:07:04 +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 4jPQN81Ctpz4njQ for ; Wed, 11 Nov 2026 01:07:04 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1794359224; 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=nRj8ZbIHCRa1F/pBrn3y+zn6NXhFFEx1YxyQRpRvM2c=; b=UV1sNxDl9UhVT5yvV7SP5aO8Q481QbU7fmW53e1ZpDcO1SlBaVfFHQzvW1p90S081T2nyv 3BFxTqcbIxmmLq/L6uC5Bn4F8G8bh4DTuWP0U4HxAwj/cL9XUIvG7TCjwCDc1f+j5C2y2k Qs28T/+hH7h98BNe7KNHZOsuA2FKNaGwkzeHOQdBs9HJp+qwYSEEWO/e/PmRTH1uj7Y6Of FlJ1kQB0tPeQLTJJs9Q3s/e8dfZo1djNQEXSECiyaABZBehIq58zUVAq5WqCCHJn9CvR2k Zaa45iXA+1Knmdb7Drvqr/9fGqlHpuQcr/Q6xwiAdm9SU0mQgPLnprWeeiAlew== ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1794359224; b=ACNQV7EmzsyybfcJkZWeesEnhlYDp0e1XCQ+ZLSRA0E9K3MQ9iFQN+YI0qgcj6TZliEb0F Az+wfpCYkjAmnklo+P/SK8KdKi2FHwj9WtVEwFT5R4sVESs6eniasBxLlMwhmilvBY5y4Q FDq2o1ut+rbfM1+SeURFT+PkGHgF9ne2RLJX+fUNSM1xfUA5Oc3i8KQJfi8FFkn7cOQXmz aS1tEcTkW6+qNAXB7N90Pm6sOL3pWF17pijhl2mPl4VuqkTr2qPVJG9tudpPabj8RDjkfj +BsedKt/muc8lip9rcO2cB6RL6357+QWtKU4JRo23hDYFpaJ6r2+lXhJd2NY5w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1794359224; 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=nRj8ZbIHCRa1F/pBrn3y+zn6NXhFFEx1YxyQRpRvM2c=; b=XpFCPyBwi2WZqIK0umoR0MARP5dXTpTRDZHsh1BQ8XCEIDImvZW80fe8bN/yF3t3DtmOgu cWZ38kU+Jgl0cAVFza2yXPUCTzxvfb4zL3tNuDVH60XwTg2hSdhxvmm2K8FZQsl5ocfNjG bH2x/Qpd+pquVCgbgDJ03Rn0X2Kmmpgqagi5RqcbWKwhzhO/a9gowyIgXyAuIVTGmtgE/e uiYVeeAFeaj7i0baQUMFR3RdS8EnSqDyMkThBUvw5bIjrMI6nZfXIDqENJB4bFsI/CC0E/ QNxvyFWqkHVXI5D/JkChLqEJh1u45h+tarbt6NNdHxv5V86IdsmTpV6DNxWFhQ== 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 4jPQN80qL5zspD for ; Wed, 11 Nov 2026 01:07:04 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 228f7 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 11 Nov 2026 01:07:04 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: 40d0ff39eb56 - stable/15 - 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 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/stable/15 X-Git-Reftype: branch X-Git-Commit: 40d0ff39eb563b81dadecaa864fbfb4b51b12085 Auto-Submitted: auto-generated Date: Wed, 11 Nov 2026 01:07:04 +0000 Message-Id: <6af3bfb8.228f7.21d43c82@gitrepo.freebsd.org> The branch stable/15 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=40d0ff39eb563b81dadecaa864fbfb4b51b12085 commit 40d0ff39eb563b81dadecaa864fbfb4b51b12085 Author: Konstantin Belousov AuthorDate: 2026-10-21 23:18:36 +0000 Commit: Konstantin Belousov CommitDate: 2026-11-10 19:53:57 +0000 cap_enter.2: document new behavior, in particular EBUSY (cherry picked from commit 82bbfe16ae1eaa9eca970cb50abe8ac9162fe9cb) --- 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