Skip to content

tetragon: add sleepable uprobe sensor#4915

Draft
olsajiri wants to merge 10 commits into
mainfrom
pr/olsajiri/fixes
Draft

tetragon: add sleepable uprobe sensor#4915
olsajiri wants to merge 10 commits into
mainfrom
pr/olsajiri/fixes

Conversation

@olsajiri
Copy link
Copy Markdown
Contributor

wip

@netlify
Copy link
Copy Markdown

netlify Bot commented Apr 27, 2026

Deploy Preview for tetragon ready!

Name Link
🔨 Latest commit f921184
🔍 Latest deploy log https://app.netlify.com/projects/tetragon/deploys/6a045588833c540008c9411d
😎 Deploy Preview https://deploy-preview-4915--tetragon.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@olsajiri olsajiri force-pushed the pr/olsajiri/fixes branch 3 times, most recently from 9f846bc to 338d733 Compare April 29, 2026 12:05
@olsajiri olsajiri added the release-note/minor This PR introduces a minor user-visible change label Apr 29, 2026
@olsajiri olsajiri force-pushed the pr/olsajiri/fixes branch from 338d733 to b7600c1 Compare May 2, 2026 22:19
@olsajiri olsajiri changed the title tetragon: add sleepable uprobe sensor tetragon: add sleepable sensors May 2, 2026
@olsajiri olsajiri changed the title tetragon: add sleepable sensors tetragon: add sleepable uprobe/fentry sensors May 2, 2026
@olsajiri olsajiri force-pushed the pr/olsajiri/fixes branch from b7600c1 to 57ae643 Compare May 12, 2026 20:57
@olsajiri olsajiri changed the title tetragon: add sleepable uprobe/fentry sensors tetragon: add sleepable uprobe sensor May 12, 2026
olsajiri added 10 commits May 13, 2026 12:12
It's not needed.

Signed-off-by: Jiri Olsa <jolsa@kernel.org>
At the moment we silently ignore when we match multiple
entry points and just take the last one. Let's make sure
we use proper entry point and fail in case there's more.

Signed-off-by: Jiri Olsa <jolsa@kernel.org>
Adding support to detect sleepable tail calls with
DetectSleepableTailCalls functions.

Note also removing leftover debug print in detectMixBpfAndTailCalls.

Signed-off-by: Jiri Olsa <jolsa@kernel.org>
Adding support for sensor to disable perf ringbuffer, so we could
build sleepable sensor that does not support perf ringbuffer.

Signed-off-by: Jiri Olsa <jolsa@kernel.org>
Add support for sensor to disable stacktrace, so we could
build sleepable sensor that does not support builid stacktrace.

Signed-off-by: Jiri Olsa <jolsa@kernel.org>
Adding support for sensor to disable preload, so we could
build sleepable sensor without it, because it does not need it.

Signed-off-by: Jiri Olsa <jolsa@kernel.org>
Adding sleepable uprobe objects:
  bpf_generic_uprobe_sleepable.o
  bpf_generic_retuprobe_sleepable.o
  bpf_multi_uprobe_sleepable.o
  bpf_multi_retuprobe_sleepable.o

They are built with following macros enabled:
  __NO_PERF_RINGBUFFER
  __NO_STACKTRACE
  __NO_PRELOAD

and allow sleepable retrieval of the data from uprobe.

Signed-off-by: Jiri Olsa <jolsa@kernel.org>
Use bpf.DetectSleepableTailCalls() and allow to load sleepable
uprobe sensor when it's possible.

Signed-off-by: Jiri Olsa <jolsa@kernel.org>
Disable preload for sleepable sensor and use direct reading
for strings.

With preload disabled we no longer have extra 2 preload uprobes
attached to the same offset.

Signed-off-by: Jiri Olsa <jolsa@kernel.org>
To allow disable sleepable uprobe sensor and prefer argument preload.

Signed-off-by: Jiri Olsa <jolsa@kernel.org>
@olsajiri olsajiri force-pushed the pr/olsajiri/fixes branch from 57ae643 to f921184 Compare May 13, 2026 10:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

release-note/minor This PR introduces a minor user-visible change

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant