From 3f916530cd89cf401ee61b5b1787ea982f32d3b3 Mon Sep 17 00:00:00 2001 From: Andrey Fedotov Date: Sun, 18 Feb 2024 21:52:39 +0300 Subject: [PATCH] Support user mode stacktraces in events Signed-off-by: Andrey Fedotov --- api/v1/README.md | 6 +- .../codegen/eventchecker/eventchecker.pb.go | 80 +++- api/v1/tetragon/tetragon.pb.go | 421 ++++++++++-------- api/v1/tetragon/tetragon.proto | 8 +- bpf/lib/common.h | 3 +- bpf/lib/generic.h | 3 +- bpf/process/types/basic.h | 15 +- .../tetragon/api/v1/tetragon/tetragon.proto | 4 +- .../docs/concepts/tracing-policy/selectors.md | 7 +- docs/content/en/docs/reference/grpc-api.md | 6 +- docs/data/tetragon_flags.yaml | 4 +- examples/tracingpolicy/stack_traces.yaml | 2 +- go.mod | 2 +- pkg/api/processapi/processapi.go | 5 +- pkg/api/tracingapi/client_kprobe.go | 21 +- pkg/api/tracingapi/client_tracepoint.go | 21 +- pkg/encoder/encoder.go | 13 +- pkg/grpc/tracing/tracing.go | 66 ++- .../v1alpha1/cilium.io_tracingpolicies.yaml | 48 +- .../cilium.io_tracingpoliciesnamespaced.yaml | 24 + pkg/k8s/apis/cilium.io/v1alpha1/types.go | 7 +- pkg/option/config.go | 2 +- pkg/option/flags.go | 6 +- pkg/procsyms/procsyms.go | 124 ++++++ pkg/selectors/kernel.go | 13 +- pkg/selectors/kernel_test.go | 25 +- pkg/sensors/tracing/generickprobe.go | 35 +- pkg/sensors/tracing/kprobe_test.go | 72 ++- .../codegen/eventchecker/eventchecker.pb.go | 80 +++- .../tetragon/api/v1/tetragon/tetragon.pb.go | 421 ++++++++++-------- .../tetragon/api/v1/tetragon/tetragon.proto | 8 +- .../v1alpha1/cilium.io_tracingpolicies.yaml | 48 +- .../cilium.io_tracingpoliciesnamespaced.yaml | 24 + .../pkg/k8s/apis/cilium.io/v1alpha1/types.go | 7 +- 34 files changed, 1065 insertions(+), 566 deletions(-) create mode 100644 pkg/procsyms/procsyms.go diff --git a/api/v1/README.md b/api/v1/README.md index be5c1f234e2..6b4f309d437 100644 --- a/api/v1/README.md +++ b/api/v1/README.md @@ -866,10 +866,11 @@ https://github.com/opencontainers/runtime-spec/blob/main/config.md#createcontain | args | [KprobeArgument](#tetragon-KprobeArgument) | repeated | Arguments definition of the observed kprobe. | | return | [KprobeArgument](#tetragon-KprobeArgument) | | Return value definition of the observed kprobe. | | action | [KprobeAction](#tetragon-KprobeAction) | | Action performed when the kprobe matched. | -| stack_trace | [StackTraceEntry](#tetragon-StackTraceEntry) | repeated | Kernel stack trace to the call. | +| kernel_stack_trace | [StackTraceEntry](#tetragon-StackTraceEntry) | repeated | Kernel stack trace to the call. | | policy_name | [string](#string) | | Name of the Tracing Policy that created that kprobe. | | return_action | [KprobeAction](#tetragon-KprobeAction) | | Action performed when the return kprobe executed. | | message | [string](#string) | | Short message of the Tracing Policy to inform users what is going on. | +| user_stack_trace | [StackTraceEntry](#tetragon-StackTraceEntry) | repeated | User-mode stack trace to the call. | @@ -969,9 +970,10 @@ RuntimeHookRequest synchronously propagates information to the agent about run-t | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| address | [uint64](#uint64) | | address is the kernel function address. | +| address | [uint64](#uint64) | | linear address of the function in kernel or user space. | | offset | [uint64](#uint64) | | offset is the offset into the native instructions for the function. | | symbol | [string](#string) | | symbol is the symbol name of the function. | +| module | [string](#string) | | module path for user space addresses. | diff --git a/api/v1/tetragon/codegen/eventchecker/eventchecker.pb.go b/api/v1/tetragon/codegen/eventchecker/eventchecker.pb.go index 49af5e8a44f..7fe3746a4c0 100644 --- a/api/v1/tetragon/codegen/eventchecker/eventchecker.pb.go +++ b/api/v1/tetragon/codegen/eventchecker/eventchecker.pb.go @@ -696,17 +696,18 @@ func (checker *ProcessExitChecker) FromProcessExit(event *tetragon.ProcessExit) // ProcessKprobeChecker implements a checker struct to check a ProcessKprobe event type ProcessKprobeChecker struct { - CheckerName string `json:"checkerName"` - Process *ProcessChecker `json:"process,omitempty"` - Parent *ProcessChecker `json:"parent,omitempty"` - FunctionName *stringmatcher.StringMatcher `json:"functionName,omitempty"` - Args *KprobeArgumentListMatcher `json:"args,omitempty"` - Return *KprobeArgumentChecker `json:"return,omitempty"` - Action *KprobeActionChecker `json:"action,omitempty"` - StackTrace *StackTraceEntryListMatcher `json:"stackTrace,omitempty"` - PolicyName *stringmatcher.StringMatcher `json:"policyName,omitempty"` - ReturnAction *KprobeActionChecker `json:"returnAction,omitempty"` - Message *stringmatcher.StringMatcher `json:"message,omitempty"` + CheckerName string `json:"checkerName"` + Process *ProcessChecker `json:"process,omitempty"` + Parent *ProcessChecker `json:"parent,omitempty"` + FunctionName *stringmatcher.StringMatcher `json:"functionName,omitempty"` + Args *KprobeArgumentListMatcher `json:"args,omitempty"` + Return *KprobeArgumentChecker `json:"return,omitempty"` + Action *KprobeActionChecker `json:"action,omitempty"` + KernelStackTrace *StackTraceEntryListMatcher `json:"kernelStackTrace,omitempty"` + PolicyName *stringmatcher.StringMatcher `json:"policyName,omitempty"` + ReturnAction *KprobeActionChecker `json:"returnAction,omitempty"` + Message *stringmatcher.StringMatcher `json:"message,omitempty"` + UserStackTrace *StackTraceEntryListMatcher `json:"userStackTrace,omitempty"` } // CheckEvent checks a single event and implements the EventChecker interface @@ -778,9 +779,9 @@ func (checker *ProcessKprobeChecker) Check(event *tetragon.ProcessKprobe) error return fmt.Errorf("Action check failed: %w", err) } } - if checker.StackTrace != nil { - if err := checker.StackTrace.Check(event.StackTrace); err != nil { - return fmt.Errorf("StackTrace check failed: %w", err) + if checker.KernelStackTrace != nil { + if err := checker.KernelStackTrace.Check(event.KernelStackTrace); err != nil { + return fmt.Errorf("KernelStackTrace check failed: %w", err) } } if checker.PolicyName != nil { @@ -798,6 +799,11 @@ func (checker *ProcessKprobeChecker) Check(event *tetragon.ProcessKprobe) error return fmt.Errorf("Message check failed: %w", err) } } + if checker.UserStackTrace != nil { + if err := checker.UserStackTrace.Check(event.UserStackTrace); err != nil { + return fmt.Errorf("UserStackTrace check failed: %w", err) + } + } return nil } if err := fieldChecks(); err != nil { @@ -843,9 +849,9 @@ func (checker *ProcessKprobeChecker) WithAction(check tetragon.KprobeAction) *Pr return checker } -// WithStackTrace adds a StackTrace check to the ProcessKprobeChecker -func (checker *ProcessKprobeChecker) WithStackTrace(check *StackTraceEntryListMatcher) *ProcessKprobeChecker { - checker.StackTrace = check +// WithKernelStackTrace adds a KernelStackTrace check to the ProcessKprobeChecker +func (checker *ProcessKprobeChecker) WithKernelStackTrace(check *StackTraceEntryListMatcher) *ProcessKprobeChecker { + checker.KernelStackTrace = check return checker } @@ -868,6 +874,12 @@ func (checker *ProcessKprobeChecker) WithMessage(check *stringmatcher.StringMatc return checker } +// WithUserStackTrace adds a UserStackTrace check to the ProcessKprobeChecker +func (checker *ProcessKprobeChecker) WithUserStackTrace(check *StackTraceEntryListMatcher) *ProcessKprobeChecker { + checker.UserStackTrace = check + return checker +} + //FromProcessKprobe populates the ProcessKprobeChecker using data from a ProcessKprobe event func (checker *ProcessKprobeChecker) FromProcessKprobe(event *tetragon.ProcessKprobe) *ProcessKprobeChecker { if event == nil { @@ -899,7 +911,7 @@ func (checker *ProcessKprobeChecker) FromProcessKprobe(event *tetragon.ProcessKp checker.Action = NewKprobeActionChecker(event.Action) { var checks []*StackTraceEntryChecker - for _, check := range event.StackTrace { + for _, check := range event.KernelStackTrace { var convertedCheck *StackTraceEntryChecker if check != nil { convertedCheck = NewStackTraceEntryChecker().FromStackTraceEntry(check) @@ -908,11 +920,24 @@ func (checker *ProcessKprobeChecker) FromProcessKprobe(event *tetragon.ProcessKp } lm := NewStackTraceEntryListMatcher().WithOperator(listmatcher.Ordered). WithValues(checks...) - checker.StackTrace = lm + checker.KernelStackTrace = lm } checker.PolicyName = stringmatcher.Full(event.PolicyName) checker.ReturnAction = NewKprobeActionChecker(event.ReturnAction) checker.Message = stringmatcher.Full(event.Message) + { + var checks []*StackTraceEntryChecker + for _, check := range event.UserStackTrace { + var convertedCheck *StackTraceEntryChecker + if check != nil { + convertedCheck = NewStackTraceEntryChecker().FromStackTraceEntry(check) + } + checks = append(checks, convertedCheck) + } + lm := NewStackTraceEntryListMatcher().WithOperator(listmatcher.Ordered). + WithValues(checks...) + checker.UserStackTrace = lm + } return checker } @@ -1059,7 +1084,7 @@ func (checker *StackTraceEntryListMatcher) Check(values []*tetragon.StackTraceEn func (checker *StackTraceEntryListMatcher) orderedCheck(values []*tetragon.StackTraceEntry) error { innerCheck := func(check *StackTraceEntryChecker, value *tetragon.StackTraceEntry) error { if err := check.Check(value); err != nil { - return fmt.Errorf("StackTrace check failed: %w", err) + return fmt.Errorf("KernelStackTrace check failed: %w", err) } return nil } @@ -1091,7 +1116,7 @@ func (checker *StackTraceEntryListMatcher) unorderedCheck(values []*tetragon.Sta func (checker *StackTraceEntryListMatcher) subsetCheck(values []*tetragon.StackTraceEntry) error { innerCheck := func(check *StackTraceEntryChecker, value *tetragon.StackTraceEntry) error { if err := check.Check(value); err != nil { - return fmt.Errorf("StackTrace check failed: %w", err) + return fmt.Errorf("KernelStackTrace check failed: %w", err) } return nil } @@ -5743,6 +5768,7 @@ type StackTraceEntryChecker struct { Address *uint64 `json:"address,omitempty"` Offset *uint64 `json:"offset,omitempty"` Symbol *stringmatcher.StringMatcher `json:"symbol,omitempty"` + Module *stringmatcher.StringMatcher `json:"module,omitempty"` } // NewStackTraceEntryChecker creates a new StackTraceEntryChecker @@ -5777,6 +5803,11 @@ func (checker *StackTraceEntryChecker) Check(event *tetragon.StackTraceEntry) er return fmt.Errorf("Symbol check failed: %w", err) } } + if checker.Module != nil { + if err := checker.Module.Match(event.Module); err != nil { + return fmt.Errorf("Module check failed: %w", err) + } + } return nil } if err := fieldChecks(); err != nil { @@ -5803,6 +5834,12 @@ func (checker *StackTraceEntryChecker) WithSymbol(check *stringmatcher.StringMat return checker } +// WithModule adds a Module check to the StackTraceEntryChecker +func (checker *StackTraceEntryChecker) WithModule(check *stringmatcher.StringMatcher) *StackTraceEntryChecker { + checker.Module = check + return checker +} + //FromStackTraceEntry populates the StackTraceEntryChecker using data from a StackTraceEntry field func (checker *StackTraceEntryChecker) FromStackTraceEntry(event *tetragon.StackTraceEntry) *StackTraceEntryChecker { if event == nil { @@ -5817,6 +5854,7 @@ func (checker *StackTraceEntryChecker) FromStackTraceEntry(event *tetragon.Stack checker.Offset = &val } checker.Symbol = stringmatcher.Full(event.Symbol) + checker.Module = stringmatcher.Full(event.Module) return checker } diff --git a/api/v1/tetragon/tetragon.pb.go b/api/v1/tetragon/tetragon.pb.go index 97e21b49981..a9110abd126 100644 --- a/api/v1/tetragon/tetragon.pb.go +++ b/api/v1/tetragon/tetragon.pb.go @@ -2954,13 +2954,15 @@ type ProcessKprobe struct { // Action performed when the kprobe matched. Action KprobeAction `protobuf:"varint,6,opt,name=action,proto3,enum=tetragon.KprobeAction" json:"action,omitempty"` // Kernel stack trace to the call. - StackTrace []*StackTraceEntry `protobuf:"bytes,7,rep,name=stack_trace,json=stackTrace,proto3" json:"stack_trace,omitempty"` + KernelStackTrace []*StackTraceEntry `protobuf:"bytes,7,rep,name=kernel_stack_trace,json=kernelStackTrace,proto3" json:"kernel_stack_trace,omitempty"` // Name of the Tracing Policy that created that kprobe. PolicyName string `protobuf:"bytes,8,opt,name=policy_name,json=policyName,proto3" json:"policy_name,omitempty"` // Action performed when the return kprobe executed. ReturnAction KprobeAction `protobuf:"varint,9,opt,name=return_action,json=returnAction,proto3,enum=tetragon.KprobeAction" json:"return_action,omitempty"` // Short message of the Tracing Policy to inform users what is going on. Message string `protobuf:"bytes,10,opt,name=message,proto3" json:"message,omitempty"` + // User-mode stack trace to the call. + UserStackTrace []*StackTraceEntry `protobuf:"bytes,11,rep,name=user_stack_trace,json=userStackTrace,proto3" json:"user_stack_trace,omitempty"` } func (x *ProcessKprobe) Reset() { @@ -3037,9 +3039,9 @@ func (x *ProcessKprobe) GetAction() KprobeAction { return KprobeAction_KPROBE_ACTION_UNKNOWN } -func (x *ProcessKprobe) GetStackTrace() []*StackTraceEntry { +func (x *ProcessKprobe) GetKernelStackTrace() []*StackTraceEntry { if x != nil { - return x.StackTrace + return x.KernelStackTrace } return nil } @@ -3065,6 +3067,13 @@ func (x *ProcessKprobe) GetMessage() string { return "" } +func (x *ProcessKprobe) GetUserStackTrace() []*StackTraceEntry { + if x != nil { + return x.UserStackTrace + } + return nil +} + type ProcessTracepoint struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -3818,12 +3827,14 @@ type StackTraceEntry struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // address is the kernel function address. + // linear address of the function in kernel or user space. Address uint64 `protobuf:"varint,1,opt,name=address,proto3" json:"address,omitempty"` // offset is the offset into the native instructions for the function. Offset uint64 `protobuf:"varint,2,opt,name=offset,proto3" json:"offset,omitempty"` // symbol is the symbol name of the function. Symbol string `protobuf:"bytes,3,opt,name=symbol,proto3" json:"symbol,omitempty"` + // module path for user space addresses. + Module string `protobuf:"bytes,4,opt,name=module,proto3" json:"module,omitempty"` } func (x *StackTraceEntry) Reset() { @@ -3879,6 +3890,13 @@ func (x *StackTraceEntry) GetSymbol() string { return "" } +func (x *StackTraceEntry) GetModule() string { + if x != nil { + return x.Module + } + return "" +} + var File_tetragon_tetragon_proto protoreflect.FileDescriptor var file_tetragon_tetragon_proto_rawDesc = []byte{ @@ -4310,7 +4328,7 @@ var file_tetragon_tetragon_proto_rawDesc = []byte{ 0x69, 0x6e, 0x75, 0x78, 0x42, 0x69, 0x6e, 0x70, 0x72, 0x6d, 0x48, 0x00, 0x52, 0x0e, 0x6c, 0x69, 0x6e, 0x75, 0x78, 0x42, 0x69, 0x6e, 0x70, 0x72, 0x6d, 0x41, 0x72, 0x67, 0x12, 0x14, 0x0a, 0x05, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x18, 0x12, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6c, 0x61, 0x62, - 0x65, 0x6c, 0x42, 0x05, 0x0a, 0x03, 0x61, 0x72, 0x67, 0x22, 0xd0, 0x03, 0x0a, 0x0d, 0x50, 0x72, + 0x65, 0x6c, 0x42, 0x05, 0x0a, 0x03, 0x61, 0x72, 0x67, 0x22, 0xa2, 0x04, 0x0a, 0x0d, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x4b, 0x70, 0x72, 0x6f, 0x62, 0x65, 0x12, 0x2b, 0x0a, 0x07, 0x70, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x74, 0x65, 0x74, 0x72, 0x61, 0x67, 0x6f, 0x6e, 0x2e, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x52, @@ -4328,179 +4346,185 @@ var file_tetragon_tetragon_proto_rawDesc = []byte{ 0x52, 0x06, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x12, 0x2e, 0x0a, 0x06, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x16, 0x2e, 0x74, 0x65, 0x74, 0x72, 0x61, 0x67, 0x6f, 0x6e, 0x2e, 0x4b, 0x70, 0x72, 0x6f, 0x62, 0x65, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, - 0x52, 0x06, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x3a, 0x0a, 0x0b, 0x73, 0x74, 0x61, 0x63, - 0x6b, 0x5f, 0x74, 0x72, 0x61, 0x63, 0x65, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, - 0x74, 0x65, 0x74, 0x72, 0x61, 0x67, 0x6f, 0x6e, 0x2e, 0x53, 0x74, 0x61, 0x63, 0x6b, 0x54, 0x72, - 0x61, 0x63, 0x65, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0a, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x54, - 0x72, 0x61, 0x63, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x5f, 0x6e, - 0x61, 0x6d, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x70, 0x6f, 0x6c, 0x69, 0x63, - 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x3b, 0x0a, 0x0d, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x5f, - 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x16, 0x2e, 0x74, - 0x65, 0x74, 0x72, 0x61, 0x67, 0x6f, 0x6e, 0x2e, 0x4b, 0x70, 0x72, 0x6f, 0x62, 0x65, 0x41, 0x63, - 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0c, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x41, 0x63, 0x74, 0x69, - 0x6f, 0x6e, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x0a, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x22, 0xb2, 0x02, 0x0a, - 0x11, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x54, 0x72, 0x61, 0x63, 0x65, 0x70, 0x6f, 0x69, - 0x6e, 0x74, 0x12, 0x2b, 0x0a, 0x07, 0x70, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, + 0x52, 0x06, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x47, 0x0a, 0x12, 0x6b, 0x65, 0x72, 0x6e, + 0x65, 0x6c, 0x5f, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x5f, 0x74, 0x72, 0x61, 0x63, 0x65, 0x18, 0x07, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x74, 0x65, 0x74, 0x72, 0x61, 0x67, 0x6f, 0x6e, 0x2e, + 0x53, 0x74, 0x61, 0x63, 0x6b, 0x54, 0x72, 0x61, 0x63, 0x65, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, + 0x10, 0x6b, 0x65, 0x72, 0x6e, 0x65, 0x6c, 0x53, 0x74, 0x61, 0x63, 0x6b, 0x54, 0x72, 0x61, 0x63, + 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x5f, 0x6e, 0x61, 0x6d, 0x65, + 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x4e, 0x61, + 0x6d, 0x65, 0x12, 0x3b, 0x0a, 0x0d, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x5f, 0x61, 0x63, 0x74, + 0x69, 0x6f, 0x6e, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x16, 0x2e, 0x74, 0x65, 0x74, 0x72, + 0x61, 0x67, 0x6f, 0x6e, 0x2e, 0x4b, 0x70, 0x72, 0x6f, 0x62, 0x65, 0x41, 0x63, 0x74, 0x69, 0x6f, + 0x6e, 0x52, 0x0c, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, + 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x43, 0x0a, 0x10, 0x75, 0x73, 0x65, + 0x72, 0x5f, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x5f, 0x74, 0x72, 0x61, 0x63, 0x65, 0x18, 0x0b, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x74, 0x65, 0x74, 0x72, 0x61, 0x67, 0x6f, 0x6e, 0x2e, 0x53, + 0x74, 0x61, 0x63, 0x6b, 0x54, 0x72, 0x61, 0x63, 0x65, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0e, + 0x75, 0x73, 0x65, 0x72, 0x53, 0x74, 0x61, 0x63, 0x6b, 0x54, 0x72, 0x61, 0x63, 0x65, 0x22, 0xb2, + 0x02, 0x0a, 0x11, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x54, 0x72, 0x61, 0x63, 0x65, 0x70, + 0x6f, 0x69, 0x6e, 0x74, 0x12, 0x2b, 0x0a, 0x07, 0x70, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x74, 0x65, 0x74, 0x72, 0x61, 0x67, 0x6f, 0x6e, + 0x2e, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x52, 0x07, 0x70, 0x72, 0x6f, 0x63, 0x65, 0x73, + 0x73, 0x12, 0x29, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x11, 0x2e, 0x74, 0x65, 0x74, 0x72, 0x61, 0x67, 0x6f, 0x6e, 0x2e, 0x50, 0x72, 0x6f, + 0x63, 0x65, 0x73, 0x73, 0x52, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x12, 0x16, 0x0a, 0x06, + 0x73, 0x75, 0x62, 0x73, 0x79, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x75, + 0x62, 0x73, 0x79, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x18, 0x05, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x05, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x2c, 0x0a, 0x04, 0x61, 0x72, + 0x67, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x74, 0x65, 0x74, 0x72, 0x61, + 0x67, 0x6f, 0x6e, 0x2e, 0x4b, 0x70, 0x72, 0x6f, 0x62, 0x65, 0x41, 0x72, 0x67, 0x75, 0x6d, 0x65, + 0x6e, 0x74, 0x52, 0x04, 0x61, 0x72, 0x67, 0x73, 0x12, 0x1f, 0x0a, 0x0b, 0x70, 0x6f, 0x6c, 0x69, + 0x63, 0x79, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x70, + 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x2e, 0x0a, 0x06, 0x61, 0x63, 0x74, + 0x69, 0x6f, 0x6e, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x16, 0x2e, 0x74, 0x65, 0x74, 0x72, + 0x61, 0x67, 0x6f, 0x6e, 0x2e, 0x4b, 0x70, 0x72, 0x6f, 0x62, 0x65, 0x41, 0x63, 0x74, 0x69, 0x6f, + 0x6e, 0x52, 0x06, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x73, + 0x73, 0x61, 0x67, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, + 0x61, 0x67, 0x65, 0x22, 0xfc, 0x01, 0x0a, 0x0d, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x55, + 0x70, 0x72, 0x6f, 0x62, 0x65, 0x12, 0x2b, 0x0a, 0x07, 0x70, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x74, 0x65, 0x74, 0x72, 0x61, 0x67, 0x6f, + 0x6e, 0x2e, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x52, 0x07, 0x70, 0x72, 0x6f, 0x63, 0x65, + 0x73, 0x73, 0x12, 0x29, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x74, 0x65, 0x74, 0x72, 0x61, 0x67, 0x6f, 0x6e, 0x2e, 0x50, 0x72, + 0x6f, 0x63, 0x65, 0x73, 0x73, 0x52, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x12, 0x12, 0x0a, + 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x70, 0x61, 0x74, + 0x68, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x79, 0x6d, 0x62, 0x6f, 0x6c, 0x18, 0x04, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x06, 0x73, 0x79, 0x6d, 0x62, 0x6f, 0x6c, 0x12, 0x1f, 0x0a, 0x0b, 0x70, 0x6f, 0x6c, + 0x69, 0x63, 0x79, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, + 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, + 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, 0x73, + 0x73, 0x61, 0x67, 0x65, 0x12, 0x2c, 0x0a, 0x04, 0x61, 0x72, 0x67, 0x73, 0x18, 0x07, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x74, 0x65, 0x74, 0x72, 0x61, 0x67, 0x6f, 0x6e, 0x2e, 0x4b, 0x70, + 0x72, 0x6f, 0x62, 0x65, 0x41, 0x72, 0x67, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x04, 0x61, 0x72, + 0x67, 0x73, 0x22, 0x96, 0x01, 0x0a, 0x0c, 0x4b, 0x65, 0x72, 0x6e, 0x65, 0x6c, 0x4d, 0x6f, 0x64, + 0x75, 0x6c, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x3d, 0x0a, 0x0c, 0x73, 0x69, 0x67, 0x6e, 0x61, + 0x74, 0x75, 0x72, 0x65, 0x5f, 0x6f, 0x6b, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, + 0x42, 0x6f, 0x6f, 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x0b, 0x73, 0x69, 0x67, 0x6e, 0x61, + 0x74, 0x75, 0x72, 0x65, 0x4f, 0x6b, 0x12, 0x33, 0x0a, 0x07, 0x74, 0x61, 0x69, 0x6e, 0x74, 0x65, + 0x64, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0e, 0x32, 0x19, 0x2e, 0x74, 0x65, 0x74, 0x72, 0x61, 0x67, + 0x6f, 0x6e, 0x2e, 0x54, 0x61, 0x69, 0x6e, 0x74, 0x65, 0x64, 0x42, 0x69, 0x74, 0x73, 0x54, 0x79, + 0x70, 0x65, 0x52, 0x07, 0x74, 0x61, 0x69, 0x6e, 0x74, 0x65, 0x64, 0x22, 0x56, 0x0a, 0x04, 0x54, + 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x61, 0x72, 0x67, 0x30, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x04, 0x52, 0x04, 0x61, 0x72, 0x67, 0x30, 0x12, 0x12, 0x0a, 0x04, 0x61, 0x72, 0x67, 0x31, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x04, 0x61, 0x72, 0x67, 0x31, 0x12, 0x12, 0x0a, 0x04, 0x61, + 0x72, 0x67, 0x32, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x04, 0x61, 0x72, 0x67, 0x32, 0x12, + 0x12, 0x0a, 0x04, 0x61, 0x72, 0x67, 0x33, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x52, 0x04, 0x61, + 0x72, 0x67, 0x33, 0x22, 0x51, 0x0a, 0x16, 0x47, 0x65, 0x74, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, + 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x37, 0x0a, + 0x09, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x5f, 0x73, 0x65, 0x74, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0e, + 0x32, 0x1a, 0x2e, 0x74, 0x65, 0x74, 0x72, 0x61, 0x67, 0x6f, 0x6e, 0x2e, 0x48, 0x65, 0x61, 0x6c, + 0x74, 0x68, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x54, 0x79, 0x70, 0x65, 0x52, 0x08, 0x65, 0x76, + 0x65, 0x6e, 0x74, 0x53, 0x65, 0x74, 0x22, 0x90, 0x01, 0x0a, 0x0c, 0x48, 0x65, 0x61, 0x6c, 0x74, + 0x68, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x30, 0x0a, 0x05, 0x65, 0x76, 0x65, 0x6e, 0x74, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1a, 0x2e, 0x74, 0x65, 0x74, 0x72, 0x61, 0x67, 0x6f, + 0x6e, 0x2e, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x54, 0x79, + 0x70, 0x65, 0x52, 0x05, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x34, 0x0a, 0x06, 0x73, 0x74, 0x61, + 0x74, 0x75, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1c, 0x2e, 0x74, 0x65, 0x74, 0x72, + 0x61, 0x67, 0x6f, 0x6e, 0x2e, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x53, 0x74, 0x61, 0x74, 0x75, + 0x73, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, + 0x18, 0x0a, 0x07, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x07, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x22, 0x56, 0x0a, 0x17, 0x47, 0x65, 0x74, + 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3b, 0x0a, 0x0d, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x5f, 0x73, + 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x74, 0x65, + 0x74, 0x72, 0x61, 0x67, 0x6f, 0x6e, 0x2e, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x53, 0x74, 0x61, + 0x74, 0x75, 0x73, 0x52, 0x0c, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x53, 0x74, 0x61, 0x74, 0x75, + 0x73, 0x22, 0x6a, 0x0a, 0x0d, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x4c, 0x6f, 0x61, 0x64, + 0x65, 0x72, 0x12, 0x2b, 0x0a, 0x07, 0x70, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x74, 0x65, 0x74, 0x72, 0x61, 0x67, 0x6f, 0x6e, 0x2e, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x52, 0x07, 0x70, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x12, - 0x29, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x11, 0x2e, 0x74, 0x65, 0x74, 0x72, 0x61, 0x67, 0x6f, 0x6e, 0x2e, 0x50, 0x72, 0x6f, 0x63, 0x65, - 0x73, 0x73, 0x52, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x75, - 0x62, 0x73, 0x79, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x75, 0x62, 0x73, - 0x79, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x05, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x2c, 0x0a, 0x04, 0x61, 0x72, 0x67, 0x73, - 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x74, 0x65, 0x74, 0x72, 0x61, 0x67, 0x6f, - 0x6e, 0x2e, 0x4b, 0x70, 0x72, 0x6f, 0x62, 0x65, 0x41, 0x72, 0x67, 0x75, 0x6d, 0x65, 0x6e, 0x74, - 0x52, 0x04, 0x61, 0x72, 0x67, 0x73, 0x12, 0x1f, 0x0a, 0x0b, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, - 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x70, 0x6f, 0x6c, - 0x69, 0x63, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x2e, 0x0a, 0x06, 0x61, 0x63, 0x74, 0x69, 0x6f, - 0x6e, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x16, 0x2e, 0x74, 0x65, 0x74, 0x72, 0x61, 0x67, - 0x6f, 0x6e, 0x2e, 0x4b, 0x70, 0x72, 0x6f, 0x62, 0x65, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, - 0x06, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, - 0x67, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, - 0x65, 0x22, 0xfc, 0x01, 0x0a, 0x0d, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x55, 0x70, 0x72, - 0x6f, 0x62, 0x65, 0x12, 0x2b, 0x0a, 0x07, 0x70, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x74, 0x65, 0x74, 0x72, 0x61, 0x67, 0x6f, 0x6e, 0x2e, - 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x52, 0x07, 0x70, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, - 0x12, 0x29, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x11, 0x2e, 0x74, 0x65, 0x74, 0x72, 0x61, 0x67, 0x6f, 0x6e, 0x2e, 0x50, 0x72, 0x6f, 0x63, - 0x65, 0x73, 0x73, 0x52, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x70, - 0x61, 0x74, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x12, - 0x16, 0x0a, 0x06, 0x73, 0x79, 0x6d, 0x62, 0x6f, 0x6c, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x06, 0x73, 0x79, 0x6d, 0x62, 0x6f, 0x6c, 0x12, 0x1f, 0x0a, 0x0b, 0x70, 0x6f, 0x6c, 0x69, 0x63, - 0x79, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x70, 0x6f, - 0x6c, 0x69, 0x63, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, - 0x61, 0x67, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, - 0x67, 0x65, 0x12, 0x2c, 0x0a, 0x04, 0x61, 0x72, 0x67, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, - 0x32, 0x18, 0x2e, 0x74, 0x65, 0x74, 0x72, 0x61, 0x67, 0x6f, 0x6e, 0x2e, 0x4b, 0x70, 0x72, 0x6f, - 0x62, 0x65, 0x41, 0x72, 0x67, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x04, 0x61, 0x72, 0x67, 0x73, - 0x22, 0x96, 0x01, 0x0a, 0x0c, 0x4b, 0x65, 0x72, 0x6e, 0x65, 0x6c, 0x4d, 0x6f, 0x64, 0x75, 0x6c, - 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x3d, 0x0a, 0x0c, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, - 0x72, 0x65, 0x5f, 0x6f, 0x6b, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, - 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x42, 0x6f, - 0x6f, 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x0b, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, - 0x72, 0x65, 0x4f, 0x6b, 0x12, 0x33, 0x0a, 0x07, 0x74, 0x61, 0x69, 0x6e, 0x74, 0x65, 0x64, 0x18, - 0x03, 0x20, 0x03, 0x28, 0x0e, 0x32, 0x19, 0x2e, 0x74, 0x65, 0x74, 0x72, 0x61, 0x67, 0x6f, 0x6e, - 0x2e, 0x54, 0x61, 0x69, 0x6e, 0x74, 0x65, 0x64, 0x42, 0x69, 0x74, 0x73, 0x54, 0x79, 0x70, 0x65, - 0x52, 0x07, 0x74, 0x61, 0x69, 0x6e, 0x74, 0x65, 0x64, 0x22, 0x56, 0x0a, 0x04, 0x54, 0x65, 0x73, - 0x74, 0x12, 0x12, 0x0a, 0x04, 0x61, 0x72, 0x67, 0x30, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, - 0x04, 0x61, 0x72, 0x67, 0x30, 0x12, 0x12, 0x0a, 0x04, 0x61, 0x72, 0x67, 0x31, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x04, 0x52, 0x04, 0x61, 0x72, 0x67, 0x31, 0x12, 0x12, 0x0a, 0x04, 0x61, 0x72, 0x67, - 0x32, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x04, 0x61, 0x72, 0x67, 0x32, 0x12, 0x12, 0x0a, - 0x04, 0x61, 0x72, 0x67, 0x33, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x52, 0x04, 0x61, 0x72, 0x67, - 0x33, 0x22, 0x51, 0x0a, 0x16, 0x47, 0x65, 0x74, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x53, 0x74, - 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x37, 0x0a, 0x09, 0x65, - 0x76, 0x65, 0x6e, 0x74, 0x5f, 0x73, 0x65, 0x74, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0e, 0x32, 0x1a, - 0x2e, 0x74, 0x65, 0x74, 0x72, 0x61, 0x67, 0x6f, 0x6e, 0x2e, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, - 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x54, 0x79, 0x70, 0x65, 0x52, 0x08, 0x65, 0x76, 0x65, 0x6e, - 0x74, 0x53, 0x65, 0x74, 0x22, 0x90, 0x01, 0x0a, 0x0c, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x53, - 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x30, 0x0a, 0x05, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1a, 0x2e, 0x74, 0x65, 0x74, 0x72, 0x61, 0x67, 0x6f, 0x6e, 0x2e, - 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x54, 0x79, 0x70, 0x65, - 0x52, 0x05, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x34, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, - 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1c, 0x2e, 0x74, 0x65, 0x74, 0x72, 0x61, 0x67, - 0x6f, 0x6e, 0x2e, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, - 0x65, 0x73, 0x75, 0x6c, 0x74, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x18, 0x0a, - 0x07, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, - 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x22, 0x56, 0x0a, 0x17, 0x47, 0x65, 0x74, 0x48, 0x65, - 0x61, 0x6c, 0x74, 0x68, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x12, 0x3b, 0x0a, 0x0d, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x5f, 0x73, 0x74, 0x61, - 0x74, 0x75, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x74, 0x65, 0x74, 0x72, - 0x61, 0x67, 0x6f, 0x6e, 0x2e, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x53, 0x74, 0x61, 0x74, 0x75, - 0x73, 0x52, 0x0c, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, - 0x6a, 0x0a, 0x0d, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x4c, 0x6f, 0x61, 0x64, 0x65, 0x72, - 0x12, 0x2b, 0x0a, 0x07, 0x70, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x11, 0x2e, 0x74, 0x65, 0x74, 0x72, 0x61, 0x67, 0x6f, 0x6e, 0x2e, 0x50, 0x72, 0x6f, - 0x63, 0x65, 0x73, 0x73, 0x52, 0x07, 0x70, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x12, 0x12, 0x0a, - 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x70, 0x61, 0x74, - 0x68, 0x12, 0x18, 0x0a, 0x07, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x0c, 0x52, 0x07, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x69, 0x64, 0x22, 0x64, 0x0a, 0x12, 0x52, - 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x48, 0x6f, 0x6f, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x12, 0x45, 0x0a, 0x0f, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x61, - 0x69, 0x6e, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x74, 0x65, 0x74, - 0x72, 0x61, 0x67, 0x6f, 0x6e, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x74, - 0x61, 0x69, 0x6e, 0x65, 0x72, 0x48, 0x00, 0x52, 0x0f, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x43, - 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x42, 0x07, 0x0a, 0x05, 0x65, 0x76, 0x65, 0x6e, - 0x74, 0x22, 0x15, 0x0a, 0x13, 0x52, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x48, 0x6f, 0x6f, 0x6b, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xdb, 0x01, 0x0a, 0x0f, 0x43, 0x72, 0x65, - 0x61, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x12, 0x20, 0x0a, 0x0b, - 0x63, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x50, 0x61, 0x74, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x0b, 0x63, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x50, 0x61, 0x74, 0x68, 0x12, 0x18, - 0x0a, 0x07, 0x72, 0x6f, 0x6f, 0x74, 0x44, 0x69, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x07, 0x72, 0x6f, 0x6f, 0x74, 0x44, 0x69, 0x72, 0x12, 0x4c, 0x0a, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, - 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2a, 0x2e, - 0x74, 0x65, 0x74, 0x72, 0x61, 0x67, 0x6f, 0x6e, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x43, - 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x2e, 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x1a, 0x3e, 0x0a, 0x10, 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, - 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, - 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, - 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x5b, 0x0a, 0x0f, 0x53, 0x74, 0x61, 0x63, 0x6b, 0x54, - 0x72, 0x61, 0x63, 0x65, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x64, 0x64, - 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, - 0x65, 0x73, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x04, 0x52, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x73, - 0x79, 0x6d, 0x62, 0x6f, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x79, 0x6d, - 0x62, 0x6f, 0x6c, 0x2a, 0x95, 0x03, 0x0a, 0x0c, 0x4b, 0x70, 0x72, 0x6f, 0x62, 0x65, 0x41, 0x63, - 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x19, 0x0a, 0x15, 0x4b, 0x50, 0x52, 0x4f, 0x42, 0x45, 0x5f, 0x41, - 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, - 0x16, 0x0a, 0x12, 0x4b, 0x50, 0x52, 0x4f, 0x42, 0x45, 0x5f, 0x41, 0x43, 0x54, 0x49, 0x4f, 0x4e, - 0x5f, 0x50, 0x4f, 0x53, 0x54, 0x10, 0x01, 0x12, 0x1a, 0x0a, 0x16, 0x4b, 0x50, 0x52, 0x4f, 0x42, - 0x45, 0x5f, 0x41, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x46, 0x4f, 0x4c, 0x4c, 0x4f, 0x57, 0x46, - 0x44, 0x10, 0x02, 0x12, 0x19, 0x0a, 0x15, 0x4b, 0x50, 0x52, 0x4f, 0x42, 0x45, 0x5f, 0x41, 0x43, - 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x53, 0x49, 0x47, 0x4b, 0x49, 0x4c, 0x4c, 0x10, 0x03, 0x12, 0x1c, - 0x0a, 0x18, 0x4b, 0x50, 0x52, 0x4f, 0x42, 0x45, 0x5f, 0x41, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x5f, - 0x55, 0x4e, 0x46, 0x4f, 0x4c, 0x4c, 0x4f, 0x57, 0x46, 0x44, 0x10, 0x04, 0x12, 0x1a, 0x0a, 0x16, - 0x4b, 0x50, 0x52, 0x4f, 0x42, 0x45, 0x5f, 0x41, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x4f, 0x56, - 0x45, 0x52, 0x52, 0x49, 0x44, 0x45, 0x10, 0x05, 0x12, 0x18, 0x0a, 0x14, 0x4b, 0x50, 0x52, 0x4f, - 0x42, 0x45, 0x5f, 0x41, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x43, 0x4f, 0x50, 0x59, 0x46, 0x44, - 0x10, 0x06, 0x12, 0x18, 0x0a, 0x14, 0x4b, 0x50, 0x52, 0x4f, 0x42, 0x45, 0x5f, 0x41, 0x43, 0x54, - 0x49, 0x4f, 0x4e, 0x5f, 0x47, 0x45, 0x54, 0x55, 0x52, 0x4c, 0x10, 0x07, 0x12, 0x1b, 0x0a, 0x17, - 0x4b, 0x50, 0x52, 0x4f, 0x42, 0x45, 0x5f, 0x41, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x44, 0x4e, - 0x53, 0x4c, 0x4f, 0x4f, 0x4b, 0x55, 0x50, 0x10, 0x08, 0x12, 0x18, 0x0a, 0x14, 0x4b, 0x50, 0x52, - 0x4f, 0x42, 0x45, 0x5f, 0x41, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x4e, 0x4f, 0x50, 0x4f, 0x53, - 0x54, 0x10, 0x09, 0x12, 0x18, 0x0a, 0x14, 0x4b, 0x50, 0x52, 0x4f, 0x42, 0x45, 0x5f, 0x41, 0x43, - 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x53, 0x49, 0x47, 0x4e, 0x41, 0x4c, 0x10, 0x0a, 0x12, 0x1b, 0x0a, - 0x17, 0x4b, 0x50, 0x52, 0x4f, 0x42, 0x45, 0x5f, 0x41, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x54, - 0x52, 0x41, 0x43, 0x4b, 0x53, 0x4f, 0x43, 0x4b, 0x10, 0x0b, 0x12, 0x1d, 0x0a, 0x19, 0x4b, 0x50, - 0x52, 0x4f, 0x42, 0x45, 0x5f, 0x41, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x55, 0x4e, 0x54, 0x52, - 0x41, 0x43, 0x4b, 0x53, 0x4f, 0x43, 0x4b, 0x10, 0x0c, 0x12, 0x20, 0x0a, 0x1c, 0x4b, 0x50, 0x52, - 0x4f, 0x42, 0x45, 0x5f, 0x41, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x4e, 0x4f, 0x54, 0x49, 0x46, - 0x59, 0x45, 0x4e, 0x46, 0x4f, 0x52, 0x43, 0x45, 0x52, 0x10, 0x0d, 0x2a, 0x4f, 0x0a, 0x10, 0x48, - 0x65, 0x61, 0x6c, 0x74, 0x68, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x54, 0x79, 0x70, 0x65, 0x12, - 0x1c, 0x0a, 0x18, 0x48, 0x45, 0x41, 0x4c, 0x54, 0x48, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, - 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x44, 0x45, 0x46, 0x10, 0x00, 0x12, 0x1d, 0x0a, - 0x19, 0x48, 0x45, 0x41, 0x4c, 0x54, 0x48, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x54, - 0x59, 0x50, 0x45, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x10, 0x01, 0x2a, 0x7c, 0x0a, 0x12, - 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x75, - 0x6c, 0x74, 0x12, 0x17, 0x0a, 0x13, 0x48, 0x45, 0x41, 0x4c, 0x54, 0x48, 0x5f, 0x53, 0x54, 0x41, - 0x54, 0x55, 0x53, 0x5f, 0x55, 0x4e, 0x44, 0x45, 0x46, 0x10, 0x00, 0x12, 0x19, 0x0a, 0x15, 0x48, - 0x45, 0x41, 0x4c, 0x54, 0x48, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x52, 0x55, 0x4e, - 0x4e, 0x49, 0x4e, 0x47, 0x10, 0x01, 0x12, 0x19, 0x0a, 0x15, 0x48, 0x45, 0x41, 0x4c, 0x54, 0x48, - 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x53, 0x54, 0x4f, 0x50, 0x50, 0x45, 0x44, 0x10, - 0x02, 0x12, 0x17, 0x0a, 0x13, 0x48, 0x45, 0x41, 0x4c, 0x54, 0x48, 0x5f, 0x53, 0x54, 0x41, 0x54, - 0x55, 0x53, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x10, 0x03, 0x2a, 0x8d, 0x02, 0x0a, 0x0f, 0x54, - 0x61, 0x69, 0x6e, 0x74, 0x65, 0x64, 0x42, 0x69, 0x74, 0x73, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0f, - 0x0a, 0x0b, 0x54, 0x41, 0x49, 0x4e, 0x54, 0x5f, 0x55, 0x4e, 0x53, 0x45, 0x54, 0x10, 0x00, 0x12, - 0x1c, 0x0a, 0x18, 0x54, 0x41, 0x49, 0x4e, 0x54, 0x5f, 0x50, 0x52, 0x4f, 0x50, 0x52, 0x49, 0x45, - 0x54, 0x41, 0x52, 0x59, 0x5f, 0x4d, 0x4f, 0x44, 0x55, 0x4c, 0x45, 0x10, 0x01, 0x12, 0x17, 0x0a, - 0x13, 0x54, 0x41, 0x49, 0x4e, 0x54, 0x5f, 0x46, 0x4f, 0x52, 0x43, 0x45, 0x44, 0x5f, 0x4d, 0x4f, - 0x44, 0x55, 0x4c, 0x45, 0x10, 0x02, 0x12, 0x1e, 0x0a, 0x1a, 0x54, 0x41, 0x49, 0x4e, 0x54, 0x5f, - 0x46, 0x4f, 0x52, 0x43, 0x45, 0x44, 0x5f, 0x55, 0x4e, 0x4c, 0x4f, 0x41, 0x44, 0x5f, 0x4d, 0x4f, - 0x44, 0x55, 0x4c, 0x45, 0x10, 0x04, 0x12, 0x18, 0x0a, 0x13, 0x54, 0x41, 0x49, 0x4e, 0x54, 0x5f, - 0x53, 0x54, 0x41, 0x47, 0x45, 0x44, 0x5f, 0x4d, 0x4f, 0x44, 0x55, 0x4c, 0x45, 0x10, 0x80, 0x08, - 0x12, 0x1d, 0x0a, 0x18, 0x54, 0x41, 0x49, 0x4e, 0x54, 0x5f, 0x4f, 0x55, 0x54, 0x5f, 0x4f, 0x46, - 0x5f, 0x54, 0x52, 0x45, 0x45, 0x5f, 0x4d, 0x4f, 0x44, 0x55, 0x4c, 0x45, 0x10, 0x80, 0x20, 0x12, - 0x1a, 0x0a, 0x15, 0x54, 0x41, 0x49, 0x4e, 0x54, 0x5f, 0x55, 0x4e, 0x53, 0x49, 0x47, 0x4e, 0x45, - 0x44, 0x5f, 0x4d, 0x4f, 0x44, 0x55, 0x4c, 0x45, 0x10, 0x80, 0x40, 0x12, 0x24, 0x0a, 0x1e, 0x54, - 0x41, 0x49, 0x4e, 0x54, 0x5f, 0x4b, 0x45, 0x52, 0x4e, 0x45, 0x4c, 0x5f, 0x4c, 0x49, 0x56, 0x45, - 0x5f, 0x50, 0x41, 0x54, 0x43, 0x48, 0x5f, 0x4d, 0x4f, 0x44, 0x55, 0x4c, 0x45, 0x10, 0x80, 0x80, - 0x02, 0x12, 0x17, 0x0a, 0x11, 0x54, 0x41, 0x49, 0x4e, 0x54, 0x5f, 0x54, 0x45, 0x53, 0x54, 0x5f, - 0x4d, 0x4f, 0x44, 0x55, 0x4c, 0x45, 0x10, 0x80, 0x80, 0x10, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x33, + 0x12, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x70, + 0x61, 0x74, 0x68, 0x12, 0x18, 0x0a, 0x07, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x69, 0x64, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x69, 0x64, 0x22, 0x64, 0x0a, + 0x12, 0x52, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x48, 0x6f, 0x6f, 0x6b, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x12, 0x45, 0x0a, 0x0f, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x43, 0x6f, 0x6e, + 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x74, + 0x65, 0x74, 0x72, 0x61, 0x67, 0x6f, 0x6e, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x43, 0x6f, + 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x48, 0x00, 0x52, 0x0f, 0x63, 0x72, 0x65, 0x61, 0x74, + 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x42, 0x07, 0x0a, 0x05, 0x65, 0x76, + 0x65, 0x6e, 0x74, 0x22, 0x15, 0x0a, 0x13, 0x52, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x48, 0x6f, + 0x6f, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xdb, 0x01, 0x0a, 0x0f, 0x43, + 0x72, 0x65, 0x61, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x12, 0x20, + 0x0a, 0x0b, 0x63, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x50, 0x61, 0x74, 0x68, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x0b, 0x63, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x50, 0x61, 0x74, 0x68, + 0x12, 0x18, 0x0a, 0x07, 0x72, 0x6f, 0x6f, 0x74, 0x44, 0x69, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x07, 0x72, 0x6f, 0x6f, 0x74, 0x44, 0x69, 0x72, 0x12, 0x4c, 0x0a, 0x0b, 0x61, 0x6e, + 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x2a, 0x2e, 0x74, 0x65, 0x74, 0x72, 0x61, 0x67, 0x6f, 0x6e, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, + 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x2e, 0x41, 0x6e, 0x6e, 0x6f, 0x74, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0b, 0x61, 0x6e, 0x6e, + 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x1a, 0x3e, 0x0a, 0x10, 0x41, 0x6e, 0x6e, 0x6f, + 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, + 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, + 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, + 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x73, 0x0a, 0x0f, 0x53, 0x74, 0x61, 0x63, + 0x6b, 0x54, 0x72, 0x61, 0x63, 0x65, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x18, 0x0a, 0x07, 0x61, + 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x07, 0x61, 0x64, + 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x12, 0x16, 0x0a, + 0x06, 0x73, 0x79, 0x6d, 0x62, 0x6f, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, + 0x79, 0x6d, 0x62, 0x6f, 0x6c, 0x12, 0x16, 0x0a, 0x06, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x18, + 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2a, 0x95, 0x03, + 0x0a, 0x0c, 0x4b, 0x70, 0x72, 0x6f, 0x62, 0x65, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x19, + 0x0a, 0x15, 0x4b, 0x50, 0x52, 0x4f, 0x42, 0x45, 0x5f, 0x41, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x5f, + 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x16, 0x0a, 0x12, 0x4b, 0x50, 0x52, + 0x4f, 0x42, 0x45, 0x5f, 0x41, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x50, 0x4f, 0x53, 0x54, 0x10, + 0x01, 0x12, 0x1a, 0x0a, 0x16, 0x4b, 0x50, 0x52, 0x4f, 0x42, 0x45, 0x5f, 0x41, 0x43, 0x54, 0x49, + 0x4f, 0x4e, 0x5f, 0x46, 0x4f, 0x4c, 0x4c, 0x4f, 0x57, 0x46, 0x44, 0x10, 0x02, 0x12, 0x19, 0x0a, + 0x15, 0x4b, 0x50, 0x52, 0x4f, 0x42, 0x45, 0x5f, 0x41, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x53, + 0x49, 0x47, 0x4b, 0x49, 0x4c, 0x4c, 0x10, 0x03, 0x12, 0x1c, 0x0a, 0x18, 0x4b, 0x50, 0x52, 0x4f, + 0x42, 0x45, 0x5f, 0x41, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x55, 0x4e, 0x46, 0x4f, 0x4c, 0x4c, + 0x4f, 0x57, 0x46, 0x44, 0x10, 0x04, 0x12, 0x1a, 0x0a, 0x16, 0x4b, 0x50, 0x52, 0x4f, 0x42, 0x45, + 0x5f, 0x41, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x4f, 0x56, 0x45, 0x52, 0x52, 0x49, 0x44, 0x45, + 0x10, 0x05, 0x12, 0x18, 0x0a, 0x14, 0x4b, 0x50, 0x52, 0x4f, 0x42, 0x45, 0x5f, 0x41, 0x43, 0x54, + 0x49, 0x4f, 0x4e, 0x5f, 0x43, 0x4f, 0x50, 0x59, 0x46, 0x44, 0x10, 0x06, 0x12, 0x18, 0x0a, 0x14, + 0x4b, 0x50, 0x52, 0x4f, 0x42, 0x45, 0x5f, 0x41, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x47, 0x45, + 0x54, 0x55, 0x52, 0x4c, 0x10, 0x07, 0x12, 0x1b, 0x0a, 0x17, 0x4b, 0x50, 0x52, 0x4f, 0x42, 0x45, + 0x5f, 0x41, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x44, 0x4e, 0x53, 0x4c, 0x4f, 0x4f, 0x4b, 0x55, + 0x50, 0x10, 0x08, 0x12, 0x18, 0x0a, 0x14, 0x4b, 0x50, 0x52, 0x4f, 0x42, 0x45, 0x5f, 0x41, 0x43, + 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x4e, 0x4f, 0x50, 0x4f, 0x53, 0x54, 0x10, 0x09, 0x12, 0x18, 0x0a, + 0x14, 0x4b, 0x50, 0x52, 0x4f, 0x42, 0x45, 0x5f, 0x41, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x53, + 0x49, 0x47, 0x4e, 0x41, 0x4c, 0x10, 0x0a, 0x12, 0x1b, 0x0a, 0x17, 0x4b, 0x50, 0x52, 0x4f, 0x42, + 0x45, 0x5f, 0x41, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x54, 0x52, 0x41, 0x43, 0x4b, 0x53, 0x4f, + 0x43, 0x4b, 0x10, 0x0b, 0x12, 0x1d, 0x0a, 0x19, 0x4b, 0x50, 0x52, 0x4f, 0x42, 0x45, 0x5f, 0x41, + 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x55, 0x4e, 0x54, 0x52, 0x41, 0x43, 0x4b, 0x53, 0x4f, 0x43, + 0x4b, 0x10, 0x0c, 0x12, 0x20, 0x0a, 0x1c, 0x4b, 0x50, 0x52, 0x4f, 0x42, 0x45, 0x5f, 0x41, 0x43, + 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x4e, 0x4f, 0x54, 0x49, 0x46, 0x59, 0x45, 0x4e, 0x46, 0x4f, 0x52, + 0x43, 0x45, 0x52, 0x10, 0x0d, 0x2a, 0x4f, 0x0a, 0x10, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x53, + 0x74, 0x61, 0x74, 0x75, 0x73, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1c, 0x0a, 0x18, 0x48, 0x45, 0x41, + 0x4c, 0x54, 0x48, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, + 0x55, 0x4e, 0x44, 0x45, 0x46, 0x10, 0x00, 0x12, 0x1d, 0x0a, 0x19, 0x48, 0x45, 0x41, 0x4c, 0x54, + 0x48, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x53, 0x54, + 0x41, 0x54, 0x55, 0x53, 0x10, 0x01, 0x2a, 0x7c, 0x0a, 0x12, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, + 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x17, 0x0a, 0x13, + 0x48, 0x45, 0x41, 0x4c, 0x54, 0x48, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x55, 0x4e, + 0x44, 0x45, 0x46, 0x10, 0x00, 0x12, 0x19, 0x0a, 0x15, 0x48, 0x45, 0x41, 0x4c, 0x54, 0x48, 0x5f, + 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x52, 0x55, 0x4e, 0x4e, 0x49, 0x4e, 0x47, 0x10, 0x01, + 0x12, 0x19, 0x0a, 0x15, 0x48, 0x45, 0x41, 0x4c, 0x54, 0x48, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, + 0x53, 0x5f, 0x53, 0x54, 0x4f, 0x50, 0x50, 0x45, 0x44, 0x10, 0x02, 0x12, 0x17, 0x0a, 0x13, 0x48, + 0x45, 0x41, 0x4c, 0x54, 0x48, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x45, 0x52, 0x52, + 0x4f, 0x52, 0x10, 0x03, 0x2a, 0x8d, 0x02, 0x0a, 0x0f, 0x54, 0x61, 0x69, 0x6e, 0x74, 0x65, 0x64, + 0x42, 0x69, 0x74, 0x73, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0f, 0x0a, 0x0b, 0x54, 0x41, 0x49, 0x4e, + 0x54, 0x5f, 0x55, 0x4e, 0x53, 0x45, 0x54, 0x10, 0x00, 0x12, 0x1c, 0x0a, 0x18, 0x54, 0x41, 0x49, + 0x4e, 0x54, 0x5f, 0x50, 0x52, 0x4f, 0x50, 0x52, 0x49, 0x45, 0x54, 0x41, 0x52, 0x59, 0x5f, 0x4d, + 0x4f, 0x44, 0x55, 0x4c, 0x45, 0x10, 0x01, 0x12, 0x17, 0x0a, 0x13, 0x54, 0x41, 0x49, 0x4e, 0x54, + 0x5f, 0x46, 0x4f, 0x52, 0x43, 0x45, 0x44, 0x5f, 0x4d, 0x4f, 0x44, 0x55, 0x4c, 0x45, 0x10, 0x02, + 0x12, 0x1e, 0x0a, 0x1a, 0x54, 0x41, 0x49, 0x4e, 0x54, 0x5f, 0x46, 0x4f, 0x52, 0x43, 0x45, 0x44, + 0x5f, 0x55, 0x4e, 0x4c, 0x4f, 0x41, 0x44, 0x5f, 0x4d, 0x4f, 0x44, 0x55, 0x4c, 0x45, 0x10, 0x04, + 0x12, 0x18, 0x0a, 0x13, 0x54, 0x41, 0x49, 0x4e, 0x54, 0x5f, 0x53, 0x54, 0x41, 0x47, 0x45, 0x44, + 0x5f, 0x4d, 0x4f, 0x44, 0x55, 0x4c, 0x45, 0x10, 0x80, 0x08, 0x12, 0x1d, 0x0a, 0x18, 0x54, 0x41, + 0x49, 0x4e, 0x54, 0x5f, 0x4f, 0x55, 0x54, 0x5f, 0x4f, 0x46, 0x5f, 0x54, 0x52, 0x45, 0x45, 0x5f, + 0x4d, 0x4f, 0x44, 0x55, 0x4c, 0x45, 0x10, 0x80, 0x20, 0x12, 0x1a, 0x0a, 0x15, 0x54, 0x41, 0x49, + 0x4e, 0x54, 0x5f, 0x55, 0x4e, 0x53, 0x49, 0x47, 0x4e, 0x45, 0x44, 0x5f, 0x4d, 0x4f, 0x44, 0x55, + 0x4c, 0x45, 0x10, 0x80, 0x40, 0x12, 0x24, 0x0a, 0x1e, 0x54, 0x41, 0x49, 0x4e, 0x54, 0x5f, 0x4b, + 0x45, 0x52, 0x4e, 0x45, 0x4c, 0x5f, 0x4c, 0x49, 0x56, 0x45, 0x5f, 0x50, 0x41, 0x54, 0x43, 0x48, + 0x5f, 0x4d, 0x4f, 0x44, 0x55, 0x4c, 0x45, 0x10, 0x80, 0x80, 0x02, 0x12, 0x17, 0x0a, 0x11, 0x54, + 0x41, 0x49, 0x4e, 0x54, 0x5f, 0x54, 0x45, 0x53, 0x54, 0x5f, 0x4d, 0x4f, 0x44, 0x55, 0x4c, 0x45, + 0x10, 0x80, 0x80, 0x10, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -4656,29 +4680,30 @@ var file_tetragon_tetragon_proto_depIdxs = []int32{ 30, // 80: tetragon.ProcessKprobe.args:type_name -> tetragon.KprobeArgument 30, // 81: tetragon.ProcessKprobe.return:type_name -> tetragon.KprobeArgument 0, // 82: tetragon.ProcessKprobe.action:type_name -> tetragon.KprobeAction - 43, // 83: tetragon.ProcessKprobe.stack_trace:type_name -> tetragon.StackTraceEntry + 43, // 83: tetragon.ProcessKprobe.kernel_stack_trace:type_name -> tetragon.StackTraceEntry 0, // 84: tetragon.ProcessKprobe.return_action:type_name -> tetragon.KprobeAction - 15, // 85: tetragon.ProcessTracepoint.process:type_name -> tetragon.Process - 15, // 86: tetragon.ProcessTracepoint.parent:type_name -> tetragon.Process - 30, // 87: tetragon.ProcessTracepoint.args:type_name -> tetragon.KprobeArgument - 0, // 88: tetragon.ProcessTracepoint.action:type_name -> tetragon.KprobeAction - 15, // 89: tetragon.ProcessUprobe.process:type_name -> tetragon.Process - 15, // 90: tetragon.ProcessUprobe.parent:type_name -> tetragon.Process - 30, // 91: tetragon.ProcessUprobe.args:type_name -> tetragon.KprobeArgument - 52, // 92: tetragon.KernelModule.signature_ok:type_name -> google.protobuf.BoolValue - 3, // 93: tetragon.KernelModule.tainted:type_name -> tetragon.TaintedBitsType - 1, // 94: tetragon.GetHealthStatusRequest.event_set:type_name -> tetragon.HealthStatusType - 1, // 95: tetragon.HealthStatus.event:type_name -> tetragon.HealthStatusType - 2, // 96: tetragon.HealthStatus.status:type_name -> tetragon.HealthStatusResult - 37, // 97: tetragon.GetHealthStatusResponse.health_status:type_name -> tetragon.HealthStatus - 15, // 98: tetragon.ProcessLoader.process:type_name -> tetragon.Process - 42, // 99: tetragon.RuntimeHookRequest.createContainer:type_name -> tetragon.CreateContainer - 45, // 100: tetragon.CreateContainer.annotations:type_name -> tetragon.CreateContainer.AnnotationsEntry - 101, // [101:101] is the sub-list for method output_type - 101, // [101:101] is the sub-list for method input_type - 101, // [101:101] is the sub-list for extension type_name - 101, // [101:101] is the sub-list for extension extendee - 0, // [0:101] is the sub-list for field type_name + 43, // 85: tetragon.ProcessKprobe.user_stack_trace:type_name -> tetragon.StackTraceEntry + 15, // 86: tetragon.ProcessTracepoint.process:type_name -> tetragon.Process + 15, // 87: tetragon.ProcessTracepoint.parent:type_name -> tetragon.Process + 30, // 88: tetragon.ProcessTracepoint.args:type_name -> tetragon.KprobeArgument + 0, // 89: tetragon.ProcessTracepoint.action:type_name -> tetragon.KprobeAction + 15, // 90: tetragon.ProcessUprobe.process:type_name -> tetragon.Process + 15, // 91: tetragon.ProcessUprobe.parent:type_name -> tetragon.Process + 30, // 92: tetragon.ProcessUprobe.args:type_name -> tetragon.KprobeArgument + 52, // 93: tetragon.KernelModule.signature_ok:type_name -> google.protobuf.BoolValue + 3, // 94: tetragon.KernelModule.tainted:type_name -> tetragon.TaintedBitsType + 1, // 95: tetragon.GetHealthStatusRequest.event_set:type_name -> tetragon.HealthStatusType + 1, // 96: tetragon.HealthStatus.event:type_name -> tetragon.HealthStatusType + 2, // 97: tetragon.HealthStatus.status:type_name -> tetragon.HealthStatusResult + 37, // 98: tetragon.GetHealthStatusResponse.health_status:type_name -> tetragon.HealthStatus + 15, // 99: tetragon.ProcessLoader.process:type_name -> tetragon.Process + 42, // 100: tetragon.RuntimeHookRequest.createContainer:type_name -> tetragon.CreateContainer + 45, // 101: tetragon.CreateContainer.annotations:type_name -> tetragon.CreateContainer.AnnotationsEntry + 102, // [102:102] is the sub-list for method output_type + 102, // [102:102] is the sub-list for method input_type + 102, // [102:102] is the sub-list for extension type_name + 102, // [102:102] is the sub-list for extension extendee + 0, // [0:102] is the sub-list for field type_name } func init() { file_tetragon_tetragon_proto_init() } diff --git a/api/v1/tetragon/tetragon.proto b/api/v1/tetragon/tetragon.proto index a559086c616..d9989e62d19 100644 --- a/api/v1/tetragon/tetragon.proto +++ b/api/v1/tetragon/tetragon.proto @@ -454,13 +454,15 @@ message ProcessKprobe { // Action performed when the kprobe matched. KprobeAction action = 6; // Kernel stack trace to the call. - repeated StackTraceEntry stack_trace = 7; + repeated StackTraceEntry kernel_stack_trace = 7; // Name of the Tracing Policy that created that kprobe. string policy_name = 8; // Action performed when the return kprobe executed. KprobeAction return_action = 9; // Short message of the Tracing Policy to inform users what is going on. string message = 10; + // User-mode stack trace to the call. + repeated StackTraceEntry user_stack_trace = 11; } message ProcessTracepoint { @@ -601,10 +603,12 @@ message CreateContainer { } message StackTraceEntry { - // address is the kernel function address. + // linear address of the function in kernel or user space. uint64 address = 1; // offset is the offset into the native instructions for the function. uint64 offset = 2; // symbol is the symbol name of the function. string symbol = 3; + // module path for user space addresses. + string module = 4; } diff --git a/bpf/lib/common.h b/bpf/lib/common.h index 69c3dc6523c..8833f083e1f 100644 --- a/bpf/lib/common.h +++ b/bpf/lib/common.h @@ -5,7 +5,8 @@ /* msg_common internal flags */ #define MSG_COMMON_FLAG_RETURN BIT(0) -#define MSG_COMMON_FLAG_STACKTRACE BIT(1) +#define MSG_COMMON_FLAG_KERNEL_STACKTRACE BIT(1) +#define MSG_COMMON_FLAG_USER_STACKTRACE BIT(2) /* Msg Layout */ struct msg_common { diff --git a/bpf/lib/generic.h b/bpf/lib/generic.h index ea31582e04d..38d6e4c3acc 100644 --- a/bpf/lib/generic.h +++ b/bpf/lib/generic.h @@ -44,7 +44,8 @@ struct msg_generic_kprobe { __u64 action; __u32 action_arg_id; // only one URL or FQDN action can be fired per match __u32 tid; // Thread ID that triggered the event - __u64 stack_id; // Stack trace ID on u32 and potential error, see flag in msg_common.flags + __u64 kernel_stack_id; // Kernel stack trace ID on u32 and potential error, see flag in msg_common.flags + __u64 user_stack_id; // User Stack trace ID /* anything above is shared with the userspace so it should match structs MsgGenericKprobe and MsgGenericTracepoint in Go */ char args[24000]; unsigned long a0, a1, a2, a3, a4; diff --git a/bpf/process/types/basic.h b/bpf/process/types/basic.h index d479851fa11..7f895712ade 100644 --- a/bpf/process/types/basic.h +++ b/bpf/process/types/basic.h @@ -2253,18 +2253,25 @@ do_action(void *ctx, __u32 i, struct msg_generic_kprobe *e, if (rate_limit(ratelimit_interval, ratelimit_scope, e)) *post = false; #endif /* __LARGE_BPF_PROG */ - __u32 stack_trace = actions->act[++i]; + __u32 kernel_stack_trace = actions->act[++i]; - if (stack_trace) { + if (kernel_stack_trace) { // Stack id 0 is valid so we need a flag. - e->common.flags |= MSG_COMMON_FLAG_STACKTRACE; + e->common.flags |= MSG_COMMON_FLAG_KERNEL_STACKTRACE; // We could use BPF_F_REUSE_STACKID to override old with new stack if // same stack id. It means that if we have a collision and user space // reads the old one too late, we are reading the wrong stack (the new, // old one was overwritten). // // Here we just signal that there was a collision returning -EEXIST. - e->stack_id = get_stackid(ctx, &stack_trace_map, 0); + e->kernel_stack_id = get_stackid(ctx, &stack_trace_map, 0); + } + + __u32 user_stack_trace = actions->act[++i]; + + if (user_stack_trace) { + e->common.flags |= MSG_COMMON_FLAG_USER_STACKTRACE; + e->user_stack_id = get_stackid(ctx, &stack_trace_map, BPF_F_USER_STACK); } break; } diff --git a/contrib/rthooks/tetragon-oci-hook/vendor/github.com/cilium/tetragon/api/v1/tetragon/tetragon.proto b/contrib/rthooks/tetragon-oci-hook/vendor/github.com/cilium/tetragon/api/v1/tetragon/tetragon.proto index c4b493c6e49..af5f2450813 100644 --- a/contrib/rthooks/tetragon-oci-hook/vendor/github.com/cilium/tetragon/api/v1/tetragon/tetragon.proto +++ b/contrib/rthooks/tetragon-oci-hook/vendor/github.com/cilium/tetragon/api/v1/tetragon/tetragon.proto @@ -454,13 +454,15 @@ message ProcessKprobe { // Action performed when the kprobe matched. KprobeAction action = 6; // Kernel stack trace to the call. - repeated StackTraceEntry stack_trace = 7; + repeated StackTraceEntry kernel_stack_trace = 7; // Name of the Tracing Policy that created that kprobe. string policy_name = 8; // Action performed when the return kprobe executed. KprobeAction return_action = 9; // Short message of the Tracing Policy to inform users what is going on. string message = 10; + // User-space stack trace to the call. + repeated StackTraceEntry user_stack_trace = 11; } message ProcessTracepoint { diff --git a/docs/content/en/docs/concepts/tracing-policy/selectors.md b/docs/content/en/docs/concepts/tracing-policy/selectors.md index ad68f54788c..4821684b73b 100644 --- a/docs/content/en/docs/concepts/tracing-policy/selectors.md +++ b/docs/content/en/docs/concepts/tracing-policy/selectors.md @@ -832,9 +832,10 @@ can be expanded to all processes by specifying the same with the value "global". #### Stack traces -`Post` takes the `stackTrace` parameter, when turned to `true` (by default to +`Post` takes the `kernelStackTrace` parameter, when turned to `true` (by default to `false`) it enables dump of the kernel stack trace to the hook point in kprobes -events. For example, the following kprobe hook can be used to retrieve the +events. To dump user space stack trace set `userStackTrace` parameter to `true`. +For example, the following kprobe hook can be used to retrieve the kernel stack to `kfree_skb_reason`, the function called in the kernel to drop kernel socket buffers. @@ -844,7 +845,7 @@ kprobes: selectors: - matchActions: - action: Post - stackTrace: true + kernelStackTrace: true ``` {{< caution >}} diff --git a/docs/content/en/docs/reference/grpc-api.md b/docs/content/en/docs/reference/grpc-api.md index 911bf1ddd59..d899217b3d6 100644 --- a/docs/content/en/docs/reference/grpc-api.md +++ b/docs/content/en/docs/reference/grpc-api.md @@ -514,10 +514,11 @@ https://github.com/opencontainers/runtime-spec/blob/main/config.md#createcontain | args | [KprobeArgument](#tetragon-KprobeArgument) | repeated | Arguments definition of the observed kprobe. | | return | [KprobeArgument](#tetragon-KprobeArgument) | | Return value definition of the observed kprobe. | | action | [KprobeAction](#tetragon-KprobeAction) | | Action performed when the kprobe matched. | -| stack_trace | [StackTraceEntry](#tetragon-StackTraceEntry) | repeated | Kernel stack trace to the call. | +| kernel_stack_trace | [StackTraceEntry](#tetragon-StackTraceEntry) | repeated | Kernel stack trace to the call. | | policy_name | [string](#string) | | Name of the Tracing Policy that created that kprobe. | | return_action | [KprobeAction](#tetragon-KprobeAction) | | Action performed when the return kprobe executed. | | message | [string](#string) | | Short message of the Tracing Policy to inform users what is going on. | +| user_stack_trace | [StackTraceEntry](#tetragon-StackTraceEntry) | repeated | User-mode stack trace to the call. | @@ -578,9 +579,10 @@ RuntimeHookRequest synchronously propagates information to the agent about run-t | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| address | [uint64](#uint64) | | address is the kernel function address. | +| address | [uint64](#uint64) | | linear address of the function in kernel or user space. | | offset | [uint64](#uint64) | | offset is the offset into the native instructions for the function. | | symbol | [string](#string) | | symbol is the symbol name of the function. | +| module | [string](#string) | | module path for user space addresses. | diff --git a/docs/data/tetragon_flags.yaml b/docs/data/tetragon_flags.yaml index 42a5e5ddcee..6d85c8cd10d 100644 --- a/docs/data/tetragon_flags.yaml +++ b/docs/data/tetragon_flags.yaml @@ -94,9 +94,9 @@ options: default_value: "-1" usage: | Rate limit (per minute) for event export. Set to -1 to disable - - name: expose-kernel-addresses + - name: expose-addresses default_value: "false" - usage: Expose real kernel addresses in events stack traces + usage: Expose real linear addresses in events stack traces - name: field-filters usage: Field filters for event exports - name: force-large-progs diff --git a/examples/tracingpolicy/stack_traces.yaml b/examples/tracingpolicy/stack_traces.yaml index ca2eb6c2d94..9d19958eca1 100644 --- a/examples/tracingpolicy/stack_traces.yaml +++ b/examples/tracingpolicy/stack_traces.yaml @@ -15,4 +15,4 @@ spec: selectors: - matchActions: - action: Post - stackTrace: true + kernelStackTrace: true diff --git a/go.mod b/go.mod index d92ee3d345e..38230f0c6b8 100644 --- a/go.mod +++ b/go.mod @@ -32,6 +32,7 @@ require ( github.com/pkg/errors v0.9.1 github.com/prometheus/client_golang v1.19.0 github.com/prometheus/client_model v0.6.0 + github.com/prometheus/procfs v0.12.0 github.com/sirupsen/logrus v1.9.3 github.com/spf13/cobra v1.8.0 github.com/spf13/pflag v1.0.5 @@ -152,7 +153,6 @@ require ( github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c // indirect github.com/prometheus/common v0.48.0 // indirect - github.com/prometheus/procfs v0.12.0 // indirect github.com/rogpeppe/go-internal v1.11.0 // indirect github.com/russross/blackfriday/v2 v2.1.0 // indirect github.com/sagikazarmark/locafero v0.4.0 // indirect diff --git a/pkg/api/processapi/processapi.go b/pkg/api/processapi/processapi.go index dffcec3da15..372ad32f99a 100644 --- a/pkg/api/processapi/processapi.go +++ b/pkg/api/processapi/processapi.go @@ -40,8 +40,9 @@ const ( ExecveSetgidRoot = 0x10 // This binary execution gained new capabilities through setgid root execution // flags of MsgCommon - MSG_COMMON_FLAG_RETURN = 0x1 - MSG_COMMON_FLAG_STACKTRACE = 0x2 + MSG_COMMON_FLAG_RETURN = 0x1 + MSG_COMMON_FLAG_KERNEL_STACKTRACE = 0x2 + MSG_COMMON_FLAG_USER_STACKTRACE = 0x4 BINARY_PATH_MAX_LEN = 256 ) diff --git a/pkg/api/tracingapi/client_kprobe.go b/pkg/api/tracingapi/client_kprobe.go index 15e82770d96..da6c13702d1 100644 --- a/pkg/api/tracingapi/client_kprobe.go +++ b/pkg/api/tracingapi/client_kprobe.go @@ -44,16 +44,17 @@ type MsgLoader struct { } type MsgGenericKprobe struct { - Common processapi.MsgCommon - ProcessKey processapi.MsgExecveKey - Namespaces processapi.MsgNamespaces - Capabilities processapi.MsgCapabilities - FuncId uint64 - RetProbeId uint64 - ActionId uint64 - ActionArgId uint32 - Tid uint32 // The recorded TID that triggered the event - StackID int64 + Common processapi.MsgCommon + ProcessKey processapi.MsgExecveKey + Namespaces processapi.MsgNamespaces + Capabilities processapi.MsgCapabilities + FuncId uint64 + RetProbeId uint64 + ActionId uint64 + ActionArgId uint32 + Tid uint32 // The recorded TID that triggered the event + KernelStackID int64 + UserStackID int64 } type MsgGenericKprobeArgPath struct { diff --git a/pkg/api/tracingapi/client_tracepoint.go b/pkg/api/tracingapi/client_tracepoint.go index b35af3919d2..95875eebe2b 100644 --- a/pkg/api/tracingapi/client_tracepoint.go +++ b/pkg/api/tracingapi/client_tracepoint.go @@ -8,14 +8,15 @@ import "github.com/cilium/tetragon/pkg/api/processapi" type MsgGenericTracepointArg interface{} type MsgGenericTracepoint struct { - Common processapi.MsgCommon - ProcessKey processapi.MsgExecveKey - Namespaces processapi.MsgNamespaces - Capabilities processapi.MsgCapabilities - FuncId int64 - RetProbeId uint64 - ActionId uint64 - ActionArgId uint32 - Tid uint32 // The recorded TID that triggered the event - StackID int64 + Common processapi.MsgCommon + ProcessKey processapi.MsgExecveKey + Namespaces processapi.MsgNamespaces + Capabilities processapi.MsgCapabilities + FuncId int64 + RetProbeId uint64 + ActionId uint64 + ActionArgId uint32 + Tid uint32 // The recorded TID that triggered the event + KernelStackID int64 + UserStackID int64 } diff --git a/pkg/encoder/encoder.go b/pkg/encoder/encoder.go index 31336ab7a18..baf8172a9d5 100644 --- a/pkg/encoder/encoder.go +++ b/pkg/encoder/encoder.go @@ -201,14 +201,23 @@ func PrintNS(ns int32) string { func HumanStackTrace(response *tetragon.GetEventsResponse, colorer *Colorer) string { out := new(strings.Builder) if ev, ok := response.Event.(*tetragon.GetEventsResponse_ProcessKprobe); ok { - if ev.ProcessKprobe.StackTrace != nil { - for _, st := range ev.ProcessKprobe.StackTrace { + if ev.ProcessKprobe.KernelStackTrace != nil { + fmt.Fprintf(out, "Kernel:\n") + for _, st := range ev.ProcessKprobe.KernelStackTrace { colorer.Green.Fprintf(out, " 0x%x:", st.Address) colorer.Blue.Fprintf(out, " %s", st.Symbol) fmt.Fprintf(out, "+") colorer.Yellow.Fprintf(out, "0x%x\n", st.Offset) } } + if ev.ProcessKprobe.UserStackTrace != nil { + fmt.Fprintf(out, "User space:\n") + for _, st := range ev.ProcessKprobe.UserStackTrace { + colorer.Green.Fprintf(out, " 0x%x:", st.Address) + colorer.Blue.Fprintf(out, " %s ", st.Symbol) + colorer.Yellow.Fprintf(out, "(%s+0x%x)\n", st.Module, st.Offset) + } + } } return out.String() } diff --git a/pkg/grpc/tracing/tracing.go b/pkg/grpc/tracing/tracing.go index 1b2239747b6..9090b4883f2 100644 --- a/pkg/grpc/tracing/tracing.go +++ b/pkg/grpc/tracing/tracing.go @@ -19,6 +19,7 @@ import ( "github.com/cilium/tetragon/pkg/logger" "github.com/cilium/tetragon/pkg/option" "github.com/cilium/tetragon/pkg/process" + "github.com/cilium/tetragon/pkg/procsyms" "github.com/cilium/tetragon/pkg/reader/bpf" "github.com/cilium/tetragon/pkg/reader/caps" "github.com/cilium/tetragon/pkg/reader/network" @@ -291,8 +292,8 @@ func GetProcessKprobe(event *MsgGenericKprobeUnix) *tetragon.ProcessKprobe { } } - var stackTrace []*tetragon.StackTraceEntry - for _, addr := range event.StackTrace { + var kernelStackTrace []*tetragon.StackTraceEntry + for _, addr := range event.KernelStackTrace { if addr == 0 { // the stack trace from the MsgGenericKprobeUnix is a fixed size // array, [unix.PERF_MAX_STACK_DEPTH]uint64, used for binary decode, @@ -315,23 +316,45 @@ func GetProcessKprobe(event *MsgGenericKprobeUnix) *tetragon.ProcessKprobe { Offset: fnOffset.Offset, Symbol: fnOffset.SymName, } - if option.Config.ExposeKernelAddresses { + if option.Config.ExposeAddresses { entry.Address = addr } - stackTrace = append(stackTrace, entry) + kernelStackTrace = append(kernelStackTrace, entry) + } + + var userStackTrace []*tetragon.StackTraceEntry + for _, addr := range event.UserStackTrace { + if addr == 0 { + continue + } + // TODO extract symbols from procfs + entry := &tetragon.StackTraceEntry{} + fsym, err := procsyms.GetFnSymbol(int(event.Msg.Tid), addr) + if err != nil { + logger.GetLogger().WithField("address", fmt.Sprintf("0x%x", addr)).Debug("stacktrace: failed to retrieve symbol, offset and module") + continue + } + entry.Offset = fsym.Offset + entry.Module = fsym.Module + entry.Symbol = fsym.Name + if option.Config.ExposeAddresses { + entry.Address = addr + } + userStackTrace = append(userStackTrace, entry) } tetragonEvent := &tetragon.ProcessKprobe{ - Process: tetragonProcess, - Parent: tetragonParent, - FunctionName: event.FuncName, - Args: tetragonArgs, - Return: tetragonReturnArg, - Action: kprobeAction(event.Msg.ActionId), - ReturnAction: kprobeAction(event.ReturnAction), - StackTrace: stackTrace, - PolicyName: event.PolicyName, - Message: event.Message, + Process: tetragonProcess, + Parent: tetragonParent, + FunctionName: event.FuncName, + Args: tetragonArgs, + Return: tetragonReturnArg, + Action: kprobeAction(event.Msg.ActionId), + ReturnAction: kprobeAction(event.ReturnAction), + KernelStackTrace: kernelStackTrace, + UserStackTrace: userStackTrace, + PolicyName: event.PolicyName, + Message: event.Message, } if tetragonProcess.Pid == nil { @@ -540,13 +563,14 @@ func (msg *MsgGenericTracepointUnix) PolicyInfo() tracingpolicy.PolicyInfo { } type MsgGenericKprobeUnix struct { - Msg *tracingapi.MsgGenericKprobe - ReturnAction uint64 - FuncName string - Args []tracingapi.MsgGenericKprobeArg - PolicyName string - Message string - StackTrace [unix.PERF_MAX_STACK_DEPTH]uint64 + Msg *tracingapi.MsgGenericKprobe + ReturnAction uint64 + FuncName string + Args []tracingapi.MsgGenericKprobeArg + PolicyName string + Message string + KernelStackTrace [unix.PERF_MAX_STACK_DEPTH]uint64 + UserStackTrace [unix.PERF_MAX_STACK_DEPTH]uint64 } func (msg *MsgGenericKprobeUnix) Notify() bool { diff --git a/pkg/k8s/apis/cilium.io/client/crds/v1alpha1/cilium.io_tracingpolicies.yaml b/pkg/k8s/apis/cilium.io/client/crds/v1alpha1/cilium.io_tracingpolicies.yaml index d83ff0becce..6a2e013a700 100644 --- a/pkg/k8s/apis/cilium.io/client/crds/v1alpha1/cilium.io_tracingpolicies.yaml +++ b/pkg/k8s/apis/cilium.io/client/crds/v1alpha1/cilium.io_tracingpolicies.yaml @@ -316,10 +316,14 @@ spec: process or thread caused the action. Only valid with the post action and with a rateLimit specified. type: string - stackTrace: - description: Enable stack trace export. Only valid + kernelStackTrace: + description: Enable kernel stack trace export. Only valid with the post action. type: boolean + userStackTrace: + description: Enable user stack trace export. Only + valid with the post action. + type: boolean required: - action type: object @@ -624,10 +628,14 @@ spec: process or thread caused the action. Only valid with the post action and with a rateLimit specified. type: string - stackTrace: - description: Enable stack trace export. Only valid + kernelStackTrace: + description: Enable kernel stack trace export. Only valid with the post action. type: boolean + userStackTrace: + description: Enable user stack trace export. Only + valid with the post action. + type: boolean required: - action type: object @@ -971,10 +979,14 @@ spec: process or thread caused the action. Only valid with the post action and with a rateLimit specified. type: string - stackTrace: - description: Enable stack trace export. Only valid + kernelStackTrace: + description: Enable kernel stack trace export. Only valid with the post action. type: boolean + userStackTrace: + description: Enable user stack trace export. Only + valid with the post action. + type: boolean required: - action type: object @@ -1279,10 +1291,14 @@ spec: process or thread caused the action. Only valid with the post action and with a rateLimit specified. type: string - stackTrace: - description: Enable stack trace export. Only valid + kernelStackTrace: + description: Enable kernel stack trace export. Only valid with the post action. type: boolean + userStackTrace: + description: Enable user stack trace export. Only + valid with the post action. + type: boolean required: - action type: object @@ -1527,10 +1543,14 @@ spec: process or thread caused the action. Only valid with the post action and with a rateLimit specified. type: string - stackTrace: - description: Enable stack trace export. Only valid + kernelStackTrace: + description: Enable kernel stack trace export. Only valid with the post action. type: boolean + userStackTrace: + description: Enable user stack trace export. Only + valid with the post action. + type: boolean required: - action type: object @@ -1835,10 +1855,14 @@ spec: process or thread caused the action. Only valid with the post action and with a rateLimit specified. type: string - stackTrace: - description: Enable stack trace export. Only valid + kernelStackTrace: + description: Enable kernel stack trace export. Only valid with the post action. type: boolean + userStackTrace: + description: Enable user stack trace export. Only + valid with the post action. + type: boolean required: - action type: object diff --git a/pkg/k8s/apis/cilium.io/client/crds/v1alpha1/cilium.io_tracingpoliciesnamespaced.yaml b/pkg/k8s/apis/cilium.io/client/crds/v1alpha1/cilium.io_tracingpoliciesnamespaced.yaml index da8deb3a2d9..051688e147c 100644 --- a/pkg/k8s/apis/cilium.io/client/crds/v1alpha1/cilium.io_tracingpoliciesnamespaced.yaml +++ b/pkg/k8s/apis/cilium.io/client/crds/v1alpha1/cilium.io_tracingpoliciesnamespaced.yaml @@ -320,6 +320,10 @@ spec: description: Enable stack trace export. Only valid with the post action. type: boolean + userStackTrace: + description: Enable user stack trace export. Only + valid with the post action. + type: boolean required: - action type: object @@ -628,6 +632,10 @@ spec: description: Enable stack trace export. Only valid with the post action. type: boolean + userStackTrace: + description: Enable user stack trace export. Only + valid with the post action. + type: boolean required: - action type: object @@ -975,6 +983,10 @@ spec: description: Enable stack trace export. Only valid with the post action. type: boolean + userStackTrace: + description: Enable user stack trace export. Only + valid with the post action. + type: boolean required: - action type: object @@ -1283,6 +1295,10 @@ spec: description: Enable stack trace export. Only valid with the post action. type: boolean + userStackTrace: + description: Enable user stack trace export. Only + valid with the post action. + type: boolean required: - action type: object @@ -1531,6 +1547,10 @@ spec: description: Enable stack trace export. Only valid with the post action. type: boolean + userStackTrace: + description: Enable user stack trace export. Only + valid with the post action. + type: boolean required: - action type: object @@ -1839,6 +1859,10 @@ spec: description: Enable stack trace export. Only valid with the post action. type: boolean + userStackTrace: + description: Enable user stack trace export. Only + valid with the post action. + type: boolean required: - action type: object diff --git a/pkg/k8s/apis/cilium.io/v1alpha1/types.go b/pkg/k8s/apis/cilium.io/v1alpha1/types.go index 9dd87f6a1c9..d37773f3481 100644 --- a/pkg/k8s/apis/cilium.io/v1alpha1/types.go +++ b/pkg/k8s/apis/cilium.io/v1alpha1/types.go @@ -229,8 +229,11 @@ type ActionSelector struct { // Only valid with the post action and with a rateLimit specified. RateLimitScope string `json:"rateLimitScope"` // +kubebuilder:validation:Optional - // Enable stack trace export. Only valid with the post action. - StackTrace bool `json:"stackTrace"` + // Enable kernel stack trace export. Only valid with the post action. + KernelStackTrace bool `json:"kernelStackTrace"` + // +kubebuilder:validation:Optional + // Enable user stack trace export. Only valid with the post action. + UserStackTrace bool `json:"userStackTrace"` } type TracepointSpec struct { diff --git a/pkg/option/config.go b/pkg/option/config.go index bd0dec4894f..1456f1374c5 100644 --- a/pkg/option/config.go +++ b/pkg/option/config.go @@ -85,7 +85,7 @@ type config struct { EnablePodInfo bool EnableTracingPolicyCRD bool - ExposeKernelAddresses bool + ExposeAddresses bool } var ( diff --git a/pkg/option/flags.go b/pkg/option/flags.go index 56b2d4a9fcb..60093181528 100644 --- a/pkg/option/flags.go +++ b/pkg/option/flags.go @@ -89,7 +89,7 @@ const ( KeyEnablePodInfo = "enable-pod-info" KeyEnableTracingPolicyCRD = "enable-tracing-policy-crd" - KeyExposeKernelAddresses = "expose-kernel-addresses" + KeyExposeAddresses = "expose-addresses" KeyGenerateDocs = "generate-docs" ) @@ -170,7 +170,7 @@ func ReadAndSetFlags() error { Config.TracingPolicy = viper.GetString(KeyTracingPolicy) - Config.ExposeKernelAddresses = viper.GetBool(KeyExposeKernelAddresses) + Config.ExposeAddresses = viper.GetBool(KeyExposeAddresses) return nil } @@ -275,7 +275,7 @@ func AddFlags(flags *pflag.FlagSet) { flags.Bool(KeyEnablePodInfo, false, "Enable PodInfo custom resource") flags.Bool(KeyEnableTracingPolicyCRD, true, "Enable TracingPolicy and TracingPolicyNamespaced custom resources") - flags.Bool(KeyExposeKernelAddresses, false, "Expose real kernel addresses in events stack traces") + flags.Bool(KeyExposeAddresses, false, "Expose real linear addresses in events stack traces") flags.Bool(KeyGenerateDocs, false, "Generate documentation in YAML format to stdout") } diff --git a/pkg/procsyms/procsyms.go b/pkg/procsyms/procsyms.go new file mode 100644 index 00000000000..25d22d7cd1c --- /dev/null +++ b/pkg/procsyms/procsyms.go @@ -0,0 +1,124 @@ +// SPDX-License-Identifier: Apache-2.0 +// Copyright Authors of Tetragon + +package procsyms + +import ( + "debug/elf" + "fmt" + "sync" + + "github.com/cilium/tetragon/pkg/logger" + lru "github.com/hashicorp/golang-lru/v2" + "github.com/prometheus/procfs" +) + +var ( + cache *lru.Cache[struct { + module string + offset uint64 + }, string] + setCache sync.Once +) + +// FnSym is a function location (function name, module path + offset) +type FnSym struct { + Name string + Module string + Offset uint64 +} + +// ToString returns a string representation of FnSym +func (fsym *FnSym) ToString() string { + return fmt.Sprintf("%s (%s+0x%x)", fsym.Name, fsym.Module, fsym.Offset) +} + +// GetFnSymbol -- returns the FnSym for a given address and PID +func GetFnSymbol(pid int, addr uint64) (*FnSym, error) { + // TODO: Think about cache [pid+addr] -> [module+offset] + p, err := procfs.NewProc(pid) + if err != nil { + return nil, fmt.Errorf("Can't open /proc/%d", pid) + } + maps, err := p.ProcMaps() + if err != nil { + return nil, fmt.Errorf("Can't get proc/%d/maps", pid) + } + + if len(maps) == 0 { + return nil, fmt.Errorf("proc/%d/maps is empty", pid) + } + + // binary search + l, r := 0, len(maps)-1 + + for l < r { + // prevents overflow + m := l + ((r - l + 1) >> 1) + if uint64(maps[m].StartAddr) < addr { + l = m + } else { + r = m - 1 + } + } + + entry := maps[l] + sym := FnSym{} + sym.Module = entry.Pathname + sym.Offset = addr - uint64(entry.StartAddr) + uint64(entry.Offset) + + // Initialize symbol cache + setCache.Do(func() { + c, err := lru.New[struct { + module string + offset uint64 + }, string](1024) + if err == nil { + cache = c + } else { + logger.GetLogger().Infof("failed to initialize cache: %s", err) + } + + }) + + if cache != nil { + // cache hit + key := struct { + module string + offset uint64 + }{ + module: sym.Module, + offset: sym.Offset, + } + if ret, ok := cache.Get(key); ok { + sym.Name = ret + return &sym, nil + } + } + + if binary, err := elf.Open(entry.Pathname); err == nil { + syms, _ := binary.Symbols() + if dsyms, err := binary.DynamicSymbols(); err == nil { + syms = append(syms, dsyms...) + } + for _, s := range syms { + if (s.Info & byte(elf.STT_FUNC)) == 0 { + continue + } + // Symbols are unordered by Value, so using linear scan + if s.Value <= sym.Offset && sym.Offset < (s.Value+s.Size) { + sym.Name = s.Name + key := struct { + module string + offset uint64 + }{ + module: sym.Module, + offset: sym.Offset, + } + cache.Add(key, sym.Name) + break + } + } + } + return &sym, nil +} diff --git a/pkg/selectors/kernel.go b/pkg/selectors/kernel.go index 4762002d5c5..3d7bbbc28e2 100644 --- a/pkg/selectors/kernel.go +++ b/pkg/selectors/kernel.go @@ -941,11 +941,16 @@ func ParseMatchAction(k *KernelSelectorState, action *v1alpha1.ActionSelector, a case ActionTypePost: WriteSelectorUint32(&k.data, rateLimit) WriteSelectorUint32(&k.data, rateLimitScope) - stackTrace := uint32(0) - if action.StackTrace { - stackTrace = 1 + kernelStackTrace := uint32(0) + if action.KernelStackTrace { + kernelStackTrace = 1 } - WriteSelectorUint32(&k.data, stackTrace) + WriteSelectorUint32(&k.data, kernelStackTrace) + userStackTrace := uint32(0) + if action.UserStackTrace { + userStackTrace = 1 + } + WriteSelectorUint32(&k.data, userStackTrace) case ActionTypeNoPost: // no arguments case ActionTypeSigKill: diff --git a/pkg/selectors/kernel_test.go b/pkg/selectors/kernel_test.go index 73edf9182a4..f6e0aa4277b 100644 --- a/pkg/selectors/kernel_test.go +++ b/pkg/selectors/kernel_test.go @@ -485,6 +485,7 @@ func TestParseMatchAction(t *testing.T) { 0x00, 0x00, 0x00, 0x00, // DontRepeatFor = 0 0x00, 0x00, 0x00, 0x00, // DontRepeatForScope = 0 0x00, 0x00, 0x00, 0x00, // StackTrace = 0 + 0x00, 0x00, 0x00, 0x00, // UserStackTrace = 0 } if err := ParseMatchAction(k, act1, &actionArgTable); err != nil || bytes.Equal(expected1, d.e[0:d.off]) == false { t.Errorf("parseMatchAction: error %v expected %v bytes %v parsing %v\n", err, expected1, d.e[0:d.off], act1) @@ -497,8 +498,9 @@ func TestParseMatchAction(t *testing.T) { 0x00, 0x00, 0x00, 0x00, // DontRepeatFor = 0 0x00, 0x00, 0x00, 0x00, // DontRepeatForScope = 0 0x00, 0x00, 0x00, 0x00, // StackTrace = 0 + 0x00, 0x00, 0x00, 0x00, // UserStackTrace = 0 } - length := []byte{36, 0x00, 0x00, 0x00} + length := []byte{44, 0x00, 0x00, 0x00} expected := append(length, expected1[:]...) expected = append(expected, expected2[:]...) @@ -601,11 +603,11 @@ func TestInitKernelSelectors(t *testing.T) { } expected_selsize_small := []byte{ - 0x10, 0x01, 0x00, 0x00, // size = pids + args + actions + namespaces + capabilities + 4 + 0x14, 0x01, 0x00, 0x00, // size = pids + args + actions + namespaces + capabilities + 4 } expected_selsize_large := []byte{ - 0x44, 0x01, 0x00, 0x00, // size = pids + args + actions + namespaces + namespacesChanges + capabilities + capabilityChanges + 4 + 0x48, 0x01, 0x00, 0x00, // size = pids + args + actions + namespaces + namespacesChanges + capabilities + capabilityChanges + 4 } expected_filters := []byte{ @@ -723,11 +725,12 @@ func TestInitKernelSelectors(t *testing.T) { 0x02, 0x00, 0x00, 0x00, // value 2 // actions header - 32, 0x00, 0x00, 0x00, // size = (4 * sizeof(uint32) * number of actions) + args + 36, 0x00, 0x00, 0x00, // size = (5 * sizeof(uint32) * number of actions) + args 0x00, 0x00, 0x00, 0x00, // post to userspace 0x00, 0x00, 0x00, 0x00, // DontRepeatFor = 0 0x00, 0x00, 0x00, 0x00, // DontRepeatForScope = 0 0x00, 0x00, 0x00, 0x00, // StackTrace = 0 + 0x00, 0x00, 0x00, 0x00, // UserStackTrace = 0 0x01, 0x00, 0x00, 0x00, // fdinstall 0x00, 0x00, 0x00, 0x00, // arg index of fd 0x01, 0x00, 0x00, 0x00, // arg index of string filename @@ -760,11 +763,12 @@ func TestInitKernelSelectors(t *testing.T) { 0xff, 0xff, 0xff, 0xff, // map ID for strings 2049-4096 // actions header - 32, 0x00, 0x00, 0x00, // size = (4 * sizeof(uint32) * number of actions) + args + 4 + 36, 0x00, 0x00, 0x00, // size = (5 * sizeof(uint32) * number of actions) + args + 4 0x00, 0x00, 0x00, 0x00, // post to userspace 0x00, 0x00, 0x00, 0x00, // DontRepeatFor = 0 0x00, 0x00, 0x00, 0x00, // DontRepeatForScope = 0 0x00, 0x00, 0x00, 0x00, // StackTrace = 0 + 0x00, 0x00, 0x00, 0x00, // UserStackTrace = 0 0x01, 0x00, 0x00, 0x00, // fdinstall 0x00, 0x00, 0x00, 0x00, // arg index of fd 0x01, 0x00, 0x00, 0x00, // arg index of string filename @@ -945,21 +949,22 @@ func TestReturnSelectorArgIntActionFollowfd(t *testing.T) { expU32Push(1) // off: 0 number of selectors expU32Push(4) // off: 4 relative ofset of selector (4 + 4 = 8) - expU32Push(60) // off: 8 selector: length + expU32Push(64) // off: 8 selector: length expU32Push(24) // off: 12 selector: matchReturnArgs length expU32Push(0) // off: 16 selector: matchReturnArgs arg offset[0] expU32Push(0) // off: 20 selector: matchReturnArgs arg offset[1] expU32Push(0) // off: 24 selector: matchReturnArgs arg offset[2] expU32Push(0) // off: 28 selector: matchReturnArgs arg offset[3] expU32Push(0) // off: 32 selector: matchReturnArgs arg offset[4] - expU32Push(32) // off: 36 selector: matchReturnActions length + expU32Push(36) // off: 36 selector: matchReturnActions length expU32Push(0) // off: 40 selector: selectors.ActionTypePost expU32Push(0) // off: 44 selector: rateLimit expU32Push(0) // off: 44 selector: rateLimitScope expU32Push(0) // off: 48 selector: stackTrace - expU32Push(1) // off: 52 selector: selectors.ActionTypeFollowFd - expU32Push(7) // off: 56 selector: action.ArgFd - expU32Push(8) // off: 60 selector: action.ArgName + expU32Push(0) // off: 52 selector: userStackTrace + expU32Push(1) // off: 56 selector: selectors.ActionTypeFollowFd + expU32Push(7) // off: 60 selector: action.ArgFd + expU32Push(8) // off: 64 selector: action.ArgName if bytes.Equal(expected[:expectedLen], b[:expectedLen]) == false { t.Errorf("\ngot: %v\nexp: %v\n", b[:expectedLen], expected[:expectedLen]) diff --git a/pkg/sensors/tracing/generickprobe.go b/pkg/sensors/tracing/generickprobe.go index b2742393b66..db928d0cc15 100644 --- a/pkg/sensors/tracing/generickprobe.go +++ b/pkg/sensors/tracing/generickprobe.go @@ -427,8 +427,8 @@ func preValidateKprobes(name string, kprobes []v1alpha1.KProbeSpec, lists []v1al for sid, selector := range f.Selectors { for mid, matchAction := range selector.MatchActions { - if matchAction.StackTrace && matchAction.Action != "Post" { - return fmt.Errorf("stackTrace can only be used along Post action: got stackTrace enabled in kprobes[%d].selectors[%d].matchActions[%d] with action '%s'", i, sid, mid, matchAction.Action) + if (matchAction.KernelStackTrace || matchAction.UserStackTrace) && matchAction.Action != "Post" { + return fmt.Errorf("kernelStackTrace or userStackTrace can only be used along Post action: got (kernelStackTrace/userStackTrace) enabled in kprobes[%d].selectors[%d].matchActions[%d] with action '%s'", i, sid, mid, matchAction.Action) } } } @@ -1105,20 +1105,31 @@ func handleMsgGenericKprobe(m *api.MsgGenericKprobe, gk *genericKprobe, r *bytes printers = gk.argSigPrinters } - if m.Common.Flags&processapi.MSG_COMMON_FLAG_STACKTRACE != 0 { - if m.StackID < 0 { - logger.GetLogger().Warnf("failed to retrieve stacktrace: id equal to errno %d", m.StackID) - } else { + if m.Common.Flags&(processapi.MSG_COMMON_FLAG_KERNEL_STACKTRACE|processapi.MSG_COMMON_FLAG_USER_STACKTRACE) != 0 { + if m.KernelStackID < 0 { + logger.GetLogger().Warnf("failed to retrieve kernel stacktrace: id equal to errno %d", m.KernelStackID) + } + if m.UserStackID < 0 { + logger.GetLogger().Warnf("failed to retrieve user stacktrace: id equal to errno %d", m.UserStackID) + } + if gk.data.stackTraceMap.MapHandle == nil { + logger.GetLogger().WithError(err).Warn("failed to load the stacktrace map") + } + if m.KernelStackID > 0 || m.UserStackID > 0 { // remove the error part - id := uint32(m.StackID) - - if gk.data.stackTraceMap.MapHandle != nil { - err = gk.data.stackTraceMap.MapHandle.Lookup(id, &unix.StackTrace) + if m.KernelStackID > 0 { + id := uint32(m.KernelStackID) + err = gk.data.stackTraceMap.MapHandle.Lookup(id, &unix.KernelStackTrace) + if err != nil { + logger.GetLogger().WithError(err).Warn("failed to lookup the stacktrace map") + } + } + if m.UserStackID > 0 { + id := uint32(m.UserStackID) + err = gk.data.stackTraceMap.MapHandle.Lookup(id, &unix.UserStackTrace) if err != nil { logger.GetLogger().WithError(err).Warn("failed to lookup the stacktrace map") } - } else { - logger.GetLogger().WithError(err).Warn("failed to load the stacktrace map") } } } diff --git a/pkg/sensors/tracing/kprobe_test.go b/pkg/sensors/tracing/kprobe_test.go index 15456cffd2e..45da90280de 100644 --- a/pkg/sensors/tracing/kprobe_test.go +++ b/pkg/sensors/tracing/kprobe_test.go @@ -6083,7 +6083,7 @@ spec: assert.NoError(t, err) } -func TestKprobeStackTrace(t *testing.T) { +func TestKprobeKernelStackTrace(t *testing.T) { var doneWG, readyWG sync.WaitGroup defer doneWG.Wait() @@ -6100,7 +6100,7 @@ spec: selectors: - matchActions: - action: Post - stackTrace: true` + kernelStackTrace: true` createCrdFile(t, tracingPolicy) @@ -6119,8 +6119,72 @@ spec: stackTraceChecker := ec.NewProcessKprobeChecker("stack-trace"). WithProcess(ec.NewProcessChecker().WithBinary(sm.Full(unameBin))). - WithStackTrace(ec.NewStackTraceEntryListMatcher().WithValues( + WithKernelStackTrace(ec.NewStackTraceEntryListMatcher().WithValues( ec.NewStackTraceEntryChecker().WithSymbol(sm.Suffix(("sys_newuname"))), + //syscall openat /tmp/ust_test + //User space: + // 0x0: __open64 (/usr/lib/x86_64-linux-gnu/libc.so.6+0x11453b) + //exit /tmp/ust_test 0 + )) + + checker := ec.NewUnorderedEventChecker(stackTraceChecker) + err = jsonchecker.JsonTestCheck(t, checker) + assert.NoError(t, err) +} +func TestKprobeUserStackTrace(t *testing.T) { + var doneWG, readyWG sync.WaitGroup + defer doneWG.Wait() + + ctx, cancel := context.WithTimeout(context.Background(), tus.Conf().CmdWaitTime) + defer cancel() + tracingPolicy := `apiVersion: cilium.io/v1alpha1 +kind: TracingPolicy +metadata: + name: "test-user-stacktrace" +spec: + kprobes: + - call: "sys_openat" + selectors: + - matchBinaries: + - operator: "In" + values: + - "/tmp/ust_test" + matchActions: + - action: Post + userStackTrace: true` + + testSrc := `#include +#include + +void main(void) { + FILE *fptr = fopen("/etc/issue", "r"); + sleep(5); +}` + if err := os.WriteFile("/tmp/ust_test.c", []byte(testSrc), 0644); err != nil { + + } + testBin := "/tmp/ust_test" + if err := exec.Command("clang", "/tmp/ust_test.c", "-o", testBin).Run(); err != nil { + t.Fatalf("failed to compile /tmp/ust_test: %s", err) + } + + createCrdFile(t, tracingPolicy) + + obs, err := observertesthelper.GetDefaultObserverWithFile(t, ctx, testConfigFile, tus.Conf().TetragonLib, observertesthelper.WithMyPid()) + if err != nil { + t.Fatalf("GetDefaultObserverWithFile error: %s", err) + } + observertesthelper.LoopEvents(ctx, t, &doneWG, &readyWG, obs) + readyWG.Wait() + + if err := exec.Command(testBin).Run(); err != nil { + t.Fatalf("failed to run %s: %s", testBin, err) + } + + stackTraceChecker := ec.NewProcessKprobeChecker("stack-trace"). + WithProcess(ec.NewProcessChecker().WithBinary(sm.Full(testBin))). + WithUserStackTrace(ec.NewStackTraceEntryListMatcher().WithValues( + ec.NewStackTraceEntryChecker().WithSymbol(sm.Suffix(("__open64"))), // we could technically check for more but stack traces look // different on different archs, at least we check that the stack // trace is enabled, works and exports something coherent @@ -6141,6 +6205,8 @@ spec: checker := ec.NewUnorderedEventChecker(stackTraceChecker) err = jsonchecker.JsonTestCheck(t, checker) assert.NoError(t, err) + os.Remove("/tmp/ust_test.c") + os.Remove("/tmp/ust_test") } func TestKprobeMultiMatcArgs(t *testing.T) { diff --git a/vendor/github.com/cilium/tetragon/api/v1/tetragon/codegen/eventchecker/eventchecker.pb.go b/vendor/github.com/cilium/tetragon/api/v1/tetragon/codegen/eventchecker/eventchecker.pb.go index 49af5e8a44f..7fe3746a4c0 100644 --- a/vendor/github.com/cilium/tetragon/api/v1/tetragon/codegen/eventchecker/eventchecker.pb.go +++ b/vendor/github.com/cilium/tetragon/api/v1/tetragon/codegen/eventchecker/eventchecker.pb.go @@ -696,17 +696,18 @@ func (checker *ProcessExitChecker) FromProcessExit(event *tetragon.ProcessExit) // ProcessKprobeChecker implements a checker struct to check a ProcessKprobe event type ProcessKprobeChecker struct { - CheckerName string `json:"checkerName"` - Process *ProcessChecker `json:"process,omitempty"` - Parent *ProcessChecker `json:"parent,omitempty"` - FunctionName *stringmatcher.StringMatcher `json:"functionName,omitempty"` - Args *KprobeArgumentListMatcher `json:"args,omitempty"` - Return *KprobeArgumentChecker `json:"return,omitempty"` - Action *KprobeActionChecker `json:"action,omitempty"` - StackTrace *StackTraceEntryListMatcher `json:"stackTrace,omitempty"` - PolicyName *stringmatcher.StringMatcher `json:"policyName,omitempty"` - ReturnAction *KprobeActionChecker `json:"returnAction,omitempty"` - Message *stringmatcher.StringMatcher `json:"message,omitempty"` + CheckerName string `json:"checkerName"` + Process *ProcessChecker `json:"process,omitempty"` + Parent *ProcessChecker `json:"parent,omitempty"` + FunctionName *stringmatcher.StringMatcher `json:"functionName,omitempty"` + Args *KprobeArgumentListMatcher `json:"args,omitempty"` + Return *KprobeArgumentChecker `json:"return,omitempty"` + Action *KprobeActionChecker `json:"action,omitempty"` + KernelStackTrace *StackTraceEntryListMatcher `json:"kernelStackTrace,omitempty"` + PolicyName *stringmatcher.StringMatcher `json:"policyName,omitempty"` + ReturnAction *KprobeActionChecker `json:"returnAction,omitempty"` + Message *stringmatcher.StringMatcher `json:"message,omitempty"` + UserStackTrace *StackTraceEntryListMatcher `json:"userStackTrace,omitempty"` } // CheckEvent checks a single event and implements the EventChecker interface @@ -778,9 +779,9 @@ func (checker *ProcessKprobeChecker) Check(event *tetragon.ProcessKprobe) error return fmt.Errorf("Action check failed: %w", err) } } - if checker.StackTrace != nil { - if err := checker.StackTrace.Check(event.StackTrace); err != nil { - return fmt.Errorf("StackTrace check failed: %w", err) + if checker.KernelStackTrace != nil { + if err := checker.KernelStackTrace.Check(event.KernelStackTrace); err != nil { + return fmt.Errorf("KernelStackTrace check failed: %w", err) } } if checker.PolicyName != nil { @@ -798,6 +799,11 @@ func (checker *ProcessKprobeChecker) Check(event *tetragon.ProcessKprobe) error return fmt.Errorf("Message check failed: %w", err) } } + if checker.UserStackTrace != nil { + if err := checker.UserStackTrace.Check(event.UserStackTrace); err != nil { + return fmt.Errorf("UserStackTrace check failed: %w", err) + } + } return nil } if err := fieldChecks(); err != nil { @@ -843,9 +849,9 @@ func (checker *ProcessKprobeChecker) WithAction(check tetragon.KprobeAction) *Pr return checker } -// WithStackTrace adds a StackTrace check to the ProcessKprobeChecker -func (checker *ProcessKprobeChecker) WithStackTrace(check *StackTraceEntryListMatcher) *ProcessKprobeChecker { - checker.StackTrace = check +// WithKernelStackTrace adds a KernelStackTrace check to the ProcessKprobeChecker +func (checker *ProcessKprobeChecker) WithKernelStackTrace(check *StackTraceEntryListMatcher) *ProcessKprobeChecker { + checker.KernelStackTrace = check return checker } @@ -868,6 +874,12 @@ func (checker *ProcessKprobeChecker) WithMessage(check *stringmatcher.StringMatc return checker } +// WithUserStackTrace adds a UserStackTrace check to the ProcessKprobeChecker +func (checker *ProcessKprobeChecker) WithUserStackTrace(check *StackTraceEntryListMatcher) *ProcessKprobeChecker { + checker.UserStackTrace = check + return checker +} + //FromProcessKprobe populates the ProcessKprobeChecker using data from a ProcessKprobe event func (checker *ProcessKprobeChecker) FromProcessKprobe(event *tetragon.ProcessKprobe) *ProcessKprobeChecker { if event == nil { @@ -899,7 +911,7 @@ func (checker *ProcessKprobeChecker) FromProcessKprobe(event *tetragon.ProcessKp checker.Action = NewKprobeActionChecker(event.Action) { var checks []*StackTraceEntryChecker - for _, check := range event.StackTrace { + for _, check := range event.KernelStackTrace { var convertedCheck *StackTraceEntryChecker if check != nil { convertedCheck = NewStackTraceEntryChecker().FromStackTraceEntry(check) @@ -908,11 +920,24 @@ func (checker *ProcessKprobeChecker) FromProcessKprobe(event *tetragon.ProcessKp } lm := NewStackTraceEntryListMatcher().WithOperator(listmatcher.Ordered). WithValues(checks...) - checker.StackTrace = lm + checker.KernelStackTrace = lm } checker.PolicyName = stringmatcher.Full(event.PolicyName) checker.ReturnAction = NewKprobeActionChecker(event.ReturnAction) checker.Message = stringmatcher.Full(event.Message) + { + var checks []*StackTraceEntryChecker + for _, check := range event.UserStackTrace { + var convertedCheck *StackTraceEntryChecker + if check != nil { + convertedCheck = NewStackTraceEntryChecker().FromStackTraceEntry(check) + } + checks = append(checks, convertedCheck) + } + lm := NewStackTraceEntryListMatcher().WithOperator(listmatcher.Ordered). + WithValues(checks...) + checker.UserStackTrace = lm + } return checker } @@ -1059,7 +1084,7 @@ func (checker *StackTraceEntryListMatcher) Check(values []*tetragon.StackTraceEn func (checker *StackTraceEntryListMatcher) orderedCheck(values []*tetragon.StackTraceEntry) error { innerCheck := func(check *StackTraceEntryChecker, value *tetragon.StackTraceEntry) error { if err := check.Check(value); err != nil { - return fmt.Errorf("StackTrace check failed: %w", err) + return fmt.Errorf("KernelStackTrace check failed: %w", err) } return nil } @@ -1091,7 +1116,7 @@ func (checker *StackTraceEntryListMatcher) unorderedCheck(values []*tetragon.Sta func (checker *StackTraceEntryListMatcher) subsetCheck(values []*tetragon.StackTraceEntry) error { innerCheck := func(check *StackTraceEntryChecker, value *tetragon.StackTraceEntry) error { if err := check.Check(value); err != nil { - return fmt.Errorf("StackTrace check failed: %w", err) + return fmt.Errorf("KernelStackTrace check failed: %w", err) } return nil } @@ -5743,6 +5768,7 @@ type StackTraceEntryChecker struct { Address *uint64 `json:"address,omitempty"` Offset *uint64 `json:"offset,omitempty"` Symbol *stringmatcher.StringMatcher `json:"symbol,omitempty"` + Module *stringmatcher.StringMatcher `json:"module,omitempty"` } // NewStackTraceEntryChecker creates a new StackTraceEntryChecker @@ -5777,6 +5803,11 @@ func (checker *StackTraceEntryChecker) Check(event *tetragon.StackTraceEntry) er return fmt.Errorf("Symbol check failed: %w", err) } } + if checker.Module != nil { + if err := checker.Module.Match(event.Module); err != nil { + return fmt.Errorf("Module check failed: %w", err) + } + } return nil } if err := fieldChecks(); err != nil { @@ -5803,6 +5834,12 @@ func (checker *StackTraceEntryChecker) WithSymbol(check *stringmatcher.StringMat return checker } +// WithModule adds a Module check to the StackTraceEntryChecker +func (checker *StackTraceEntryChecker) WithModule(check *stringmatcher.StringMatcher) *StackTraceEntryChecker { + checker.Module = check + return checker +} + //FromStackTraceEntry populates the StackTraceEntryChecker using data from a StackTraceEntry field func (checker *StackTraceEntryChecker) FromStackTraceEntry(event *tetragon.StackTraceEntry) *StackTraceEntryChecker { if event == nil { @@ -5817,6 +5854,7 @@ func (checker *StackTraceEntryChecker) FromStackTraceEntry(event *tetragon.Stack checker.Offset = &val } checker.Symbol = stringmatcher.Full(event.Symbol) + checker.Module = stringmatcher.Full(event.Module) return checker } diff --git a/vendor/github.com/cilium/tetragon/api/v1/tetragon/tetragon.pb.go b/vendor/github.com/cilium/tetragon/api/v1/tetragon/tetragon.pb.go index 97e21b49981..a9110abd126 100644 --- a/vendor/github.com/cilium/tetragon/api/v1/tetragon/tetragon.pb.go +++ b/vendor/github.com/cilium/tetragon/api/v1/tetragon/tetragon.pb.go @@ -2954,13 +2954,15 @@ type ProcessKprobe struct { // Action performed when the kprobe matched. Action KprobeAction `protobuf:"varint,6,opt,name=action,proto3,enum=tetragon.KprobeAction" json:"action,omitempty"` // Kernel stack trace to the call. - StackTrace []*StackTraceEntry `protobuf:"bytes,7,rep,name=stack_trace,json=stackTrace,proto3" json:"stack_trace,omitempty"` + KernelStackTrace []*StackTraceEntry `protobuf:"bytes,7,rep,name=kernel_stack_trace,json=kernelStackTrace,proto3" json:"kernel_stack_trace,omitempty"` // Name of the Tracing Policy that created that kprobe. PolicyName string `protobuf:"bytes,8,opt,name=policy_name,json=policyName,proto3" json:"policy_name,omitempty"` // Action performed when the return kprobe executed. ReturnAction KprobeAction `protobuf:"varint,9,opt,name=return_action,json=returnAction,proto3,enum=tetragon.KprobeAction" json:"return_action,omitempty"` // Short message of the Tracing Policy to inform users what is going on. Message string `protobuf:"bytes,10,opt,name=message,proto3" json:"message,omitempty"` + // User-mode stack trace to the call. + UserStackTrace []*StackTraceEntry `protobuf:"bytes,11,rep,name=user_stack_trace,json=userStackTrace,proto3" json:"user_stack_trace,omitempty"` } func (x *ProcessKprobe) Reset() { @@ -3037,9 +3039,9 @@ func (x *ProcessKprobe) GetAction() KprobeAction { return KprobeAction_KPROBE_ACTION_UNKNOWN } -func (x *ProcessKprobe) GetStackTrace() []*StackTraceEntry { +func (x *ProcessKprobe) GetKernelStackTrace() []*StackTraceEntry { if x != nil { - return x.StackTrace + return x.KernelStackTrace } return nil } @@ -3065,6 +3067,13 @@ func (x *ProcessKprobe) GetMessage() string { return "" } +func (x *ProcessKprobe) GetUserStackTrace() []*StackTraceEntry { + if x != nil { + return x.UserStackTrace + } + return nil +} + type ProcessTracepoint struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -3818,12 +3827,14 @@ type StackTraceEntry struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // address is the kernel function address. + // linear address of the function in kernel or user space. Address uint64 `protobuf:"varint,1,opt,name=address,proto3" json:"address,omitempty"` // offset is the offset into the native instructions for the function. Offset uint64 `protobuf:"varint,2,opt,name=offset,proto3" json:"offset,omitempty"` // symbol is the symbol name of the function. Symbol string `protobuf:"bytes,3,opt,name=symbol,proto3" json:"symbol,omitempty"` + // module path for user space addresses. + Module string `protobuf:"bytes,4,opt,name=module,proto3" json:"module,omitempty"` } func (x *StackTraceEntry) Reset() { @@ -3879,6 +3890,13 @@ func (x *StackTraceEntry) GetSymbol() string { return "" } +func (x *StackTraceEntry) GetModule() string { + if x != nil { + return x.Module + } + return "" +} + var File_tetragon_tetragon_proto protoreflect.FileDescriptor var file_tetragon_tetragon_proto_rawDesc = []byte{ @@ -4310,7 +4328,7 @@ var file_tetragon_tetragon_proto_rawDesc = []byte{ 0x69, 0x6e, 0x75, 0x78, 0x42, 0x69, 0x6e, 0x70, 0x72, 0x6d, 0x48, 0x00, 0x52, 0x0e, 0x6c, 0x69, 0x6e, 0x75, 0x78, 0x42, 0x69, 0x6e, 0x70, 0x72, 0x6d, 0x41, 0x72, 0x67, 0x12, 0x14, 0x0a, 0x05, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x18, 0x12, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6c, 0x61, 0x62, - 0x65, 0x6c, 0x42, 0x05, 0x0a, 0x03, 0x61, 0x72, 0x67, 0x22, 0xd0, 0x03, 0x0a, 0x0d, 0x50, 0x72, + 0x65, 0x6c, 0x42, 0x05, 0x0a, 0x03, 0x61, 0x72, 0x67, 0x22, 0xa2, 0x04, 0x0a, 0x0d, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x4b, 0x70, 0x72, 0x6f, 0x62, 0x65, 0x12, 0x2b, 0x0a, 0x07, 0x70, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x74, 0x65, 0x74, 0x72, 0x61, 0x67, 0x6f, 0x6e, 0x2e, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x52, @@ -4328,179 +4346,185 @@ var file_tetragon_tetragon_proto_rawDesc = []byte{ 0x52, 0x06, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x12, 0x2e, 0x0a, 0x06, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x16, 0x2e, 0x74, 0x65, 0x74, 0x72, 0x61, 0x67, 0x6f, 0x6e, 0x2e, 0x4b, 0x70, 0x72, 0x6f, 0x62, 0x65, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, - 0x52, 0x06, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x3a, 0x0a, 0x0b, 0x73, 0x74, 0x61, 0x63, - 0x6b, 0x5f, 0x74, 0x72, 0x61, 0x63, 0x65, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, - 0x74, 0x65, 0x74, 0x72, 0x61, 0x67, 0x6f, 0x6e, 0x2e, 0x53, 0x74, 0x61, 0x63, 0x6b, 0x54, 0x72, - 0x61, 0x63, 0x65, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0a, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x54, - 0x72, 0x61, 0x63, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x5f, 0x6e, - 0x61, 0x6d, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x70, 0x6f, 0x6c, 0x69, 0x63, - 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x3b, 0x0a, 0x0d, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x5f, - 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x16, 0x2e, 0x74, - 0x65, 0x74, 0x72, 0x61, 0x67, 0x6f, 0x6e, 0x2e, 0x4b, 0x70, 0x72, 0x6f, 0x62, 0x65, 0x41, 0x63, - 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0c, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x41, 0x63, 0x74, 0x69, - 0x6f, 0x6e, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x0a, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x22, 0xb2, 0x02, 0x0a, - 0x11, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x54, 0x72, 0x61, 0x63, 0x65, 0x70, 0x6f, 0x69, - 0x6e, 0x74, 0x12, 0x2b, 0x0a, 0x07, 0x70, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, + 0x52, 0x06, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x47, 0x0a, 0x12, 0x6b, 0x65, 0x72, 0x6e, + 0x65, 0x6c, 0x5f, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x5f, 0x74, 0x72, 0x61, 0x63, 0x65, 0x18, 0x07, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x74, 0x65, 0x74, 0x72, 0x61, 0x67, 0x6f, 0x6e, 0x2e, + 0x53, 0x74, 0x61, 0x63, 0x6b, 0x54, 0x72, 0x61, 0x63, 0x65, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, + 0x10, 0x6b, 0x65, 0x72, 0x6e, 0x65, 0x6c, 0x53, 0x74, 0x61, 0x63, 0x6b, 0x54, 0x72, 0x61, 0x63, + 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x5f, 0x6e, 0x61, 0x6d, 0x65, + 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x4e, 0x61, + 0x6d, 0x65, 0x12, 0x3b, 0x0a, 0x0d, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x5f, 0x61, 0x63, 0x74, + 0x69, 0x6f, 0x6e, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x16, 0x2e, 0x74, 0x65, 0x74, 0x72, + 0x61, 0x67, 0x6f, 0x6e, 0x2e, 0x4b, 0x70, 0x72, 0x6f, 0x62, 0x65, 0x41, 0x63, 0x74, 0x69, 0x6f, + 0x6e, 0x52, 0x0c, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, + 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x43, 0x0a, 0x10, 0x75, 0x73, 0x65, + 0x72, 0x5f, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x5f, 0x74, 0x72, 0x61, 0x63, 0x65, 0x18, 0x0b, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x74, 0x65, 0x74, 0x72, 0x61, 0x67, 0x6f, 0x6e, 0x2e, 0x53, + 0x74, 0x61, 0x63, 0x6b, 0x54, 0x72, 0x61, 0x63, 0x65, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0e, + 0x75, 0x73, 0x65, 0x72, 0x53, 0x74, 0x61, 0x63, 0x6b, 0x54, 0x72, 0x61, 0x63, 0x65, 0x22, 0xb2, + 0x02, 0x0a, 0x11, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x54, 0x72, 0x61, 0x63, 0x65, 0x70, + 0x6f, 0x69, 0x6e, 0x74, 0x12, 0x2b, 0x0a, 0x07, 0x70, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x74, 0x65, 0x74, 0x72, 0x61, 0x67, 0x6f, 0x6e, + 0x2e, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x52, 0x07, 0x70, 0x72, 0x6f, 0x63, 0x65, 0x73, + 0x73, 0x12, 0x29, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x11, 0x2e, 0x74, 0x65, 0x74, 0x72, 0x61, 0x67, 0x6f, 0x6e, 0x2e, 0x50, 0x72, 0x6f, + 0x63, 0x65, 0x73, 0x73, 0x52, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x12, 0x16, 0x0a, 0x06, + 0x73, 0x75, 0x62, 0x73, 0x79, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x75, + 0x62, 0x73, 0x79, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x18, 0x05, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x05, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x2c, 0x0a, 0x04, 0x61, 0x72, + 0x67, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x74, 0x65, 0x74, 0x72, 0x61, + 0x67, 0x6f, 0x6e, 0x2e, 0x4b, 0x70, 0x72, 0x6f, 0x62, 0x65, 0x41, 0x72, 0x67, 0x75, 0x6d, 0x65, + 0x6e, 0x74, 0x52, 0x04, 0x61, 0x72, 0x67, 0x73, 0x12, 0x1f, 0x0a, 0x0b, 0x70, 0x6f, 0x6c, 0x69, + 0x63, 0x79, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x70, + 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x2e, 0x0a, 0x06, 0x61, 0x63, 0x74, + 0x69, 0x6f, 0x6e, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x16, 0x2e, 0x74, 0x65, 0x74, 0x72, + 0x61, 0x67, 0x6f, 0x6e, 0x2e, 0x4b, 0x70, 0x72, 0x6f, 0x62, 0x65, 0x41, 0x63, 0x74, 0x69, 0x6f, + 0x6e, 0x52, 0x06, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x73, + 0x73, 0x61, 0x67, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, + 0x61, 0x67, 0x65, 0x22, 0xfc, 0x01, 0x0a, 0x0d, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x55, + 0x70, 0x72, 0x6f, 0x62, 0x65, 0x12, 0x2b, 0x0a, 0x07, 0x70, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x74, 0x65, 0x74, 0x72, 0x61, 0x67, 0x6f, + 0x6e, 0x2e, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x52, 0x07, 0x70, 0x72, 0x6f, 0x63, 0x65, + 0x73, 0x73, 0x12, 0x29, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x74, 0x65, 0x74, 0x72, 0x61, 0x67, 0x6f, 0x6e, 0x2e, 0x50, 0x72, + 0x6f, 0x63, 0x65, 0x73, 0x73, 0x52, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x12, 0x12, 0x0a, + 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x70, 0x61, 0x74, + 0x68, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x79, 0x6d, 0x62, 0x6f, 0x6c, 0x18, 0x04, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x06, 0x73, 0x79, 0x6d, 0x62, 0x6f, 0x6c, 0x12, 0x1f, 0x0a, 0x0b, 0x70, 0x6f, 0x6c, + 0x69, 0x63, 0x79, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, + 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, + 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, 0x73, + 0x73, 0x61, 0x67, 0x65, 0x12, 0x2c, 0x0a, 0x04, 0x61, 0x72, 0x67, 0x73, 0x18, 0x07, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x74, 0x65, 0x74, 0x72, 0x61, 0x67, 0x6f, 0x6e, 0x2e, 0x4b, 0x70, + 0x72, 0x6f, 0x62, 0x65, 0x41, 0x72, 0x67, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x04, 0x61, 0x72, + 0x67, 0x73, 0x22, 0x96, 0x01, 0x0a, 0x0c, 0x4b, 0x65, 0x72, 0x6e, 0x65, 0x6c, 0x4d, 0x6f, 0x64, + 0x75, 0x6c, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x3d, 0x0a, 0x0c, 0x73, 0x69, 0x67, 0x6e, 0x61, + 0x74, 0x75, 0x72, 0x65, 0x5f, 0x6f, 0x6b, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, + 0x42, 0x6f, 0x6f, 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x0b, 0x73, 0x69, 0x67, 0x6e, 0x61, + 0x74, 0x75, 0x72, 0x65, 0x4f, 0x6b, 0x12, 0x33, 0x0a, 0x07, 0x74, 0x61, 0x69, 0x6e, 0x74, 0x65, + 0x64, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0e, 0x32, 0x19, 0x2e, 0x74, 0x65, 0x74, 0x72, 0x61, 0x67, + 0x6f, 0x6e, 0x2e, 0x54, 0x61, 0x69, 0x6e, 0x74, 0x65, 0x64, 0x42, 0x69, 0x74, 0x73, 0x54, 0x79, + 0x70, 0x65, 0x52, 0x07, 0x74, 0x61, 0x69, 0x6e, 0x74, 0x65, 0x64, 0x22, 0x56, 0x0a, 0x04, 0x54, + 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x61, 0x72, 0x67, 0x30, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x04, 0x52, 0x04, 0x61, 0x72, 0x67, 0x30, 0x12, 0x12, 0x0a, 0x04, 0x61, 0x72, 0x67, 0x31, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x04, 0x61, 0x72, 0x67, 0x31, 0x12, 0x12, 0x0a, 0x04, 0x61, + 0x72, 0x67, 0x32, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x04, 0x61, 0x72, 0x67, 0x32, 0x12, + 0x12, 0x0a, 0x04, 0x61, 0x72, 0x67, 0x33, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x52, 0x04, 0x61, + 0x72, 0x67, 0x33, 0x22, 0x51, 0x0a, 0x16, 0x47, 0x65, 0x74, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, + 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x37, 0x0a, + 0x09, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x5f, 0x73, 0x65, 0x74, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0e, + 0x32, 0x1a, 0x2e, 0x74, 0x65, 0x74, 0x72, 0x61, 0x67, 0x6f, 0x6e, 0x2e, 0x48, 0x65, 0x61, 0x6c, + 0x74, 0x68, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x54, 0x79, 0x70, 0x65, 0x52, 0x08, 0x65, 0x76, + 0x65, 0x6e, 0x74, 0x53, 0x65, 0x74, 0x22, 0x90, 0x01, 0x0a, 0x0c, 0x48, 0x65, 0x61, 0x6c, 0x74, + 0x68, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x30, 0x0a, 0x05, 0x65, 0x76, 0x65, 0x6e, 0x74, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1a, 0x2e, 0x74, 0x65, 0x74, 0x72, 0x61, 0x67, 0x6f, + 0x6e, 0x2e, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x54, 0x79, + 0x70, 0x65, 0x52, 0x05, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x34, 0x0a, 0x06, 0x73, 0x74, 0x61, + 0x74, 0x75, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1c, 0x2e, 0x74, 0x65, 0x74, 0x72, + 0x61, 0x67, 0x6f, 0x6e, 0x2e, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x53, 0x74, 0x61, 0x74, 0x75, + 0x73, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, + 0x18, 0x0a, 0x07, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x07, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x22, 0x56, 0x0a, 0x17, 0x47, 0x65, 0x74, + 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3b, 0x0a, 0x0d, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x5f, 0x73, + 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x74, 0x65, + 0x74, 0x72, 0x61, 0x67, 0x6f, 0x6e, 0x2e, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x53, 0x74, 0x61, + 0x74, 0x75, 0x73, 0x52, 0x0c, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x53, 0x74, 0x61, 0x74, 0x75, + 0x73, 0x22, 0x6a, 0x0a, 0x0d, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x4c, 0x6f, 0x61, 0x64, + 0x65, 0x72, 0x12, 0x2b, 0x0a, 0x07, 0x70, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x74, 0x65, 0x74, 0x72, 0x61, 0x67, 0x6f, 0x6e, 0x2e, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x52, 0x07, 0x70, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x12, - 0x29, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x11, 0x2e, 0x74, 0x65, 0x74, 0x72, 0x61, 0x67, 0x6f, 0x6e, 0x2e, 0x50, 0x72, 0x6f, 0x63, 0x65, - 0x73, 0x73, 0x52, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x75, - 0x62, 0x73, 0x79, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x75, 0x62, 0x73, - 0x79, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x05, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x2c, 0x0a, 0x04, 0x61, 0x72, 0x67, 0x73, - 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x74, 0x65, 0x74, 0x72, 0x61, 0x67, 0x6f, - 0x6e, 0x2e, 0x4b, 0x70, 0x72, 0x6f, 0x62, 0x65, 0x41, 0x72, 0x67, 0x75, 0x6d, 0x65, 0x6e, 0x74, - 0x52, 0x04, 0x61, 0x72, 0x67, 0x73, 0x12, 0x1f, 0x0a, 0x0b, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, - 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x70, 0x6f, 0x6c, - 0x69, 0x63, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x2e, 0x0a, 0x06, 0x61, 0x63, 0x74, 0x69, 0x6f, - 0x6e, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x16, 0x2e, 0x74, 0x65, 0x74, 0x72, 0x61, 0x67, - 0x6f, 0x6e, 0x2e, 0x4b, 0x70, 0x72, 0x6f, 0x62, 0x65, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, - 0x06, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, - 0x67, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, - 0x65, 0x22, 0xfc, 0x01, 0x0a, 0x0d, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x55, 0x70, 0x72, - 0x6f, 0x62, 0x65, 0x12, 0x2b, 0x0a, 0x07, 0x70, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x74, 0x65, 0x74, 0x72, 0x61, 0x67, 0x6f, 0x6e, 0x2e, - 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x52, 0x07, 0x70, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, - 0x12, 0x29, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x11, 0x2e, 0x74, 0x65, 0x74, 0x72, 0x61, 0x67, 0x6f, 0x6e, 0x2e, 0x50, 0x72, 0x6f, 0x63, - 0x65, 0x73, 0x73, 0x52, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x70, - 0x61, 0x74, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x12, - 0x16, 0x0a, 0x06, 0x73, 0x79, 0x6d, 0x62, 0x6f, 0x6c, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x06, 0x73, 0x79, 0x6d, 0x62, 0x6f, 0x6c, 0x12, 0x1f, 0x0a, 0x0b, 0x70, 0x6f, 0x6c, 0x69, 0x63, - 0x79, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x70, 0x6f, - 0x6c, 0x69, 0x63, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, - 0x61, 0x67, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, - 0x67, 0x65, 0x12, 0x2c, 0x0a, 0x04, 0x61, 0x72, 0x67, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, - 0x32, 0x18, 0x2e, 0x74, 0x65, 0x74, 0x72, 0x61, 0x67, 0x6f, 0x6e, 0x2e, 0x4b, 0x70, 0x72, 0x6f, - 0x62, 0x65, 0x41, 0x72, 0x67, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x04, 0x61, 0x72, 0x67, 0x73, - 0x22, 0x96, 0x01, 0x0a, 0x0c, 0x4b, 0x65, 0x72, 0x6e, 0x65, 0x6c, 0x4d, 0x6f, 0x64, 0x75, 0x6c, - 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x3d, 0x0a, 0x0c, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, - 0x72, 0x65, 0x5f, 0x6f, 0x6b, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, - 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x42, 0x6f, - 0x6f, 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x0b, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, - 0x72, 0x65, 0x4f, 0x6b, 0x12, 0x33, 0x0a, 0x07, 0x74, 0x61, 0x69, 0x6e, 0x74, 0x65, 0x64, 0x18, - 0x03, 0x20, 0x03, 0x28, 0x0e, 0x32, 0x19, 0x2e, 0x74, 0x65, 0x74, 0x72, 0x61, 0x67, 0x6f, 0x6e, - 0x2e, 0x54, 0x61, 0x69, 0x6e, 0x74, 0x65, 0x64, 0x42, 0x69, 0x74, 0x73, 0x54, 0x79, 0x70, 0x65, - 0x52, 0x07, 0x74, 0x61, 0x69, 0x6e, 0x74, 0x65, 0x64, 0x22, 0x56, 0x0a, 0x04, 0x54, 0x65, 0x73, - 0x74, 0x12, 0x12, 0x0a, 0x04, 0x61, 0x72, 0x67, 0x30, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, - 0x04, 0x61, 0x72, 0x67, 0x30, 0x12, 0x12, 0x0a, 0x04, 0x61, 0x72, 0x67, 0x31, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x04, 0x52, 0x04, 0x61, 0x72, 0x67, 0x31, 0x12, 0x12, 0x0a, 0x04, 0x61, 0x72, 0x67, - 0x32, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x04, 0x61, 0x72, 0x67, 0x32, 0x12, 0x12, 0x0a, - 0x04, 0x61, 0x72, 0x67, 0x33, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x52, 0x04, 0x61, 0x72, 0x67, - 0x33, 0x22, 0x51, 0x0a, 0x16, 0x47, 0x65, 0x74, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x53, 0x74, - 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x37, 0x0a, 0x09, 0x65, - 0x76, 0x65, 0x6e, 0x74, 0x5f, 0x73, 0x65, 0x74, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0e, 0x32, 0x1a, - 0x2e, 0x74, 0x65, 0x74, 0x72, 0x61, 0x67, 0x6f, 0x6e, 0x2e, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, - 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x54, 0x79, 0x70, 0x65, 0x52, 0x08, 0x65, 0x76, 0x65, 0x6e, - 0x74, 0x53, 0x65, 0x74, 0x22, 0x90, 0x01, 0x0a, 0x0c, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x53, - 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x30, 0x0a, 0x05, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1a, 0x2e, 0x74, 0x65, 0x74, 0x72, 0x61, 0x67, 0x6f, 0x6e, 0x2e, - 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x54, 0x79, 0x70, 0x65, - 0x52, 0x05, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x34, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, - 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1c, 0x2e, 0x74, 0x65, 0x74, 0x72, 0x61, 0x67, - 0x6f, 0x6e, 0x2e, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, - 0x65, 0x73, 0x75, 0x6c, 0x74, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x18, 0x0a, - 0x07, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, - 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x22, 0x56, 0x0a, 0x17, 0x47, 0x65, 0x74, 0x48, 0x65, - 0x61, 0x6c, 0x74, 0x68, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x12, 0x3b, 0x0a, 0x0d, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x5f, 0x73, 0x74, 0x61, - 0x74, 0x75, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x74, 0x65, 0x74, 0x72, - 0x61, 0x67, 0x6f, 0x6e, 0x2e, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x53, 0x74, 0x61, 0x74, 0x75, - 0x73, 0x52, 0x0c, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, - 0x6a, 0x0a, 0x0d, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x4c, 0x6f, 0x61, 0x64, 0x65, 0x72, - 0x12, 0x2b, 0x0a, 0x07, 0x70, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x11, 0x2e, 0x74, 0x65, 0x74, 0x72, 0x61, 0x67, 0x6f, 0x6e, 0x2e, 0x50, 0x72, 0x6f, - 0x63, 0x65, 0x73, 0x73, 0x52, 0x07, 0x70, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x12, 0x12, 0x0a, - 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x70, 0x61, 0x74, - 0x68, 0x12, 0x18, 0x0a, 0x07, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x0c, 0x52, 0x07, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x69, 0x64, 0x22, 0x64, 0x0a, 0x12, 0x52, - 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x48, 0x6f, 0x6f, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x12, 0x45, 0x0a, 0x0f, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x61, - 0x69, 0x6e, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x74, 0x65, 0x74, - 0x72, 0x61, 0x67, 0x6f, 0x6e, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x74, - 0x61, 0x69, 0x6e, 0x65, 0x72, 0x48, 0x00, 0x52, 0x0f, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x43, - 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x42, 0x07, 0x0a, 0x05, 0x65, 0x76, 0x65, 0x6e, - 0x74, 0x22, 0x15, 0x0a, 0x13, 0x52, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x48, 0x6f, 0x6f, 0x6b, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xdb, 0x01, 0x0a, 0x0f, 0x43, 0x72, 0x65, - 0x61, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x12, 0x20, 0x0a, 0x0b, - 0x63, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x50, 0x61, 0x74, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x0b, 0x63, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x50, 0x61, 0x74, 0x68, 0x12, 0x18, - 0x0a, 0x07, 0x72, 0x6f, 0x6f, 0x74, 0x44, 0x69, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x07, 0x72, 0x6f, 0x6f, 0x74, 0x44, 0x69, 0x72, 0x12, 0x4c, 0x0a, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, - 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2a, 0x2e, - 0x74, 0x65, 0x74, 0x72, 0x61, 0x67, 0x6f, 0x6e, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x43, - 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x2e, 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x1a, 0x3e, 0x0a, 0x10, 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, - 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, - 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, - 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x5b, 0x0a, 0x0f, 0x53, 0x74, 0x61, 0x63, 0x6b, 0x54, - 0x72, 0x61, 0x63, 0x65, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x64, 0x64, - 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, - 0x65, 0x73, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x04, 0x52, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x73, - 0x79, 0x6d, 0x62, 0x6f, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x79, 0x6d, - 0x62, 0x6f, 0x6c, 0x2a, 0x95, 0x03, 0x0a, 0x0c, 0x4b, 0x70, 0x72, 0x6f, 0x62, 0x65, 0x41, 0x63, - 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x19, 0x0a, 0x15, 0x4b, 0x50, 0x52, 0x4f, 0x42, 0x45, 0x5f, 0x41, - 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, - 0x16, 0x0a, 0x12, 0x4b, 0x50, 0x52, 0x4f, 0x42, 0x45, 0x5f, 0x41, 0x43, 0x54, 0x49, 0x4f, 0x4e, - 0x5f, 0x50, 0x4f, 0x53, 0x54, 0x10, 0x01, 0x12, 0x1a, 0x0a, 0x16, 0x4b, 0x50, 0x52, 0x4f, 0x42, - 0x45, 0x5f, 0x41, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x46, 0x4f, 0x4c, 0x4c, 0x4f, 0x57, 0x46, - 0x44, 0x10, 0x02, 0x12, 0x19, 0x0a, 0x15, 0x4b, 0x50, 0x52, 0x4f, 0x42, 0x45, 0x5f, 0x41, 0x43, - 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x53, 0x49, 0x47, 0x4b, 0x49, 0x4c, 0x4c, 0x10, 0x03, 0x12, 0x1c, - 0x0a, 0x18, 0x4b, 0x50, 0x52, 0x4f, 0x42, 0x45, 0x5f, 0x41, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x5f, - 0x55, 0x4e, 0x46, 0x4f, 0x4c, 0x4c, 0x4f, 0x57, 0x46, 0x44, 0x10, 0x04, 0x12, 0x1a, 0x0a, 0x16, - 0x4b, 0x50, 0x52, 0x4f, 0x42, 0x45, 0x5f, 0x41, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x4f, 0x56, - 0x45, 0x52, 0x52, 0x49, 0x44, 0x45, 0x10, 0x05, 0x12, 0x18, 0x0a, 0x14, 0x4b, 0x50, 0x52, 0x4f, - 0x42, 0x45, 0x5f, 0x41, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x43, 0x4f, 0x50, 0x59, 0x46, 0x44, - 0x10, 0x06, 0x12, 0x18, 0x0a, 0x14, 0x4b, 0x50, 0x52, 0x4f, 0x42, 0x45, 0x5f, 0x41, 0x43, 0x54, - 0x49, 0x4f, 0x4e, 0x5f, 0x47, 0x45, 0x54, 0x55, 0x52, 0x4c, 0x10, 0x07, 0x12, 0x1b, 0x0a, 0x17, - 0x4b, 0x50, 0x52, 0x4f, 0x42, 0x45, 0x5f, 0x41, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x44, 0x4e, - 0x53, 0x4c, 0x4f, 0x4f, 0x4b, 0x55, 0x50, 0x10, 0x08, 0x12, 0x18, 0x0a, 0x14, 0x4b, 0x50, 0x52, - 0x4f, 0x42, 0x45, 0x5f, 0x41, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x4e, 0x4f, 0x50, 0x4f, 0x53, - 0x54, 0x10, 0x09, 0x12, 0x18, 0x0a, 0x14, 0x4b, 0x50, 0x52, 0x4f, 0x42, 0x45, 0x5f, 0x41, 0x43, - 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x53, 0x49, 0x47, 0x4e, 0x41, 0x4c, 0x10, 0x0a, 0x12, 0x1b, 0x0a, - 0x17, 0x4b, 0x50, 0x52, 0x4f, 0x42, 0x45, 0x5f, 0x41, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x54, - 0x52, 0x41, 0x43, 0x4b, 0x53, 0x4f, 0x43, 0x4b, 0x10, 0x0b, 0x12, 0x1d, 0x0a, 0x19, 0x4b, 0x50, - 0x52, 0x4f, 0x42, 0x45, 0x5f, 0x41, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x55, 0x4e, 0x54, 0x52, - 0x41, 0x43, 0x4b, 0x53, 0x4f, 0x43, 0x4b, 0x10, 0x0c, 0x12, 0x20, 0x0a, 0x1c, 0x4b, 0x50, 0x52, - 0x4f, 0x42, 0x45, 0x5f, 0x41, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x4e, 0x4f, 0x54, 0x49, 0x46, - 0x59, 0x45, 0x4e, 0x46, 0x4f, 0x52, 0x43, 0x45, 0x52, 0x10, 0x0d, 0x2a, 0x4f, 0x0a, 0x10, 0x48, - 0x65, 0x61, 0x6c, 0x74, 0x68, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x54, 0x79, 0x70, 0x65, 0x12, - 0x1c, 0x0a, 0x18, 0x48, 0x45, 0x41, 0x4c, 0x54, 0x48, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, - 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x44, 0x45, 0x46, 0x10, 0x00, 0x12, 0x1d, 0x0a, - 0x19, 0x48, 0x45, 0x41, 0x4c, 0x54, 0x48, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x54, - 0x59, 0x50, 0x45, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x10, 0x01, 0x2a, 0x7c, 0x0a, 0x12, - 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x75, - 0x6c, 0x74, 0x12, 0x17, 0x0a, 0x13, 0x48, 0x45, 0x41, 0x4c, 0x54, 0x48, 0x5f, 0x53, 0x54, 0x41, - 0x54, 0x55, 0x53, 0x5f, 0x55, 0x4e, 0x44, 0x45, 0x46, 0x10, 0x00, 0x12, 0x19, 0x0a, 0x15, 0x48, - 0x45, 0x41, 0x4c, 0x54, 0x48, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x52, 0x55, 0x4e, - 0x4e, 0x49, 0x4e, 0x47, 0x10, 0x01, 0x12, 0x19, 0x0a, 0x15, 0x48, 0x45, 0x41, 0x4c, 0x54, 0x48, - 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x53, 0x54, 0x4f, 0x50, 0x50, 0x45, 0x44, 0x10, - 0x02, 0x12, 0x17, 0x0a, 0x13, 0x48, 0x45, 0x41, 0x4c, 0x54, 0x48, 0x5f, 0x53, 0x54, 0x41, 0x54, - 0x55, 0x53, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x10, 0x03, 0x2a, 0x8d, 0x02, 0x0a, 0x0f, 0x54, - 0x61, 0x69, 0x6e, 0x74, 0x65, 0x64, 0x42, 0x69, 0x74, 0x73, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0f, - 0x0a, 0x0b, 0x54, 0x41, 0x49, 0x4e, 0x54, 0x5f, 0x55, 0x4e, 0x53, 0x45, 0x54, 0x10, 0x00, 0x12, - 0x1c, 0x0a, 0x18, 0x54, 0x41, 0x49, 0x4e, 0x54, 0x5f, 0x50, 0x52, 0x4f, 0x50, 0x52, 0x49, 0x45, - 0x54, 0x41, 0x52, 0x59, 0x5f, 0x4d, 0x4f, 0x44, 0x55, 0x4c, 0x45, 0x10, 0x01, 0x12, 0x17, 0x0a, - 0x13, 0x54, 0x41, 0x49, 0x4e, 0x54, 0x5f, 0x46, 0x4f, 0x52, 0x43, 0x45, 0x44, 0x5f, 0x4d, 0x4f, - 0x44, 0x55, 0x4c, 0x45, 0x10, 0x02, 0x12, 0x1e, 0x0a, 0x1a, 0x54, 0x41, 0x49, 0x4e, 0x54, 0x5f, - 0x46, 0x4f, 0x52, 0x43, 0x45, 0x44, 0x5f, 0x55, 0x4e, 0x4c, 0x4f, 0x41, 0x44, 0x5f, 0x4d, 0x4f, - 0x44, 0x55, 0x4c, 0x45, 0x10, 0x04, 0x12, 0x18, 0x0a, 0x13, 0x54, 0x41, 0x49, 0x4e, 0x54, 0x5f, - 0x53, 0x54, 0x41, 0x47, 0x45, 0x44, 0x5f, 0x4d, 0x4f, 0x44, 0x55, 0x4c, 0x45, 0x10, 0x80, 0x08, - 0x12, 0x1d, 0x0a, 0x18, 0x54, 0x41, 0x49, 0x4e, 0x54, 0x5f, 0x4f, 0x55, 0x54, 0x5f, 0x4f, 0x46, - 0x5f, 0x54, 0x52, 0x45, 0x45, 0x5f, 0x4d, 0x4f, 0x44, 0x55, 0x4c, 0x45, 0x10, 0x80, 0x20, 0x12, - 0x1a, 0x0a, 0x15, 0x54, 0x41, 0x49, 0x4e, 0x54, 0x5f, 0x55, 0x4e, 0x53, 0x49, 0x47, 0x4e, 0x45, - 0x44, 0x5f, 0x4d, 0x4f, 0x44, 0x55, 0x4c, 0x45, 0x10, 0x80, 0x40, 0x12, 0x24, 0x0a, 0x1e, 0x54, - 0x41, 0x49, 0x4e, 0x54, 0x5f, 0x4b, 0x45, 0x52, 0x4e, 0x45, 0x4c, 0x5f, 0x4c, 0x49, 0x56, 0x45, - 0x5f, 0x50, 0x41, 0x54, 0x43, 0x48, 0x5f, 0x4d, 0x4f, 0x44, 0x55, 0x4c, 0x45, 0x10, 0x80, 0x80, - 0x02, 0x12, 0x17, 0x0a, 0x11, 0x54, 0x41, 0x49, 0x4e, 0x54, 0x5f, 0x54, 0x45, 0x53, 0x54, 0x5f, - 0x4d, 0x4f, 0x44, 0x55, 0x4c, 0x45, 0x10, 0x80, 0x80, 0x10, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x33, + 0x12, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x70, + 0x61, 0x74, 0x68, 0x12, 0x18, 0x0a, 0x07, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x69, 0x64, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x69, 0x64, 0x22, 0x64, 0x0a, + 0x12, 0x52, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x48, 0x6f, 0x6f, 0x6b, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x12, 0x45, 0x0a, 0x0f, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x43, 0x6f, 0x6e, + 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x74, + 0x65, 0x74, 0x72, 0x61, 0x67, 0x6f, 0x6e, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x43, 0x6f, + 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x48, 0x00, 0x52, 0x0f, 0x63, 0x72, 0x65, 0x61, 0x74, + 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x42, 0x07, 0x0a, 0x05, 0x65, 0x76, + 0x65, 0x6e, 0x74, 0x22, 0x15, 0x0a, 0x13, 0x52, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x48, 0x6f, + 0x6f, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xdb, 0x01, 0x0a, 0x0f, 0x43, + 0x72, 0x65, 0x61, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x12, 0x20, + 0x0a, 0x0b, 0x63, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x50, 0x61, 0x74, 0x68, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x0b, 0x63, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x50, 0x61, 0x74, 0x68, + 0x12, 0x18, 0x0a, 0x07, 0x72, 0x6f, 0x6f, 0x74, 0x44, 0x69, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x07, 0x72, 0x6f, 0x6f, 0x74, 0x44, 0x69, 0x72, 0x12, 0x4c, 0x0a, 0x0b, 0x61, 0x6e, + 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x2a, 0x2e, 0x74, 0x65, 0x74, 0x72, 0x61, 0x67, 0x6f, 0x6e, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, + 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x2e, 0x41, 0x6e, 0x6e, 0x6f, 0x74, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0b, 0x61, 0x6e, 0x6e, + 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x1a, 0x3e, 0x0a, 0x10, 0x41, 0x6e, 0x6e, 0x6f, + 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, + 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, + 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, + 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x73, 0x0a, 0x0f, 0x53, 0x74, 0x61, 0x63, + 0x6b, 0x54, 0x72, 0x61, 0x63, 0x65, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x18, 0x0a, 0x07, 0x61, + 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x07, 0x61, 0x64, + 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x12, 0x16, 0x0a, + 0x06, 0x73, 0x79, 0x6d, 0x62, 0x6f, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, + 0x79, 0x6d, 0x62, 0x6f, 0x6c, 0x12, 0x16, 0x0a, 0x06, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x18, + 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2a, 0x95, 0x03, + 0x0a, 0x0c, 0x4b, 0x70, 0x72, 0x6f, 0x62, 0x65, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x19, + 0x0a, 0x15, 0x4b, 0x50, 0x52, 0x4f, 0x42, 0x45, 0x5f, 0x41, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x5f, + 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x16, 0x0a, 0x12, 0x4b, 0x50, 0x52, + 0x4f, 0x42, 0x45, 0x5f, 0x41, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x50, 0x4f, 0x53, 0x54, 0x10, + 0x01, 0x12, 0x1a, 0x0a, 0x16, 0x4b, 0x50, 0x52, 0x4f, 0x42, 0x45, 0x5f, 0x41, 0x43, 0x54, 0x49, + 0x4f, 0x4e, 0x5f, 0x46, 0x4f, 0x4c, 0x4c, 0x4f, 0x57, 0x46, 0x44, 0x10, 0x02, 0x12, 0x19, 0x0a, + 0x15, 0x4b, 0x50, 0x52, 0x4f, 0x42, 0x45, 0x5f, 0x41, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x53, + 0x49, 0x47, 0x4b, 0x49, 0x4c, 0x4c, 0x10, 0x03, 0x12, 0x1c, 0x0a, 0x18, 0x4b, 0x50, 0x52, 0x4f, + 0x42, 0x45, 0x5f, 0x41, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x55, 0x4e, 0x46, 0x4f, 0x4c, 0x4c, + 0x4f, 0x57, 0x46, 0x44, 0x10, 0x04, 0x12, 0x1a, 0x0a, 0x16, 0x4b, 0x50, 0x52, 0x4f, 0x42, 0x45, + 0x5f, 0x41, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x4f, 0x56, 0x45, 0x52, 0x52, 0x49, 0x44, 0x45, + 0x10, 0x05, 0x12, 0x18, 0x0a, 0x14, 0x4b, 0x50, 0x52, 0x4f, 0x42, 0x45, 0x5f, 0x41, 0x43, 0x54, + 0x49, 0x4f, 0x4e, 0x5f, 0x43, 0x4f, 0x50, 0x59, 0x46, 0x44, 0x10, 0x06, 0x12, 0x18, 0x0a, 0x14, + 0x4b, 0x50, 0x52, 0x4f, 0x42, 0x45, 0x5f, 0x41, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x47, 0x45, + 0x54, 0x55, 0x52, 0x4c, 0x10, 0x07, 0x12, 0x1b, 0x0a, 0x17, 0x4b, 0x50, 0x52, 0x4f, 0x42, 0x45, + 0x5f, 0x41, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x44, 0x4e, 0x53, 0x4c, 0x4f, 0x4f, 0x4b, 0x55, + 0x50, 0x10, 0x08, 0x12, 0x18, 0x0a, 0x14, 0x4b, 0x50, 0x52, 0x4f, 0x42, 0x45, 0x5f, 0x41, 0x43, + 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x4e, 0x4f, 0x50, 0x4f, 0x53, 0x54, 0x10, 0x09, 0x12, 0x18, 0x0a, + 0x14, 0x4b, 0x50, 0x52, 0x4f, 0x42, 0x45, 0x5f, 0x41, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x53, + 0x49, 0x47, 0x4e, 0x41, 0x4c, 0x10, 0x0a, 0x12, 0x1b, 0x0a, 0x17, 0x4b, 0x50, 0x52, 0x4f, 0x42, + 0x45, 0x5f, 0x41, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x54, 0x52, 0x41, 0x43, 0x4b, 0x53, 0x4f, + 0x43, 0x4b, 0x10, 0x0b, 0x12, 0x1d, 0x0a, 0x19, 0x4b, 0x50, 0x52, 0x4f, 0x42, 0x45, 0x5f, 0x41, + 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x55, 0x4e, 0x54, 0x52, 0x41, 0x43, 0x4b, 0x53, 0x4f, 0x43, + 0x4b, 0x10, 0x0c, 0x12, 0x20, 0x0a, 0x1c, 0x4b, 0x50, 0x52, 0x4f, 0x42, 0x45, 0x5f, 0x41, 0x43, + 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x4e, 0x4f, 0x54, 0x49, 0x46, 0x59, 0x45, 0x4e, 0x46, 0x4f, 0x52, + 0x43, 0x45, 0x52, 0x10, 0x0d, 0x2a, 0x4f, 0x0a, 0x10, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x53, + 0x74, 0x61, 0x74, 0x75, 0x73, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1c, 0x0a, 0x18, 0x48, 0x45, 0x41, + 0x4c, 0x54, 0x48, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, + 0x55, 0x4e, 0x44, 0x45, 0x46, 0x10, 0x00, 0x12, 0x1d, 0x0a, 0x19, 0x48, 0x45, 0x41, 0x4c, 0x54, + 0x48, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x53, 0x54, + 0x41, 0x54, 0x55, 0x53, 0x10, 0x01, 0x2a, 0x7c, 0x0a, 0x12, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, + 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x17, 0x0a, 0x13, + 0x48, 0x45, 0x41, 0x4c, 0x54, 0x48, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x55, 0x4e, + 0x44, 0x45, 0x46, 0x10, 0x00, 0x12, 0x19, 0x0a, 0x15, 0x48, 0x45, 0x41, 0x4c, 0x54, 0x48, 0x5f, + 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x52, 0x55, 0x4e, 0x4e, 0x49, 0x4e, 0x47, 0x10, 0x01, + 0x12, 0x19, 0x0a, 0x15, 0x48, 0x45, 0x41, 0x4c, 0x54, 0x48, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, + 0x53, 0x5f, 0x53, 0x54, 0x4f, 0x50, 0x50, 0x45, 0x44, 0x10, 0x02, 0x12, 0x17, 0x0a, 0x13, 0x48, + 0x45, 0x41, 0x4c, 0x54, 0x48, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x45, 0x52, 0x52, + 0x4f, 0x52, 0x10, 0x03, 0x2a, 0x8d, 0x02, 0x0a, 0x0f, 0x54, 0x61, 0x69, 0x6e, 0x74, 0x65, 0x64, + 0x42, 0x69, 0x74, 0x73, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0f, 0x0a, 0x0b, 0x54, 0x41, 0x49, 0x4e, + 0x54, 0x5f, 0x55, 0x4e, 0x53, 0x45, 0x54, 0x10, 0x00, 0x12, 0x1c, 0x0a, 0x18, 0x54, 0x41, 0x49, + 0x4e, 0x54, 0x5f, 0x50, 0x52, 0x4f, 0x50, 0x52, 0x49, 0x45, 0x54, 0x41, 0x52, 0x59, 0x5f, 0x4d, + 0x4f, 0x44, 0x55, 0x4c, 0x45, 0x10, 0x01, 0x12, 0x17, 0x0a, 0x13, 0x54, 0x41, 0x49, 0x4e, 0x54, + 0x5f, 0x46, 0x4f, 0x52, 0x43, 0x45, 0x44, 0x5f, 0x4d, 0x4f, 0x44, 0x55, 0x4c, 0x45, 0x10, 0x02, + 0x12, 0x1e, 0x0a, 0x1a, 0x54, 0x41, 0x49, 0x4e, 0x54, 0x5f, 0x46, 0x4f, 0x52, 0x43, 0x45, 0x44, + 0x5f, 0x55, 0x4e, 0x4c, 0x4f, 0x41, 0x44, 0x5f, 0x4d, 0x4f, 0x44, 0x55, 0x4c, 0x45, 0x10, 0x04, + 0x12, 0x18, 0x0a, 0x13, 0x54, 0x41, 0x49, 0x4e, 0x54, 0x5f, 0x53, 0x54, 0x41, 0x47, 0x45, 0x44, + 0x5f, 0x4d, 0x4f, 0x44, 0x55, 0x4c, 0x45, 0x10, 0x80, 0x08, 0x12, 0x1d, 0x0a, 0x18, 0x54, 0x41, + 0x49, 0x4e, 0x54, 0x5f, 0x4f, 0x55, 0x54, 0x5f, 0x4f, 0x46, 0x5f, 0x54, 0x52, 0x45, 0x45, 0x5f, + 0x4d, 0x4f, 0x44, 0x55, 0x4c, 0x45, 0x10, 0x80, 0x20, 0x12, 0x1a, 0x0a, 0x15, 0x54, 0x41, 0x49, + 0x4e, 0x54, 0x5f, 0x55, 0x4e, 0x53, 0x49, 0x47, 0x4e, 0x45, 0x44, 0x5f, 0x4d, 0x4f, 0x44, 0x55, + 0x4c, 0x45, 0x10, 0x80, 0x40, 0x12, 0x24, 0x0a, 0x1e, 0x54, 0x41, 0x49, 0x4e, 0x54, 0x5f, 0x4b, + 0x45, 0x52, 0x4e, 0x45, 0x4c, 0x5f, 0x4c, 0x49, 0x56, 0x45, 0x5f, 0x50, 0x41, 0x54, 0x43, 0x48, + 0x5f, 0x4d, 0x4f, 0x44, 0x55, 0x4c, 0x45, 0x10, 0x80, 0x80, 0x02, 0x12, 0x17, 0x0a, 0x11, 0x54, + 0x41, 0x49, 0x4e, 0x54, 0x5f, 0x54, 0x45, 0x53, 0x54, 0x5f, 0x4d, 0x4f, 0x44, 0x55, 0x4c, 0x45, + 0x10, 0x80, 0x80, 0x10, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -4656,29 +4680,30 @@ var file_tetragon_tetragon_proto_depIdxs = []int32{ 30, // 80: tetragon.ProcessKprobe.args:type_name -> tetragon.KprobeArgument 30, // 81: tetragon.ProcessKprobe.return:type_name -> tetragon.KprobeArgument 0, // 82: tetragon.ProcessKprobe.action:type_name -> tetragon.KprobeAction - 43, // 83: tetragon.ProcessKprobe.stack_trace:type_name -> tetragon.StackTraceEntry + 43, // 83: tetragon.ProcessKprobe.kernel_stack_trace:type_name -> tetragon.StackTraceEntry 0, // 84: tetragon.ProcessKprobe.return_action:type_name -> tetragon.KprobeAction - 15, // 85: tetragon.ProcessTracepoint.process:type_name -> tetragon.Process - 15, // 86: tetragon.ProcessTracepoint.parent:type_name -> tetragon.Process - 30, // 87: tetragon.ProcessTracepoint.args:type_name -> tetragon.KprobeArgument - 0, // 88: tetragon.ProcessTracepoint.action:type_name -> tetragon.KprobeAction - 15, // 89: tetragon.ProcessUprobe.process:type_name -> tetragon.Process - 15, // 90: tetragon.ProcessUprobe.parent:type_name -> tetragon.Process - 30, // 91: tetragon.ProcessUprobe.args:type_name -> tetragon.KprobeArgument - 52, // 92: tetragon.KernelModule.signature_ok:type_name -> google.protobuf.BoolValue - 3, // 93: tetragon.KernelModule.tainted:type_name -> tetragon.TaintedBitsType - 1, // 94: tetragon.GetHealthStatusRequest.event_set:type_name -> tetragon.HealthStatusType - 1, // 95: tetragon.HealthStatus.event:type_name -> tetragon.HealthStatusType - 2, // 96: tetragon.HealthStatus.status:type_name -> tetragon.HealthStatusResult - 37, // 97: tetragon.GetHealthStatusResponse.health_status:type_name -> tetragon.HealthStatus - 15, // 98: tetragon.ProcessLoader.process:type_name -> tetragon.Process - 42, // 99: tetragon.RuntimeHookRequest.createContainer:type_name -> tetragon.CreateContainer - 45, // 100: tetragon.CreateContainer.annotations:type_name -> tetragon.CreateContainer.AnnotationsEntry - 101, // [101:101] is the sub-list for method output_type - 101, // [101:101] is the sub-list for method input_type - 101, // [101:101] is the sub-list for extension type_name - 101, // [101:101] is the sub-list for extension extendee - 0, // [0:101] is the sub-list for field type_name + 43, // 85: tetragon.ProcessKprobe.user_stack_trace:type_name -> tetragon.StackTraceEntry + 15, // 86: tetragon.ProcessTracepoint.process:type_name -> tetragon.Process + 15, // 87: tetragon.ProcessTracepoint.parent:type_name -> tetragon.Process + 30, // 88: tetragon.ProcessTracepoint.args:type_name -> tetragon.KprobeArgument + 0, // 89: tetragon.ProcessTracepoint.action:type_name -> tetragon.KprobeAction + 15, // 90: tetragon.ProcessUprobe.process:type_name -> tetragon.Process + 15, // 91: tetragon.ProcessUprobe.parent:type_name -> tetragon.Process + 30, // 92: tetragon.ProcessUprobe.args:type_name -> tetragon.KprobeArgument + 52, // 93: tetragon.KernelModule.signature_ok:type_name -> google.protobuf.BoolValue + 3, // 94: tetragon.KernelModule.tainted:type_name -> tetragon.TaintedBitsType + 1, // 95: tetragon.GetHealthStatusRequest.event_set:type_name -> tetragon.HealthStatusType + 1, // 96: tetragon.HealthStatus.event:type_name -> tetragon.HealthStatusType + 2, // 97: tetragon.HealthStatus.status:type_name -> tetragon.HealthStatusResult + 37, // 98: tetragon.GetHealthStatusResponse.health_status:type_name -> tetragon.HealthStatus + 15, // 99: tetragon.ProcessLoader.process:type_name -> tetragon.Process + 42, // 100: tetragon.RuntimeHookRequest.createContainer:type_name -> tetragon.CreateContainer + 45, // 101: tetragon.CreateContainer.annotations:type_name -> tetragon.CreateContainer.AnnotationsEntry + 102, // [102:102] is the sub-list for method output_type + 102, // [102:102] is the sub-list for method input_type + 102, // [102:102] is the sub-list for extension type_name + 102, // [102:102] is the sub-list for extension extendee + 0, // [0:102] is the sub-list for field type_name } func init() { file_tetragon_tetragon_proto_init() } diff --git a/vendor/github.com/cilium/tetragon/api/v1/tetragon/tetragon.proto b/vendor/github.com/cilium/tetragon/api/v1/tetragon/tetragon.proto index a559086c616..d9989e62d19 100644 --- a/vendor/github.com/cilium/tetragon/api/v1/tetragon/tetragon.proto +++ b/vendor/github.com/cilium/tetragon/api/v1/tetragon/tetragon.proto @@ -454,13 +454,15 @@ message ProcessKprobe { // Action performed when the kprobe matched. KprobeAction action = 6; // Kernel stack trace to the call. - repeated StackTraceEntry stack_trace = 7; + repeated StackTraceEntry kernel_stack_trace = 7; // Name of the Tracing Policy that created that kprobe. string policy_name = 8; // Action performed when the return kprobe executed. KprobeAction return_action = 9; // Short message of the Tracing Policy to inform users what is going on. string message = 10; + // User-mode stack trace to the call. + repeated StackTraceEntry user_stack_trace = 11; } message ProcessTracepoint { @@ -601,10 +603,12 @@ message CreateContainer { } message StackTraceEntry { - // address is the kernel function address. + // linear address of the function in kernel or user space. uint64 address = 1; // offset is the offset into the native instructions for the function. uint64 offset = 2; // symbol is the symbol name of the function. string symbol = 3; + // module path for user space addresses. + string module = 4; } diff --git a/vendor/github.com/cilium/tetragon/pkg/k8s/apis/cilium.io/client/crds/v1alpha1/cilium.io_tracingpolicies.yaml b/vendor/github.com/cilium/tetragon/pkg/k8s/apis/cilium.io/client/crds/v1alpha1/cilium.io_tracingpolicies.yaml index d83ff0becce..6a2e013a700 100644 --- a/vendor/github.com/cilium/tetragon/pkg/k8s/apis/cilium.io/client/crds/v1alpha1/cilium.io_tracingpolicies.yaml +++ b/vendor/github.com/cilium/tetragon/pkg/k8s/apis/cilium.io/client/crds/v1alpha1/cilium.io_tracingpolicies.yaml @@ -316,10 +316,14 @@ spec: process or thread caused the action. Only valid with the post action and with a rateLimit specified. type: string - stackTrace: - description: Enable stack trace export. Only valid + kernelStackTrace: + description: Enable kernel stack trace export. Only valid with the post action. type: boolean + userStackTrace: + description: Enable user stack trace export. Only + valid with the post action. + type: boolean required: - action type: object @@ -624,10 +628,14 @@ spec: process or thread caused the action. Only valid with the post action and with a rateLimit specified. type: string - stackTrace: - description: Enable stack trace export. Only valid + kernelStackTrace: + description: Enable kernel stack trace export. Only valid with the post action. type: boolean + userStackTrace: + description: Enable user stack trace export. Only + valid with the post action. + type: boolean required: - action type: object @@ -971,10 +979,14 @@ spec: process or thread caused the action. Only valid with the post action and with a rateLimit specified. type: string - stackTrace: - description: Enable stack trace export. Only valid + kernelStackTrace: + description: Enable kernel stack trace export. Only valid with the post action. type: boolean + userStackTrace: + description: Enable user stack trace export. Only + valid with the post action. + type: boolean required: - action type: object @@ -1279,10 +1291,14 @@ spec: process or thread caused the action. Only valid with the post action and with a rateLimit specified. type: string - stackTrace: - description: Enable stack trace export. Only valid + kernelStackTrace: + description: Enable kernel stack trace export. Only valid with the post action. type: boolean + userStackTrace: + description: Enable user stack trace export. Only + valid with the post action. + type: boolean required: - action type: object @@ -1527,10 +1543,14 @@ spec: process or thread caused the action. Only valid with the post action and with a rateLimit specified. type: string - stackTrace: - description: Enable stack trace export. Only valid + kernelStackTrace: + description: Enable kernel stack trace export. Only valid with the post action. type: boolean + userStackTrace: + description: Enable user stack trace export. Only + valid with the post action. + type: boolean required: - action type: object @@ -1835,10 +1855,14 @@ spec: process or thread caused the action. Only valid with the post action and with a rateLimit specified. type: string - stackTrace: - description: Enable stack trace export. Only valid + kernelStackTrace: + description: Enable kernel stack trace export. Only valid with the post action. type: boolean + userStackTrace: + description: Enable user stack trace export. Only + valid with the post action. + type: boolean required: - action type: object diff --git a/vendor/github.com/cilium/tetragon/pkg/k8s/apis/cilium.io/client/crds/v1alpha1/cilium.io_tracingpoliciesnamespaced.yaml b/vendor/github.com/cilium/tetragon/pkg/k8s/apis/cilium.io/client/crds/v1alpha1/cilium.io_tracingpoliciesnamespaced.yaml index da8deb3a2d9..051688e147c 100644 --- a/vendor/github.com/cilium/tetragon/pkg/k8s/apis/cilium.io/client/crds/v1alpha1/cilium.io_tracingpoliciesnamespaced.yaml +++ b/vendor/github.com/cilium/tetragon/pkg/k8s/apis/cilium.io/client/crds/v1alpha1/cilium.io_tracingpoliciesnamespaced.yaml @@ -320,6 +320,10 @@ spec: description: Enable stack trace export. Only valid with the post action. type: boolean + userStackTrace: + description: Enable user stack trace export. Only + valid with the post action. + type: boolean required: - action type: object @@ -628,6 +632,10 @@ spec: description: Enable stack trace export. Only valid with the post action. type: boolean + userStackTrace: + description: Enable user stack trace export. Only + valid with the post action. + type: boolean required: - action type: object @@ -975,6 +983,10 @@ spec: description: Enable stack trace export. Only valid with the post action. type: boolean + userStackTrace: + description: Enable user stack trace export. Only + valid with the post action. + type: boolean required: - action type: object @@ -1283,6 +1295,10 @@ spec: description: Enable stack trace export. Only valid with the post action. type: boolean + userStackTrace: + description: Enable user stack trace export. Only + valid with the post action. + type: boolean required: - action type: object @@ -1531,6 +1547,10 @@ spec: description: Enable stack trace export. Only valid with the post action. type: boolean + userStackTrace: + description: Enable user stack trace export. Only + valid with the post action. + type: boolean required: - action type: object @@ -1839,6 +1859,10 @@ spec: description: Enable stack trace export. Only valid with the post action. type: boolean + userStackTrace: + description: Enable user stack trace export. Only + valid with the post action. + type: boolean required: - action type: object diff --git a/vendor/github.com/cilium/tetragon/pkg/k8s/apis/cilium.io/v1alpha1/types.go b/vendor/github.com/cilium/tetragon/pkg/k8s/apis/cilium.io/v1alpha1/types.go index 9dd87f6a1c9..d37773f3481 100644 --- a/vendor/github.com/cilium/tetragon/pkg/k8s/apis/cilium.io/v1alpha1/types.go +++ b/vendor/github.com/cilium/tetragon/pkg/k8s/apis/cilium.io/v1alpha1/types.go @@ -229,8 +229,11 @@ type ActionSelector struct { // Only valid with the post action and with a rateLimit specified. RateLimitScope string `json:"rateLimitScope"` // +kubebuilder:validation:Optional - // Enable stack trace export. Only valid with the post action. - StackTrace bool `json:"stackTrace"` + // Enable kernel stack trace export. Only valid with the post action. + KernelStackTrace bool `json:"kernelStackTrace"` + // +kubebuilder:validation:Optional + // Enable user stack trace export. Only valid with the post action. + UserStackTrace bool `json:"userStackTrace"` } type TracepointSpec struct {