From nobody Mon Jul 11 22:49:02 2022 X-Original-To: dev-commits-src-main@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 49CFB1D0D83B; Mon, 11 Jul 2022 22:49:03 +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 4LhfFW1kDqz3CZ3; Mon, 11 Jul 2022 22:49:03 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1657579743; 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=ynYjEQ/KoLraFklZgBm4Pl5nmiuv3ieaPFs/tHSNNKs=; b=hZ3MH/SbVD6ICTfmW5k27ilQPbEP1pI63ZoD11yGz44XmfcZHiZcfiyHMklWOe4ZrqvGZY XkmQr49BwpKRdRMhS3X6ZZEieiDZeLOH7rRrDFrWBkHXA9yNyj3+fuD2JRuL2M4jIprEXr qNhdQ42ZI+RSl0+CJR4ZhexGlzp5PkxObeWaFvlIIfZxfW0w548g5G8Fgf3mHM/Yx8KLHd 8iTB4aZcNPAmFB/kkr1N2ojj08lkPyLskxAegbIdYTtyPvoVKch7lJHg1CStv8x15/JHga SlQHaxaYPRFiyMQMmeFPrfgA5KJtBk2b0Gx9e7UD98JRz1fpYkOx0yZzCZJgYw== 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 4LhfFW0g1KzLVH; Mon, 11 Jul 2022 22:49:03 +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 26BMn3NC035014; Mon, 11 Jul 2022 22:49:03 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 26BMn2M4035013; Mon, 11 Jul 2022 22:49:02 GMT (envelope-from git) Date: Mon, 11 Jul 2022 22:49:02 GMT Message-Id: <202207112249.26BMn2M4035013@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mateusz Piotrowski <0mp@FreeBSD.org> Subject: git: 6452fb1e87ed - main - protect.1: Document that protect(1) does not work in jails List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@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/main X-Git-Reftype: branch X-Git-Commit: 6452fb1e87ed9d00b52fa1e63e7c3a7516c9586c Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1657579743; 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=ynYjEQ/KoLraFklZgBm4Pl5nmiuv3ieaPFs/tHSNNKs=; b=S57cZtxO8WQNXC3iMaTATS8ptNq5L+UQ/5VDCjJ+T9xF37GWv4L0D/nafZwtgneO/a41u5 pGtmbAdxRvshZRx4YQIIBSU7jMWVU14YYNiuQWvHDFNA6jMmC91c90UorzSH+qcImiCm5i s8bC+9bVX+tOo0kuAbtOJ6ws3gV6M2AvPYcVXLaiqvzWXo8RRTdy/BWRHouP3kqVu0/2jI z+ogXDlAol/aB6rjV7yu0W8zjdIyvEOB5AsF8BL7c5iEyXC+TC8prmvqgQbfsNSkWJ1SLu xQInWDPgbms9UzGxQqoMz0ell/+PWvxeUF6o8mbA2LeV8Gd8CXKiH485qFE14Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1657579743; a=rsa-sha256; cv=none; b=qqZpn4IEHq2vQfb7WZmTERukKf3fULIH82M3d3G8zJEbjqjJPbdYnQqAacrxqn4IVVP6f7 ViyBCvicgUuguZWegOypihTQntljvVHNdEr+1f/60nteU1luDbI6TfsBY2yXtc70ufkBQe 9zKcO+re8NCc0EIRB7emycR5/Ed7nPiUyXMsExbSas7fthFj+1vpCIh9ZKE7SyCJCWjgp+ uPKYXnK/zwEmQeIcQvt7BEGDPnsFV0pPTiNlwch0RthrsVG2COty2b3V9yWhiZclkWeZfA c2qoyKOgEZ8pTOE2oam6wEgD68EeLaDxTFOQo8WzGis11yxlCBQyh2mPy54Jbg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by 0mp (doc, ports committer): URL: https://cgit.FreeBSD.org/src/commit/?id=6452fb1e87ed9d00b52fa1e63e7c3a7516c9586c commit 6452fb1e87ed9d00b52fa1e63e7c3a7516c9586c Author: Mateusz Piotrowski <0mp@FreeBSD.org> AuthorDate: 2022-07-11 22:43:27 +0000 Commit: Mateusz Piotrowski <0mp@FreeBSD.org> CommitDate: 2022-07-11 22:47:58 +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 --- 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 ,