-
Notifications
You must be signed in to change notification settings - Fork 380
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
sensor pinning fixes (and misc updates) #409
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Signed-off-by: Kornilios Kourtis <[email protected]>
kkourt
force-pushed
the
pr/kkourt/pinning-fixes
branch
from
September 15, 2022 09:22
cb42792
to
c9a0eae
Compare
tpapagian
reviewed
Sep 15, 2022
tpapagian
reviewed
Sep 15, 2022
tpapagian
approved these changes
Sep 15, 2022
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.
LGTM!
nit: typo "hiearachy" -> "hierarchy" in the description of 68fae5b
The ordering of how selectors are encoded in the comment is wrong. Fix it. Also, specify that the array includes filter offsets and not the filters themselves. Signed-off-by: Kornilios Kourtis <[email protected]>
verifier log is only dumped if verbose != 0. Only print the log message if that's true. Signed-off-by: Kornilios Kourtis <[email protected]>
Don't use the static tail call path. Instead use whatever name was configured in the PinMap information. Signed-off-by: Kornilios Kourtis <[email protected]>
This is meant to be used by sensors to create paths for their objects under /sys/fs/bpf. Ideally, we would want a directory hierarchy under each sensor, as described in #408. This is currently not easy to do, however. Instead, use a function that adds "-" instead of "/", leading to a flat hierarchy that has unique names. This function can be changed to filepath.Join once everything is in place. The purpose of the function is to document the above intention. Signed-off-by: Kornilios Kourtis <[email protected]>
Signed-off-by: Kornilios Kourtis <[email protected]>
generic tracepoints are defined in tracing policies. There can be multiple tracing policies defined in a system, and each tracing policy can have multiple tracepoints. Currently paths are not unique, which may cause collisions. Collisions can lead to unexpected errors. This patch makes the pinned filepaths for tracepoints unique. The path is build using sensor.PathJoin so, for now, there are no directories and the hierarchy is flat. The path is constructed using: - the sensor name - an identifier for each tracepoint - the program or map name Signed-off-by: Kornilios Kourtis <[email protected]>
kkourt
force-pushed
the
pr/kkourt/pinning-fixes
branch
from
September 15, 2022 10:44
c9a0eae
to
ea78cf5
Compare
Thanks! Pushed a new version with above fixed, as well as the rest of the comments. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR aims to sanitize pinning and meant as an intermediate step towards #408. It also includes some simple (first 3) patches.
One of the immediate effects of this PR is that generic tracepoints have unique map names and collisions that may cause problems are avoided.
See patches for more information.