From nobody Thu Jul 21 23:57:53 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 4LpqJL21YYz4Wcvd; Thu, 21 Jul 2022 23:57:54 +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 4LpqJL1JhQz47Fl; Thu, 21 Jul 2022 23:57:54 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1658447874; 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=K4Kn2huBnyvyBxS1sTGHIi4/s0fsEoNGM9/16lo0t9Y=; b=xj+bv8znZuM8A66UMbmsVEEB8GIW6nHG27AD677dS8uv+/5WfXu6BKXchb32/gOQK13JhL F6qqYTHgX0h5+t1KYHIVpMsm1n5w+4x2dEJCSI5wUCPa5IsFdntQ5mH55EMUvKZMQfGAB0 QTMI17OdgvcOkbmS0qoMvHd+Ge3rI/UN14pmMVmL8Zo6Apq7k8sO0EdAq8WaM40e2mqL/9 Z51NDvQitzKYF8Zmonqi+iwDxZcAhgyFm12I3BPckzM5OtdkNhwIWmrlhLH5z53Fi0jm7U ChTAtS4VP6KQz8/Zwuzv1O3owryvMUVgOWHeN2yRsPN+m/2ienpGtmeeAV9OrQ== 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 4LpqJL0NmYzgkZ; Thu, 21 Jul 2022 23:57:54 +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 26LNvrL6035426; Thu, 21 Jul 2022 23:57:53 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 26LNvrCT035425; Thu, 21 Jul 2022 23:57:53 GMT (envelope-from git) Date: Thu, 21 Jul 2022 23:57:53 GMT Message-Id: <202207212357.26LNvrCT035425@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: f91f4cc4f374 - stable/12 - 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/12 X-Git-Reftype: branch X-Git-Commit: f91f4cc4f374c46d57ccf47d3e916d4818ad96fb Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1658447874; 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=K4Kn2huBnyvyBxS1sTGHIi4/s0fsEoNGM9/16lo0t9Y=; b=ccXYWVVVeK9ZVyevyodzHnSJza0pOwX8mHHYJGy4EZtimf7RV6pSJoU0z5N/5Q4Bj28ien aINCZNXyNCZ1okUCjAFTiEOZJqvxWruROgpBCEqDyd5acuGT7GrLgyot9DBBGYvynY9cpO HM2GyjQ3psdEroqFirfsCAgIppfjbmaZwcL6KufCnmSFuM+dIvPHD5DjpA5W+2He9VxlXE 3bx69IkTH3LuCGnv7UMjBVFdod6XLZs4hwE9NygZjSk6IWVcvWPLay+K4GaxtGY8ranxQi Ns19JSFladMeWc96EzMNctq6fTKz0t3gxJlmLZt/frl92USd8iqGziiAQy2ogA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1658447874; a=rsa-sha256; cv=none; b=DpKtgQMy8tf9v7GxJPCfT5dyble7pHy+7134WolgNXZZTQhpq8pZhEkEuPN4yf/SUSPFOp hKKw7OSnBwf0w4xkk2PfYKgAwYKKV2UuMvfsAz0bkRVv0vxYAq532ry9qtdcZs1Z5qewIe 1iiEbZnGcU4LibMFOI2dzh5uSh2OSIKVx0mzTOuMOYhKvJnoyU50y/qGCPb3wthA5jdiEF TZlffyLwp9ipySmAzOa5mezbaByzmQ2qfqSuHmhJzcSQ1I+A3BgDLsKX+5XUhICX0E05+m /kVeiz9YP3PTor2Ep2JHVMG+YrbzrC0kVN3Mh437BcWaWlLws9WFDsY4iUv6LQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/12 has been updated by 0mp (doc, ports committer): URL: https://cgit.FreeBSD.org/src/commit/?id=f91f4cc4f374c46d57ccf47d3e916d4818ad96fb commit f91f4cc4f374c46d57ccf47d3e916d4818ad96fb 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:59 +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 ,