-
Notifications
You must be signed in to change notification settings - Fork 395
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
tetragon: Change uprobe spec #1975
Conversation
Currently we define uprobe with path/symbol path, which not handy when you have more symbols from single path to probe. Changing the spec so the uprobe is defined by path and array of symbols, like: spec: uprobes: - path: /bin/bash symbols: - "_start" - "main" "builtin_help" Signed-off-by: Jiri Olsa <jolsa@kernel.org>
Adding support to generate uprobe policy that contains all function symbols from the bspecified binary, like: $ tetra tracingpolicy generate uprobes --binary /bin//bash | head -20 apiVersion: cilium.io/v1alpha1 kind: TracingPolicy metadata: creationTimestamp: "2024-01-14T22:33:21Z" name: uprobes spec: uprobes: - message: "" path: /bin//bash symbols: - rl_old_menu_complete - maybe_make_export_env - initialize_shell_builtins - extglob_pattern_p - dispose_cond_node - decode_prompt_string - show_var_attributes - push_var_context - buffered_ungetchar - isnetconn Signed-off-by: Jiri Olsa <jolsa@kernel.org>
8c84716
to
e0a2eaa
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey, what was the motivation behind this? I guess it's a bit similar to what we do in kprobe with list, but also a bit different.
Could you update the documentation on uprobe as well? :)
it matches the kernel interface where you register symbols for given path/binary
yep.. I was checking on that, but we did not add any so far, |
Cool thanks for the details. It was just added indeed, it's still very limited so it should be quick to update, https://tetragon.io/docs/concepts/tracing-policy/hooks/#uprobes. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
well the generate stuff is fun.
Hey, replacing a required field in the CRD is a breaking change. Technically this should mean moving to @olsajiri could you add a release note instructing users how to upgrade? It would be nice to update the examples too. |
Currently we define uprobe with path/symbol path, which not
handy when you have more symbols from single path to probe.
Changing the spec so the uprobe is defined by path and array
of symbols, like: