Skip to content

Commit

Permalink
CRD: Add IsUserspaceData flag for args
Browse files Browse the repository at this point in the history
When we swap all probe_read()s to probe_read_kernel() or
probe_read_user() (ditto for _str) users will need to be able to specify
if an argument is userspace data or not.

Signed-off-by: Kevin Sheldrake <kevin.sheldrake@isovalent.com>
  • Loading branch information
kevsecurity committed Mar 18, 2024
1 parent 2978456 commit 2a409a9
Show file tree
Hide file tree
Showing 8 changed files with 90 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,11 @@ spec:
format: int32
minimum: 0
type: integer
isUserspaceData:
description: Specifies if the argument is userspace data
or not. This defaults to true for uprobes and syscalls,
and false for non-syscall tracepoints and kprobes.
type: boolean
label:
description: Label to output in the JSON
type: string
Expand Down Expand Up @@ -160,6 +165,11 @@ spec:
format: int32
minimum: 0
type: integer
isUserspaceData:
description: Specifies if the argument is userspace data
or not. This defaults to true for uprobes and syscalls,
and false for non-syscall tracepoints and kprobes.
type: boolean
label:
description: Label to output in the JSON
type: string
Expand Down Expand Up @@ -810,6 +820,11 @@ spec:
format: int32
minimum: 0
type: integer
isUserspaceData:
description: Specifies if the argument is userspace data
or not. This defaults to true for uprobes and syscalls,
and false for non-syscall tracepoints and kprobes.
type: boolean
label:
description: Label to output in the JSON
type: string
Expand Down Expand Up @@ -1367,6 +1382,11 @@ spec:
format: int32
minimum: 0
type: integer
isUserspaceData:
description: Specifies if the argument is userspace data
or not. This defaults to true for uprobes and syscalls,
and false for non-syscall tracepoints and kprobes.
type: boolean
label:
description: Label to output in the JSON
type: string
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,11 @@ spec:
format: int32
minimum: 0
type: integer
isUserspaceData:
description: Specifies if the argument is userspace data
or not. This defaults to true for uprobes and syscalls,
and false for non-syscall tracepoints and kprobes.
type: boolean
label:
description: Label to output in the JSON
type: string
Expand Down Expand Up @@ -160,6 +165,11 @@ spec:
format: int32
minimum: 0
type: integer
isUserspaceData:
description: Specifies if the argument is userspace data
or not. This defaults to true for uprobes and syscalls,
and false for non-syscall tracepoints and kprobes.
type: boolean
label:
description: Label to output in the JSON
type: string
Expand Down Expand Up @@ -810,6 +820,11 @@ spec:
format: int32
minimum: 0
type: integer
isUserspaceData:
description: Specifies if the argument is userspace data
or not. This defaults to true for uprobes and syscalls,
and false for non-syscall tracepoints and kprobes.
type: boolean
label:
description: Label to output in the JSON
type: string
Expand Down Expand Up @@ -1367,6 +1382,11 @@ spec:
format: int32
minimum: 0
type: integer
isUserspaceData:
description: Specifies if the argument is userspace data
or not. This defaults to true for uprobes and syscalls,
and false for non-syscall tracepoints and kprobes.
type: boolean
label:
description: Label to output in the JSON
type: string
Expand Down
4 changes: 4 additions & 0 deletions pkg/k8s/apis/cilium.io/v1alpha1/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,10 @@ type KProbeArg struct {
// Argument type.
Type string `json:"type"`
// +kubebuilder:validation:Optional
// Specifies if the argument is userspace data or not. This defaults to true
// for uprobes and syscalls, and false for non-syscall tracepoints and kprobes.
IsUserspaceData *bool `json:"isUserspaceData,omitempty"`
// +kubebuilder:validation:Optional
// +kubebuilder:validation:Minimum=0
// Specifies the position of the corresponding size argument for this argument.
// This field is used only for char_buf and char_iovec types.
Expand Down
2 changes: 1 addition & 1 deletion pkg/k8s/apis/cilium.io/v1alpha1/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ package v1alpha1
// Used to determine if CRD needs to be updated in cluster
//
// Developers: Bump patch for each change in the CRD schema.
const CustomResourceDefinitionSchemaVersion = "1.1.8"
const CustomResourceDefinitionSchemaVersion = "1.1.9"

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.

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 2a409a9

Please sign in to comment.