Skip to content

uprobe: Add resolvePathInContainer support#5190

Draft
sayboras wants to merge 9 commits into
mainfrom
pr/tammach/uprobe-resolve-in-container
Draft

uprobe: Add resolvePathInContainer support#5190
sayboras wants to merge 9 commits into
mainfrom
pr/tammach/uprobe-resolve-in-container

Conversation

@sayboras

@sayboras sayboras commented Jun 28, 2026

Copy link
Copy Markdown
Member

Description

Uprobe paths are interpreted in the agent's own mount namespace, so binaries that only exist inside other pods' images cannot be hooked.

Add a resolvePathInContainer option to uprobe specs. When set, path is resolved relative to the root filesystem of each container selected by the policy's podSelector, and the uprobe is attached per matching container. Container roots are resolved via runtime hooks, with CRI as fallback. The option requires a podSelector and comes with documentation, an example policy, and an e2e test backed by a new tester-progs image for test workloads.

Fixes: #5105

Changelog

uprobe: Add resolvePathInContainer option to resolve uprobe paths inside selected containers

@netlify

netlify Bot commented Jun 28, 2026

Copy link
Copy Markdown

Deploy Preview for tetragon ready!

Name Link
🔨 Latest commit 00eedc1
🔍 Latest deploy log https://app.netlify.com/projects/tetragon/deploys/6a48daaed2f86600071c158a
😎 Deploy Preview https://deploy-preview-5190--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.

@sayboras sayboras added the release-note/minor This PR introduces a minor user-visible change label Jun 28, 2026
@sayboras sayboras force-pushed the pr/tammach/uprobe-resolve-in-container branch 5 times, most recently from 6fddd31 to 7937133 Compare July 4, 2026 08:06
@sayboras sayboras changed the title Pr/tammach/uprobe resolve in container uprobe: Add resolvePathInContainer support Jul 4, 2026
@sayboras sayboras force-pushed the pr/tammach/uprobe-resolve-in-container branch from 7937133 to 00eedc1 Compare July 4, 2026 10:04
sayboras added 9 commits July 4, 2026 22:28
Add the opt-in field, regenerate the CRD/reference docs, and cover
field round-trip and defaulting. resolvePathInContainer needs a
podSelector to know which containers to attach in; reject policies
that omit it.

Signed-off-by: Tam Mach <tam.mach@cilium.io>
Resolve an in-container path under a container root via
openat2(RESOLVE_IN_ROOT), with a lexical fallback for old kernels.

Signed-off-by: Tam Mach <tam.mach@cilium.io>
Track attached containers and drive attach/detach via an Attacher
interface, resolving each container root through a pluggable seam.

Signed-off-by: Tam Mach <tam.mach@cilium.io>
Route pod add/update/delete to per-policy reconcilers off the shared
pod informer; no new informer is created.

Signed-off-by: Tam Mach <tam.mach@cilium.io>
Resolve a container's root from the CreateContainer RootDir (new
containers) and the CRI container pid (existing containers); discover
already-running containers via CRI ListContainers/ListPodSandbox.

Signed-off-by: Tam Mach <tam.mach@cilium.io>
Split RIC uprobes into per-container child sensors on policy load,
snapshot existing containers via CRI, and resync periodically.

Signed-off-by: Tam Mach <tam.mach@cilium.io>
Bake static tester binaries (default: uprobe-simple) from
contrib/tester-progs into a busybox image via the PROGS build arg, so
e2e tests can run workloads without pulling from an external registry.

Signed-off-by: Tam Mach <tam.mach@cilium.io>
The workload runs the in-tree tester-progs image, which e2e-test now
builds and loads into the temporary kind cluster via the new
-tetragon.tester-progs-image flag.

Signed-off-by: Tam Mach <tam.mach@cilium.io>
Signed-off-by: Tam Mach <tam.mach@cilium.io>
@sayboras sayboras force-pushed the pr/tammach/uprobe-resolve-in-container branch from 00eedc1 to 8328cba Compare July 4, 2026 12:34
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.

How can I hook a function from user-space executable in other pods.

1 participant