From nobody Wed Apr 24 00:29:03 2024 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 4VPKbz2ntYz5JNgs; Wed, 24 Apr 2024 00:29: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 4VPKbz2Hjsz41Yp; Wed, 24 Apr 2024 00:29:03 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1713918543; 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=HljoOh7u6Xd9zN/oRaDrL9yD8j2ofGXUuGm2CAYtqvw=; b=Clgnqj9rtjo72zamXJBLTLt9v5ewtmdNtNGY216mImGCQnMM8Nc1YsNTcFhQ7y6NtQhXvk cGAro9ztFjH7bTPo8Wr4p/196GbjEvKnfVy0b7KP2CW8xVwsAG5HxW8xsYkdtdFy4fqgW1 0nSxnb8+tXJTPGzSY0vizXLWJ7p1yNotLptgZ9E+2X1gYE7cp7ctMw10o5uaJrTcjjAaKT Q68RrlrK2AJ7fw6MlxOoO11DLzBHZ6q5b9PWY9h8ge/UB57drji41vBIrXm2PQQ5dytbfJ CAJ/L0iy4A+6/jx4KzSGKMhk8lhyDuE1aYqVV/+gwAuhIapQhOZkDMpSHinp9Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1713918543; a=rsa-sha256; cv=none; b=CHQS38lSDOqGRCGFTPrh7KyIIwJmPvct/2HddaM+ysqB45UhKmyw0M+xkQ1dbQBsvFpqG9 54GDPko9J4Oy0nVHdbnaSEJv7/S1j0B3nqFvaU76ulNex6OZftIllwbAuwPg4wZV7okA7j XgzFBkRydOlZIcgNbvoCEjnBB35XPbf9CbsAo6LAUHZQoUp6GQBsmoY2K8/oHwc6ICEyH3 Nt/zhsNfedPyPESX4T8A8ouRPQypq23ZQ8bdWjYEzoE1SbWAVIGpe+Nx3zPfJsrQpeszPg ZS+Okv6eZC764vDRLLXUC4rThTTUVZf+ocIDLqJogOge6RVvRSnbc3FqPkkaug== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1713918543; 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=HljoOh7u6Xd9zN/oRaDrL9yD8j2ofGXUuGm2CAYtqvw=; b=Ua0IPMvIZps8bOGYDHr29MdSY4TQTzyWgoSbruh561Pe9NITkOoArid1E8PjCqLrjTDliA 9HEET8erPxGT2184LbmcwqxD1fvgWAPEYu+cmfjd7FM0g+mYZaiFz/B3oup0mWHr4kHnXw AEfiXcB8vDrEAsyvyzhhmk+JTDsSjyBc2X1zKtB8VhcLYSz+IR/dAy95gjDKkPp31p75Cd VKEvlcNi7RSAP1dNEzGcLqTjxoPbsbQisu+NaGR1x1sGMmOh24cVehV9G0a9x/BidYhZ9k fIUkKpX+FnT1js1xD6tqXm6eAhuVQiq3+g/KHn2Jt4rUlHd5+AYbRpfJjJxWaQ== 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 4VPKbz1vKMzt21; Wed, 24 Apr 2024 00:29:03 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 43O0T3VB051341; Wed, 24 Apr 2024 00:29:03 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 43O0T3Rp051338; Wed, 24 Apr 2024 00:29:03 GMT (envelope-from git) Date: Wed, 24 Apr 2024 00:29:03 GMT Message-Id: <202404240029.43O0T3Rp051338@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Jake Freeland Subject: git: 4f2ada0d8821 - main - ktrace: Describe CAPFAIL trace point in man page 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: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jfree X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 4f2ada0d88219746fdfbc0907c28b0950ad18725 Auto-Submitted: auto-generated The branch main has been updated by jfree: URL: https://cgit.FreeBSD.org/src/commit/?id=4f2ada0d88219746fdfbc0907c28b0950ad18725 commit 4f2ada0d88219746fdfbc0907c28b0950ad18725 Author: Jake Freeland AuthorDate: 2024-04-24 00:25:16 +0000 Commit: Jake Freeland CommitDate: 2024-04-24 00:25:16 +0000 ktrace: Describe CAPFAIL trace point in man page Update the ktrace(1) man page to describe the recently improved capability failure tracing. Approved by: markj (mentor) Reviewed by: markj MFC after: 1 month Differential Revision: https://reviews.freebsd.org/D44886 --- usr.bin/ktrace/ktrace.1 | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/usr.bin/ktrace/ktrace.1 b/usr.bin/ktrace/ktrace.1 index 7167ad1e646a..5ccb206456b8 100644 --- a/usr.bin/ktrace/ktrace.1 +++ b/usr.bin/ktrace/ktrace.1 @@ -25,7 +25,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd August 26, 2019 +.Dd April 20, 2024 .Dt KTRACE 1 .Os .Sh NAME @@ -151,6 +151,21 @@ The and .Ar command options are mutually exclusive. +.Sh CAPABILITY VIOLATION TRACING +When the +.Cm p +trace point is specified, +.Nm +will record +.Xr capsicum 4 +capability mode violations made by the traced process. +Violations will be logged regardless of whether the process has actually +entered capability mode. +.Pp +For developers that are interested in Capsicumizing their programs, the +.Cm c , n , p +trace points can help quickly identify any system calls and path lookups that +are triggering violations. .Sh EXAMPLES Run "make", then trace it and any child processes: .Dl $ ktrace -i make @@ -183,7 +198,8 @@ Disable tracing of all user-owned processes: .Xr kdump 1 , .Xr truss 1 , .Xr ktrace 2 , -.Xr utrace 2 +.Xr utrace 2 , +.Xr capsicum 4 .Sh HISTORY The .Nm