Skip to content

Commit ba501a5

Browse files
committed
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 f239db4)
1 parent 5757a52 commit ba501a5

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

usr.bin/ktrace/ktrace.1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ trace
139139
requests
140140
.It Cm +
141141
trace the default set of trace points -
142-
.Cm c , i , n , p , s , t , u , y
142+
.Cm c , i , n , s , t , u , y
143143
.El
144144
.It Ar command
145145
Execute

usr.bin/ktrace/ktrace.h

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,13 +33,12 @@
3333

3434
#define DEF_POINTS (KTRFAC_SYSCALL | KTRFAC_SYSRET | KTRFAC_NAMEI | \
3535
KTRFAC_GENIO | KTRFAC_PSIG | KTRFAC_USER | \
36-
KTRFAC_STRUCT | KTRFAC_SYSCTL | KTRFAC_CAPFAIL | \
37-
KTRFAC_STRUCT_ARRAY)
36+
KTRFAC_STRUCT | KTRFAC_SYSCTL | KTRFAC_STRUCT_ARRAY)
3837

3938
#define PROC_ABI_POINTS (KTRFAC_PROCCTOR | KTRFAC_PROCDTOR)
4039

41-
#define ALL_POINTS (DEF_POINTS | KTRFAC_CSW | PROC_ABI_POINTS | \
42-
KTRFAC_FAULT | KTRFAC_FAULTEND)
40+
#define ALL_POINTS (DEF_POINTS | KTRFAC_CAPFAIL | KTRFAC_CSW | \
41+
PROC_ABI_POINTS | KTRFAC_FAULT | KTRFAC_FAULTEND)
4342

4443
#define DEF_TRACEFILE "ktrace.out"
4544

0 commit comments

Comments
 (0)