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

tetragon: Refactor program/map loader to use directory hierarchy #2128

Merged
merged 21 commits into from
Sep 10, 2024
Merged
Changes from 1 commit
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
72ee92e
tetragon: Add PinPath to Map object
olsajiri Jun 16, 2024
7750be4
tetragon: Use map pin path for MapLoad interface
olsajiri Feb 24, 2024
8796e47
tetragon: Add shared map type fields
olsajiri Feb 21, 2024
d76c5d2
tetragon: Create sensor directory hierarchy
olsajiri Feb 23, 2024
e80c9c9
tetragon: Move base sensor maps under new hierarchy
olsajiri Feb 23, 2024
d7a30b3
tetragon: Move generickprobe sensor maps under new hierarchy
olsajiri Feb 23, 2024
08dfece
tetragon: Move generictracepoint sensor maps under new hierarchy
olsajiri Feb 25, 2024
31bbcc0
tetragon: Move genericuprobe sensor maps under new hierarchy
olsajiri Feb 25, 2024
75269c7
tetragon: Move genericlsm sensor maps under new hierarchy
olsajiri Jul 19, 2024
06f15fd
tetragon: Change generickprobe sensor pin path
olsajiri Feb 24, 2024
367c645
tetragon: Change generictracepoint sensor pin path
olsajiri Feb 25, 2024
edd45bb
tetragon: Change genericuprobe sensor pin path
olsajiri Feb 25, 2024
951c90a
tetragon: Change genericlsm sensor pin path
olsajiri Jul 19, 2024
b9fa81b
tetragon: Move enforcer sensor maps under new hierarchy
olsajiri Feb 25, 2024
8716b8a
tetragon: Get rid of MapBuilderPin functions
olsajiri Jun 16, 2024
c1f2185
tetragon: Sanitize policy name before using it in path
olsajiri Jun 13, 2024
4609398
tetragon: Adjust linkPinPath for new hierarchy
olsajiri Jul 9, 2024
1a69192
tetragon: Add policy argument to SensorBuilder function
olsajiri May 24, 2024
8f102dc
tetragon: Add tests for map builders
olsajiri Jun 18, 2024
76544da
tetragon: Add tests for map max entries setup
olsajiri Jun 18, 2024
d0da915
tetragon: Add documentation for maps usage
olsajiri Jun 18, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
tetragon: Change genericuprobe sensor pin path
Change the genericuprobe sensor pin path for programs
under sysfs hierarchy.

Now the program pin looks like below:

  uprobe/gup-sensor-1/0-readline/prog
  uprobe/gup-sensor-1/1-main/prog

Signed-off-by: Jiri Olsa <jolsa@kernel.org>
olsajiri committed Aug 26, 2024
commit edd45bbd6a9e9e7238cee408000b2dc95d213cd0
5 changes: 1 addition & 4 deletions pkg/sensors/tracing/genericuprobe.go
Original file line number Diff line number Diff line change
@@ -454,9 +454,6 @@ func createUprobeSensorFromEntry(uprobeEntry *genericUprobe,
loadProgName = "bpf_generic_uprobe_v53.o"
}

pinPath := uprobeEntry.pinPathPrefix
pinProg := sensors.PathJoin(pinPath, "prog")

attachData := &program.UprobeAttachData{
Path: uprobeEntry.path,
Symbol: uprobeEntry.symbol,
@@ -466,7 +463,7 @@ func createUprobeSensorFromEntry(uprobeEntry *genericUprobe,
path.Join(option.Config.HubbleLib, loadProgName),
"",
"uprobe/generic_uprobe",
pinProg,
fmt.Sprintf("%d-%s", uprobeEntry.tableId.ID, uprobeEntry.symbol),
"generic_uprobe").
SetAttachData(attachData).
SetLoaderData(uprobeEntry)