Skip to content

Commit

Permalink
Update CRDs, other fixes
Browse files Browse the repository at this point in the history
Signed-off-by: David Windsor <dawindso@cisco.com>
  • Loading branch information
dwindsor committed Jun 27, 2024
1 parent 279851b commit 0b220ba
Show file tree
Hide file tree
Showing 10 changed files with 34 additions and 2 deletions.
2 changes: 1 addition & 1 deletion bpf/process/types/basic.h
Original file line number Diff line number Diff line change
Expand Up @@ -2493,7 +2493,7 @@ read_call_arg(void *ctx, struct msg_generic_kprobe *e, int index, int type,
probe_read(&d_name, sizeof(d_name), (const void *)arg);
probe_read(&arg, sizeof(arg), &d_name.name);

size = copy_strings(args, (char *)arg, d_name.len);
size = copy_strings(args, (char *)arg, MAX_STRING);
} break;
#endif
case filename_ty: {
Expand Down
2 changes: 1 addition & 1 deletion examples/tracingpolicy/security_inode_follow_link.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apiVersion: cilium.io/v1alpha1
kind: TracingPolicy
metadata:
name: "sample-no-exec-id"
name: "follow-symlink"
spec:
kprobes:
- call: "security_inode_follow_link"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,7 @@ spec:
- linux_binprm
- data_loc
- net_device
- dentry
type: string
required:
- index
Expand Down Expand Up @@ -288,6 +289,7 @@ spec:
- linux_binprm
- data_loc
- net_device
- dentry
type: string
required:
- index
Expand Down Expand Up @@ -954,6 +956,7 @@ spec:
- linux_binprm
- data_loc
- net_device
- dentry
type: string
required:
- index
Expand Down Expand Up @@ -1526,6 +1529,7 @@ spec:
- linux_binprm
- data_loc
- net_device
- dentry
type: string
required:
- index
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,7 @@ spec:
- linux_binprm
- data_loc
- net_device
- dentry
type: string
required:
- index
Expand Down Expand Up @@ -288,6 +289,7 @@ spec:
- linux_binprm
- data_loc
- net_device
- dentry
type: string
required:
- index
Expand Down Expand Up @@ -954,6 +956,7 @@ spec:
- linux_binprm
- data_loc
- net_device
- dentry
type: string
required:
- index
Expand Down Expand Up @@ -1526,6 +1529,7 @@ spec:
- linux_binprm
- data_loc
- net_device
- dentry
type: string
required:
- index
Expand Down
2 changes: 2 additions & 0 deletions pkg/generictypes/generictypes.go
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ var GenericStringToType = map[string]int{
"linux_binprm": GenericLinuxBinprmType,
"data_loc": GenericDataLoc,
"net_device": GenericNetDev,
"dentry": GenericDentryType,
}

var GenericTypeToStringTable = map[int]string{
Expand Down Expand Up @@ -152,6 +153,7 @@ var GenericTypeToStringTable = map[int]string{
GenericLinuxBinprmType: "linux_binprm",
GenericDataLoc: "data_loc",
GenericNetDev: "net_device",
GenericDentryType: "dentry",
GenericInvalidType: "",
}

Expand Down
6 changes: 6 additions & 0 deletions pkg/grpc/tracing/tracing.go
Original file line number Diff line number Diff line change
Expand Up @@ -266,6 +266,12 @@ func getKprobeArgument(arg tracingapi.MsgGenericKprobeArg) *tetragon.KprobeArgum
}
a.Arg = &tetragon.KprobeArgument_LinuxBinprmArg{LinuxBinprmArg: lArg}
a.Label = e.Label
case api.MsgGenericKprobeArgDentry:
lArg := &tetragon.KprobeDentry{
Name: e.Value,
};
a.Arg = &tetragon.KprobeArgument_DentryArg{DentryArg: lArg}
a.Label = e.Label
default:
logger.GetLogger().WithField("arg", e).Warnf("unexpected type: %T", e)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,7 @@ spec:
- linux_binprm
- data_loc
- net_device
- dentry
type: string
required:
- index
Expand Down Expand Up @@ -288,6 +289,7 @@ spec:
- linux_binprm
- data_loc
- net_device
- dentry
type: string
required:
- index
Expand Down Expand Up @@ -954,6 +956,7 @@ spec:
- linux_binprm
- data_loc
- net_device
- dentry
type: string
required:
- index
Expand Down Expand Up @@ -1526,6 +1529,7 @@ spec:
- linux_binprm
- data_loc
- net_device
- dentry
type: string
required:
- index
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,7 @@ spec:
- linux_binprm
- data_loc
- net_device
- dentry
type: string
required:
- index
Expand Down Expand Up @@ -288,6 +289,7 @@ spec:
- linux_binprm
- data_loc
- net_device
- dentry
type: string
required:
- index
Expand Down Expand Up @@ -954,6 +956,7 @@ spec:
- linux_binprm
- data_loc
- net_device
- dentry
type: string
required:
- index
Expand Down Expand Up @@ -1526,6 +1529,7 @@ spec:
- linux_binprm
- data_loc
- net_device
- dentry
type: string
required:
- index
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 0b220ba

Please sign in to comment.