diff --git a/bpf/alignchecker/bpf_alignchecker.c b/bpf/alignchecker/bpf_alignchecker.c index 49f59ec0945..8e2e8059fc4 100644 --- a/bpf/alignchecker/bpf_alignchecker.c +++ b/bpf/alignchecker/bpf_alignchecker.c @@ -3,6 +3,8 @@ #include "include/vmlinux.h" #include "include/api.h" #include "lib/hubble_msg.h" +#include "process/retprobe_map.h" +#include "process/types/basic.h" /* DECLARE declares a unique usage of the union or struct 'x' on the stack. * @@ -36,6 +38,7 @@ int main(void) // from maps DECLARE(struct, event, iter); DECLARE(struct, execve_map_value, iter); + DECLARE(struct, event_config, iter); return 0; } diff --git a/pkg/alignchecker/alignchecker.go b/pkg/alignchecker/alignchecker.go index 1bb66e93c64..3c6899a244f 100644 --- a/pkg/alignchecker/alignchecker.go +++ b/pkg/alignchecker/alignchecker.go @@ -7,6 +7,7 @@ import ( "github.com/cilium/tetragon/pkg/api/processapi" "github.com/cilium/tetragon/pkg/api/testapi" + "github.com/cilium/tetragon/pkg/api/tracingapi" "github.com/cilium/tetragon/pkg/sensors/exec/execvemap" check "github.com/cilium/cilium/pkg/alignchecker" @@ -29,6 +30,7 @@ func CheckStructAlignments(path string) error { "msg_exit": {reflect.TypeOf(processapi.MsgExitEvent{})}, "msg_test": {reflect.TypeOf(testapi.MsgTestEvent{})}, "execve_map_value": {reflect.TypeOf(execvemap.ExecveValue{})}, + "event_config": {reflect.TypeOf(tracingapi.EventConfig{})}, } return check.CheckStructAlignments(path, toCheck, true) } diff --git a/pkg/api/tracingapi/client_kprobe.go b/pkg/api/tracingapi/client_kprobe.go index 67146829ee1..7dd5ce1cdd3 100644 --- a/pkg/api/tracingapi/client_kprobe.go +++ b/pkg/api/tracingapi/client_kprobe.go @@ -228,12 +228,12 @@ type KprobeArgs struct { } type EventConfig struct { - FuncId uint32 - Arg [5]int32 - ArgM [5]uint32 - ArgTpCtxOff [5]uint32 - Sigkill uint32 - Syscall uint32 - ArgReturnCopy int32 - ArgReturn int32 + FuncId uint32 `align:"func_id"` + Arg [5]int32 `align:"arg0"` + ArgM [5]uint32 `align:"arg0m"` + ArgTpCtxOff [5]uint32 `align:"t_arg0_ctx_off"` + Sigkill uint32 `align:"sigkill"` + Syscall uint32 `align:"syscall"` + ArgReturnCopy int32 `align:"argreturncopy"` + ArgReturn int32 `align:"argreturn"` }