-
Notifications
You must be signed in to change notification settings - Fork 392
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Now (as of 0.14.0) cilium/ebpf handles kmod BTFs natively (https://pkg.go.dev/github.com/cilium/ebpf#ProgramOptions.KernelModuleTypes). Thus we can remove some duplicate code (i.e. mainly function AddModulesToSpec). This patch does this cleanup. In Tetragon, we used kmod BTF in 2 places: 1. In order to attach to a function which is now handled automatically by cilium/ebpf. 2. In order to validate if the function name exists in the BTF and to check the argument types. In that case, we need to manually load the spec from the kmod that we care about. This is because cilium/ebpf checks (and loads the appropriate BTF) during the attach phase (i.e. https://github.com/cilium/ebpf/blob/5976561b28aabf23df00f3507cc3b240305b531b/prog.go#L157-L177).. Signed-off-by: Anastasios Papagiannis <tasos.papagiannnis@gmail.com>
- Loading branch information
Showing
9 changed files
with
43 additions
and
81 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
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
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
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
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
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
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
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