Skip to content

Commit

Permalink
docs(filters): add restrictions when kernel data filter is used
Browse files Browse the repository at this point in the history
- Add the restrictions applicable when the kernel-space data filter is
available for an event field.
  • Loading branch information
rscampos committed Dec 13, 2024
1 parent 97dd25f commit 03b6b4d
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 3 deletions.
15 changes: 13 additions & 2 deletions docs/docs/flags/events.1.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
title: TRACEE-EVENTS
section: 1
header: Tracee Events Flag Manual
date: 2024/06
date: 2024/12
...

## NAME
Expand Down Expand Up @@ -54,7 +54,12 @@ Available for:
- return value
- scope fields

Strings can be compared as a prefix if ending with '\*', or as a suffix if starting with '\*'.
Strings can be compared as a prefix if ending with '\*', or as a suffix if starting with '\*'. If a string starts with '\*' and ends with '\*', it functions as a contains operator.

For certain event fields filtered in kernel space, the user will receive a warning if:

- String filters exceed 255 characters.
- The contains operator is used. Only exact matches, prefix, and suffix comparisons are allowed.

NOTE: Expressions containing '\*' token must be escaped!

Expand Down Expand Up @@ -116,6 +121,12 @@ Available only for:
--events openat.data.pathname='*shadow'
```

- To trace only 'openat' events that have 'pathname' contains the substring 'pass', use the following flag:

```console
--events openat.data.pathname='*pass*'
```

- To exclude 'openat' events that have 'pathname' equal to '/tmp/1' or '/bin/ls', use the following flag:

```console
Expand Down
21 changes: 20 additions & 1 deletion docs/man/events.1
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
.\" Automatically generated by Pandoc 3.2
.\"
.TH "TRACEE\-EVENTS" "1" "2024/06" "" "Tracee Events Flag Manual"
.TH "TRACEE\-EVENTS" "1" "2024/12" "" "Tracee Events Flag Manual"
.SS NAME
tracee \f[B]\-\-events\f[R] \- Select which events to trace
.SS SYNOPSIS
Expand Down Expand Up @@ -68,6 +68,16 @@ scope fields
.PP
Strings can be compared as a prefix if ending with `*', or as a suffix
if starting with `*'.
If a string starts with `*' and ends with `*', it functions as a
contains operator.
.PP
For certain event fields filtered in kernel space, the user will receive
a warning if:
.IP \[bu] 2
String filters exceed 255 characters.
.IP \[bu] 2
The contains operator is used.
Only exact matches, prefix, and suffix comparisons are allowed.
.PP
NOTE: Expressions containing `*' token must be escaped!
.SS EXCLUSION OPERATOR (PREPENDED)
Expand Down Expand Up @@ -147,6 +157,15 @@ use the following flag:
.EE
.RE
.IP \[bu] 2
To trace only `openat' events that have `pathname' contains the
substring `pass', use the following flag:
.RS 2
.IP
.EX
\-\-events openat.data.pathname=\[aq]*pass*\[aq]
.EE
.RE
.IP \[bu] 2
To exclude `openat' events that have `pathname' equal to `/tmp/1' or
`/bin/ls', use the following flag:
.RS 2
Expand Down

0 comments on commit 03b6b4d

Please sign in to comment.