From eb1552ae5ed67a316d7a3c4ca3580485f0e5d5a9 Mon Sep 17 00:00:00 2001 From: Jiri Olsa Date: Tue, 21 Nov 2023 21:13:54 +0000 Subject: [PATCH] tetragon: Add support to store return action Signed-off-by: Jiri Olsa --- pkg/grpc/tracing/tracing.go | 2 ++ pkg/sensors/tracing/generickprobe.go | 1 + 2 files changed, 3 insertions(+) diff --git a/pkg/grpc/tracing/tracing.go b/pkg/grpc/tracing/tracing.go index 56a4789c5a5..79d3c1fc40f 100644 --- a/pkg/grpc/tracing/tracing.go +++ b/pkg/grpc/tracing/tracing.go @@ -302,6 +302,7 @@ func GetProcessKprobe(event *MsgGenericKprobeUnix) *tetragon.ProcessKprobe { Args: tetragonArgs, Return: tetragonReturnArg, Action: kprobeAction(event.Action), + ReturnAction: kprobeAction(event.ReturnAction), StackTrace: stackTrace, PolicyName: event.PolicyName, } @@ -470,6 +471,7 @@ type MsgGenericKprobeUnix struct { Capabilities processapi.MsgCapabilities Id uint64 Action uint64 + ReturnAction uint64 Tid uint32 FuncName string Args []tracingapi.MsgGenericKprobeArg diff --git a/pkg/sensors/tracing/generickprobe.go b/pkg/sensors/tracing/generickprobe.go index 9019c208ac8..0fb742ceacb 100644 --- a/pkg/sensors/tracing/generickprobe.go +++ b/pkg/sensors/tracing/generickprobe.go @@ -1656,6 +1656,7 @@ func retprobeMerge(prev pendingEvent, curr pendingEvent) *tracing.MsgGenericKpro enterEv.Args = append(enterEv.Args, retArg) } } + enterEv.ReturnAction = retEv.Action return enterEv }