git: ba501a551776 - stable/14 - ktrace: Remove CAPFAIL from default trace points
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sun, 12 May 2024 00:08:39 UTC
The branch stable/14 has been updated by jfree:
URL: https://cgit.FreeBSD.org/src/commit/?id=ba501a551776bd101cd38ac2892bc900cf29da0a
commit ba501a551776bd101cd38ac2892bc900cf29da0a
Author: Jake Freeland <jfree@FreeBSD.org>
AuthorDate: 2024-04-24 00:26:14 +0000
Commit: Jake Freeland <jfree@FreeBSD.org>
CommitDate: 2024-05-11 23:57:44 +0000
ktrace: Remove CAPFAIL from default trace points
The CAPFAIL tracepoint was recently extended to report ECAPMODE
capability violations for processes that do not enter capability mode.
This allows developers that are interested in Capsicumizing their
programs to determine where violations are being raised.
Previously, CAPFAIL only produced output for processes using Capsicum(4)
capabilties. Thus, most ktrace users never received log output from the
trace point. With the recent changes, this is no longer the case.
Having this trace point enabled by default will produce output for all
processes that use syscalls that are not permitted in capability mode.
This may lead to confusion for users that are not familiar with the
feature. Remove KTRFAC_CAPFAIL from ktrace's default points to avoid
this.
Approved by: markj (mentor)
Reviewed by: markj
MFC after: 1 month
Differential Revision: https://reviews.freebsd.org/D44887
(cherry picked from commit f239db4800ee9e7ff8485f96b7a68e6c38178c3b)
---
usr.bin/ktrace/ktrace.1 | 2 +-
usr.bin/ktrace/ktrace.h | 7 +++----
2 files changed, 4 insertions(+), 5 deletions(-)
diff --git a/usr.bin/ktrace/ktrace.1 b/usr.bin/ktrace/ktrace.1
index 764896b91f66..1b287af7a611 100644
--- a/usr.bin/ktrace/ktrace.1
+++ b/usr.bin/ktrace/ktrace.1
@@ -139,7 +139,7 @@ trace
requests
.It Cm +
trace the default set of trace points -
-.Cm c , i , n , p , s , t , u , y
+.Cm c , i , n , s , t , u , y
.El
.It Ar command
Execute
diff --git a/usr.bin/ktrace/ktrace.h b/usr.bin/ktrace/ktrace.h
index cecd0adc7321..1d96c6faa2b7 100644
--- a/usr.bin/ktrace/ktrace.h
+++ b/usr.bin/ktrace/ktrace.h
@@ -33,13 +33,12 @@
#define DEF_POINTS (KTRFAC_SYSCALL | KTRFAC_SYSRET | KTRFAC_NAMEI | \
KTRFAC_GENIO | KTRFAC_PSIG | KTRFAC_USER | \
- KTRFAC_STRUCT | KTRFAC_SYSCTL | KTRFAC_CAPFAIL | \
- KTRFAC_STRUCT_ARRAY)
+ KTRFAC_STRUCT | KTRFAC_SYSCTL | KTRFAC_STRUCT_ARRAY)
#define PROC_ABI_POINTS (KTRFAC_PROCCTOR | KTRFAC_PROCDTOR)
-#define ALL_POINTS (DEF_POINTS | KTRFAC_CSW | PROC_ABI_POINTS | \
- KTRFAC_FAULT | KTRFAC_FAULTEND)
+#define ALL_POINTS (DEF_POINTS | KTRFAC_CAPFAIL | KTRFAC_CSW | \
+ PROC_ABI_POINTS | KTRFAC_FAULT | KTRFAC_FAULTEND)
#define DEF_TRACEFILE "ktrace.out"