From 24cfa078d36c710437cf21a1cce5d5654b254e14 Mon Sep 17 00:00:00 2001 From: z63d Date: Wed, 12 Feb 2025 14:23:12 +0900 Subject: [PATCH 1/3] fix: add returnArg index to docs Signed-off-by: Kaita Nakamura --- docs/content/en/docs/concepts/tracing-policy/hooks.md | 2 ++ docs/content/en/docs/concepts/tracing-policy/selectors.md | 1 + 2 files changed, 3 insertions(+) diff --git a/docs/content/en/docs/concepts/tracing-policy/hooks.md b/docs/content/en/docs/concepts/tracing-policy/hooks.md index 90975cc41b5..417044014b8 100644 --- a/docs/content/en/docs/concepts/tracing-policy/hooks.md +++ b/docs/content/en/docs/concepts/tracing-policy/hooks.md @@ -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 ``` @@ -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 ``` diff --git a/docs/content/en/docs/concepts/tracing-policy/selectors.md b/docs/content/en/docs/concepts/tracing-policy/selectors.md index 181e6d86ed2..4fd2888236a 100644 --- a/docs/content/en/docs/concepts/tracing-policy/selectors.md +++ b/docs/content/en/docs/concepts/tracing-policy/selectors.md @@ -1193,6 +1193,7 @@ generate any event about that. - index: 2 type: "int" returnArg: + index: 0 type: "int" selectors: - matchPIDs: From 8b4fdfb6e6ba96ac3f0cc4039c6b3477c4d0ce7a Mon Sep 17 00:00:00 2001 From: z63d Date: Wed, 12 Feb 2025 14:23:41 +0900 Subject: [PATCH 2/3] fix: add returnArg index to examples Signed-off-by: Kaita Nakamura --- examples/tracingpolicy/tcp-listen.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/examples/tracingpolicy/tcp-listen.yaml b/examples/tracingpolicy/tcp-listen.yaml index c3430ee9fbc..d164c9c7398 100644 --- a/examples/tracingpolicy/tcp-listen.yaml +++ b/examples/tracingpolicy/tcp-listen.yaml @@ -13,6 +13,7 @@ spec: type: int label: "family" returnArg: + index: 0 type: "sock" returnArgAction: "TrackSock" selectors: From ad9c8d5166946ed74c4713b7a0e00ce10c2795b2 Mon Sep 17 00:00:00 2001 From: z63d Date: Wed, 12 Feb 2025 14:27:56 +0900 Subject: [PATCH 3/3] fix: add returnArg index to bench and sensors Signed-off-by: Kaita Nakamura --- pkg/bench/trace_bench_rw.go | 1 + pkg/sensors/tracing/kprobe_amd64_test.go | 1 + pkg/sensors/tracing/kprobe_test.go | 13 +++++++++++++ 3 files changed, 15 insertions(+) diff --git a/pkg/bench/trace_bench_rw.go b/pkg/bench/trace_bench_rw.go index 76f95590e6f..cc52c66e9b5 100644 --- a/pkg/bench/trace_bench_rw.go +++ b/pkg/bench/trace_bench_rw.go @@ -150,6 +150,7 @@ spec: - index: 2 type: "size_t" returnArg: + index: 0 type: "size_t" selectors: - matchPIDs: diff --git a/pkg/sensors/tracing/kprobe_amd64_test.go b/pkg/sensors/tracing/kprobe_amd64_test.go index a474d5b10ed..a01f51ae798 100644 --- a/pkg/sensors/tracing/kprobe_amd64_test.go +++ b/pkg/sensors/tracing/kprobe_amd64_test.go @@ -58,6 +58,7 @@ spec: - index: 2 type: "capability" returnArg: + index: 0 type: "int" selectors: - matchPIDs: diff --git a/pkg/sensors/tracing/kprobe_test.go b/pkg/sensors/tracing/kprobe_test.go index 716c9da6f12..f4787a3e485 100644 --- a/pkg/sensors/tracing/kprobe_test.go +++ b/pkg/sensors/tracing/kprobe_test.go @@ -565,6 +565,7 @@ spec: - index: 2 type: "size_t" returnArg: + index: 0 type: "size_t" selectors: - matchPIDs: @@ -1531,6 +1532,7 @@ func testKprobeObjectFilterReturnValueGTHook(pidStr, path string) string { - index: 2 type: "int" returnArg: + index: 0 type: int selectors: - matchPIDs: @@ -1570,6 +1572,7 @@ func testKprobeObjectFilterReturnValueLTHook(pidStr, path string) string { - index: 2 type: "int" returnArg: + index: 0 type: int selectors: - matchPIDs: @@ -1861,6 +1864,7 @@ spec: - index: 1 type: "filename" returnArg: + index: 0 type: file selectors: - matchPIDs: @@ -2396,6 +2400,7 @@ spec: - index: 2 type: "int" returnArg: + index: 0 type: "int" selectors: - matchPIDs: @@ -2459,6 +2464,7 @@ spec: - index: 0 type: "file" returnArg: + index: 0 type: "int" selectors: - matchPIDs: @@ -2517,6 +2523,7 @@ spec: - index: 2 type: "int" returnArg: + index: 0 type: "int" selectors: - matchPIDs: @@ -2637,6 +2644,7 @@ spec: - index: 2 type: "int" returnArg: + index: 0 type: "int" selectors: - matchPIDs: @@ -2702,6 +2710,7 @@ spec: - index: 2 type: "int" returnArg: + index: 0 type: "int" selectors: - matchPIDs: @@ -2767,6 +2776,7 @@ spec: - index: 2 type: "int" returnArg: + index: 0 type: "int" selectors: - matchPIDs: @@ -2910,6 +2920,7 @@ spec: - index: 2 type: "int" returnArg: + index: 0 type: "int" selectors: - matchPIDs: @@ -2940,6 +2951,7 @@ spec: - index: 4 type: "int" returnArg: + index: 0 type: "int" selectors: - matchPIDs: @@ -4406,6 +4418,7 @@ spec: - index: 2 type: "size_t" returnArg: + index: 0 type: "size_t" `