Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

decouple tracing sensor #2706

Open
kkourt opened this issue Jul 22, 2024 · 0 comments
Open

decouple tracing sensor #2706

kkourt opened this issue Jul 22, 2024 · 0 comments

Comments

@kkourt
Copy link
Contributor

kkourt commented Jul 22, 2024

For historic reasons, kprobes, tracepoints, and now lsm hooks live under the (generic) tracing sensor pkg/sensors/tracing.
Also for historic reasons, policies that combine any two of the above are not supported.

Splitting the code into:

  • the generic kprobe sensor
  • the generic tracepoint sensor
  • the generic lsm sensor
  • a library for supporting all generic sensors

Might be worthwhile, and it will also allow us to easily support policies that combine them. For that last part, we would need to review whether there are shared objects (e.g., bpf maps) between the different sensors and handle them appropriately. See also: #408

kkourt added a commit that referenced this issue Jul 22, 2024
For historic reasons, the tracing sensor has three different aspects:
kprobes, tracepoints, and (recently) lsm hooks.

Also for historic reasons, we did not allow tracepoints and kprobes in
the same policy.

With the addition of the LSM sensor
(8eb13e8), if a policy includes an lsm
section together with either a kprobe section or a tracepoint section,
the lsm section will be ignored.

This patch rejects policies that have more than one section of kprobes,
tracepoints, and lsm hooks in the policy.

A better solution would be to decouple the tracing sensor, and create
one sensor for kprobes, one for tracepoints, and one for lsm sensors.
See: #2706

Signed-off-by: Kornilios Kourtis <kornilios@isovalent.com>
kkourt added a commit that referenced this issue Jul 22, 2024
For historic reasons, the tracing sensor has three different aspects:
kprobes, tracepoints, and (recently) lsm hooks.

Also for historic reasons, we did not allow tracepoints and kprobes in
the same policy.

With the addition of the LSM sensor
(8eb13e8), if a policy includes an lsm
section together with either a kprobe section or a tracepoint section,
the lsm section will be ignored.

This patch rejects policies that have more than one section of kprobes,
tracepoints, and lsm hooks in the policy.

A better solution would be to decouple the tracing sensor, and create
one sensor for kprobes, one for tracepoints, and one for lsm sensors.
See: #2706

Fixes: 8eb13e8

Signed-off-by: Kornilios Kourtis <kornilios@isovalent.com>
kkourt added a commit that referenced this issue Jul 22, 2024
For historic reasons, the tracing sensor has three different aspects:
kprobes, tracepoints, and (recently) lsm hooks.

Also for historic reasons, we did not allow tracepoints and kprobes in
the same policy.

With the addition of the LSM sensor
(8eb13e8), if a policy includes an lsm
section together with either a kprobe section or a tracepoint section,
the lsm section will be ignored.

This patch rejects policies that have more than one section of kprobes,
tracepoints, and lsm hooks in the policy.

A better solution would be to decouple the tracing sensor, and create
one sensor for kprobes, one for tracepoints, and one for lsm sensors.
See: #2706

Fixes: 8eb13e8

Signed-off-by: Kornilios Kourtis <kornilios@isovalent.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant