Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: returnArg index of TracingPolicy is not specified #3388

Merged
merged 3 commits into from
Feb 13, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions docs/content/en/docs/concepts/tracing-policy/hooks.md
Original file line number Diff line number Diff line change
Expand Up @@ -416,6 +416,7 @@ set to `true`, and the `returnArg` parameter needs to be set to specify the
type: int
label: "family"
returnArg:
index: 0
type: sock
```

Expand Down Expand Up @@ -450,6 +451,7 @@ See [`TrackSock`](/docs/concepts/tracing-policy/selectors/#tracksock-action) and
type: int
label: "family"
returnArg:
index: 0
type: sock
returnArgAction: TrackSock
```
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1193,6 +1193,7 @@ generate any event about that.
- index: 2
type: "int"
returnArg:
index: 0
type: "int"
selectors:
- matchPIDs:
Expand Down
1 change: 1 addition & 0 deletions examples/tracingpolicy/tcp-listen.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ spec:
type: int
label: "family"
returnArg:
index: 0
type: "sock"
returnArgAction: "TrackSock"
selectors:
Expand Down
1 change: 1 addition & 0 deletions pkg/bench/trace_bench_rw.go
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,7 @@ spec:
- index: 2
type: "size_t"
returnArg:
index: 0
type: "size_t"
selectors:
- matchPIDs:
Expand Down
1 change: 1 addition & 0 deletions pkg/sensors/tracing/kprobe_amd64_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ spec:
- index: 2
type: "capability"
returnArg:
index: 0
type: "int"
selectors:
- matchPIDs:
Expand Down
13 changes: 13 additions & 0 deletions pkg/sensors/tracing/kprobe_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -565,6 +565,7 @@ spec:
- index: 2
type: "size_t"
returnArg:
index: 0
type: "size_t"
selectors:
- matchPIDs:
Expand Down Expand Up @@ -1531,6 +1532,7 @@ func testKprobeObjectFilterReturnValueGTHook(pidStr, path string) string {
- index: 2
type: "int"
returnArg:
index: 0
type: int
selectors:
- matchPIDs:
Expand Down Expand Up @@ -1570,6 +1572,7 @@ func testKprobeObjectFilterReturnValueLTHook(pidStr, path string) string {
- index: 2
type: "int"
returnArg:
index: 0
type: int
selectors:
- matchPIDs:
Expand Down Expand Up @@ -1861,6 +1864,7 @@ spec:
- index: 1
type: "filename"
returnArg:
index: 0
type: file
selectors:
- matchPIDs:
Expand Down Expand Up @@ -2396,6 +2400,7 @@ spec:
- index: 2
type: "int"
returnArg:
index: 0
type: "int"
selectors:
- matchPIDs:
Expand Down Expand Up @@ -2459,6 +2464,7 @@ spec:
- index: 0
type: "file"
returnArg:
index: 0
type: "int"
selectors:
- matchPIDs:
Expand Down Expand Up @@ -2517,6 +2523,7 @@ spec:
- index: 2
type: "int"
returnArg:
index: 0
type: "int"
selectors:
- matchPIDs:
Expand Down Expand Up @@ -2637,6 +2644,7 @@ spec:
- index: 2
type: "int"
returnArg:
index: 0
type: "int"
selectors:
- matchPIDs:
Expand Down Expand Up @@ -2702,6 +2710,7 @@ spec:
- index: 2
type: "int"
returnArg:
index: 0
type: "int"
selectors:
- matchPIDs:
Expand Down Expand Up @@ -2767,6 +2776,7 @@ spec:
- index: 2
type: "int"
returnArg:
index: 0
type: "int"
selectors:
- matchPIDs:
Expand Down Expand Up @@ -2910,6 +2920,7 @@ spec:
- index: 2
type: "int"
returnArg:
index: 0
type: "int"
selectors:
- matchPIDs:
Expand Down Expand Up @@ -2940,6 +2951,7 @@ spec:
- index: 4
type: "int"
returnArg:
index: 0
type: "int"
selectors:
- matchPIDs:
Expand Down Expand Up @@ -4406,6 +4418,7 @@ spec:
- index: 2
type: "size_t"
returnArg:
index: 0
type: "size_t"
`

Expand Down
Loading