From nobody Thu Jul 21 23:57:50 2022 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 4LpqJG3Chhz4Wdm2; Thu, 21 Jul 2022 23:57:50 +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 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4LpqJG1qLqz46nr; Thu, 21 Jul 2022 23:57:50 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1658447870; 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=56PfOASxsWWUU5MD9lq/ITnyN253lpCq097Eg8yBfbI=; b=HYDwChl5xohgCEIkfpWF0e1vTVA8VgUnXgCb0KhVto6l58pc8EsQ8oz1a0MkFRKwkGMFk6 UCryYci3HKToXCCvvtz6f3Fhi+TmzXOBbe2kVS/k30MRTMNwWrEzSWVLmYf9pNtSuriMH/ PEflLrrGd+2fvhGjUIODntIh783kVn7SzTQ1HExCeYoW8Oytq7f/jdGueXgFFoZZfZzUq3 8eH3KfFiqBuHQKMgvVj6RUXDPqfawz6wsfJgYKyEJtePLUbzOwVzTw14SP1mZ1lm+yMocn 3zsvYJ/M7/FskHVaCRwiDHWdyFDWJw9ARTBE5hI0Ctj+Ycy4pRr9HPtOcAMlYg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4LpqJG0wthzgxw; Thu, 21 Jul 2022 23:57:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 26LNvoi4035275; Thu, 21 Jul 2022 23:57:50 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 26LNvoJR035274; Thu, 21 Jul 2022 23:57:50 GMT (envelope-from git) Date: Thu, 21 Jul 2022 23:57:50 GMT Message-Id: <202207212357.26LNvoJR035274@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mateusz Piotrowski <0mp@FreeBSD.org> Subject: git: 83b8f6f7f0a0 - stable/13 - protect.1: Document that protect(1) does not work in jails List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: 0mp X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 83b8f6f7f0a0a5e963683756976e4dded07e192a Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1658447870; 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=56PfOASxsWWUU5MD9lq/ITnyN253lpCq097Eg8yBfbI=; b=i3mpfuvwNMlZ+251XyucXaJCo5ChF7/1GmCCpA1t67FJ0bE4jnFcY/cKYbVWiRIzrsgyjf lM9YSPCcRvLirfV//4vSznYZfS06m5g0C8De8imeDi7Z9u/ev4cSOhEPFl8kFiF9Rx9IWx xj66684//WBoceatqFbz7robeYyjjUR5PP3BAfiS1oNu/bqbpN1TBOwGyvgrcVbbXkdZ+k mYzEWGQy95pRe1TlALC2R3NdzdpDWiD46a2zAez+Dw+Rsw4R52QduA02F8XM+1r+vB2+we WRmXIN5nGFcHiLxXCeyOZ3F8G8Qx0+NnoxTwLD0amoNveezQg+flyQc6NmXDOg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1658447870; a=rsa-sha256; cv=none; b=DLGBIvcOtLzFKDYqiFntjwN/+vR1ypZFp+OcD0l4auQ7sq0ObmqRuRqdnrG/QwgToxcNAh u+C8Bow1OdHABHuVKssQwjVSPmV1zQ/qcl0ohn55xw7VfYrWlNiSht54XgMPRKvmVxU9TL fkAoMpKoXsWIYigkHTA3Rwll5DQpu4xl9QHJJ4r2FyqIgKnTHwlDsSAkH7J3oe/VhKDvc3 yP+NA+YSk8PQm7fe7GGpY+LZcEWgSyLt92cZO8sH4dMoxQrbuUqyVVcGe84G+B+CuLL6LH gv5tnBtLbkkQgwZUn5FmsNJOUYhHZblRTYlkA9jsS/9MCjtdg1ExCA8mPOmbfg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by 0mp (doc, ports committer): URL: https://cgit.FreeBSD.org/src/commit/?id=83b8f6f7f0a0a5e963683756976e4dded07e192a commit 83b8f6f7f0a0a5e963683756976e4dded07e192a Author: Mateusz Piotrowski <0mp@FreeBSD.org> AuthorDate: 2022-07-11 22:43:27 +0000 Commit: Mateusz Piotrowski <0mp@FreeBSD.org> CommitDate: 2022-07-21 23:56:29 +0000 protect.1: Document that protect(1) does not work in jails The reason is that in order to protect a process procctl(2) needs the PRIV_VM_MADV_PROTECT privilege, which is currently denied in jails (see kern_jail.c). MFC after: 1 week (cherry picked from commit 6452fb1e87ed9d00b52fa1e63e7c3a7516c9586c) --- usr.bin/protect/protect.1 | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/usr.bin/protect/protect.1 b/usr.bin/protect/protect.1 index 87a8169b1885..f67a8d9b59ea 100644 --- a/usr.bin/protect/protect.1 +++ b/usr.bin/protect/protect.1 @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd July 7, 2022 +.Dd July 12, 2022 .Dt PROTECT 1 .Os .Sh NAME @@ -112,6 +112,24 @@ bit is set to 1. All children of this process will also be protected if .Nm PI bit is set to 1. +.Sh DIAGNOSTICS +.Bl -diag +.It "protect: procctl: Operation not permitted" +The +.Nm +command does not have the required permissions to protect selected processes. +There are many reasons why this could be the case, e.g.: +.Bl -dash +.It +.Nm +is not executed by root. +.It +.Nm +is executed inside a +.Xr jail 8 , +which is not supported at the moment. +.El +.El .Sh SEE ALSO .Xr ps 1 , .Xr procctl 2 ,