-
Notifications
You must be signed in to change notification settings - Fork 94
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
Map of maps #366
Merged
Merged
Map of maps #366
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
geyslan
force-pushed
the
map-of-maps
branch
9 times, most recently
from
August 16, 2023 23:54
4b2d669
to
a5838da
Compare
This function allows to get a file descriptor of a map by its ID.
This function allows to retrieve a map (BPFMapLow) by its ID. This is useful when a map is created by a different origin. Initial effort: aquasecurity#213 Co-authored-by: Kemal Akkoyun <[email protected]>
This allows to set the inner map prototype of a map of maps which doesn't have a pre-allocated inner map. Initial effort: aquasecurity#213 Co-authored-by: Kemal Akkoyun <[email protected]>
This allows to query the inner map information from the outer map before the module is loaded. Despite acting as a wrapper around bpf_map__inner_map(), which returns a pointer to a libbpf bpf_map, it is not safe to use it as a BPFMap since it will never be created. As soon as the module is loaded, the bpf_map is destroyed. This is the reason why it returns a BPFMapInfo instead.
Introduce a new selftest that tests a map of maps with outer and inner maps pre-allocated in the BPF program.
Introduce a new selftest that tests a map of maps with outer map pre-allocated in the BPF program and an inner map from other origin - not pre-allocated in the BPF program.
Introduce a new selftest that tests a map of maps with outer and inner maps not pre-allocated in the BPF program.
This allows to get a FD to a BTF by its ID. This is useful to create a BPFMapLow passing options set with a BTF ID.
This was referenced Aug 22, 2023
Merged
yanivagman
approved these changes
Sep 3, 2023
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
javierhonduco
referenced
this pull request
in parca-dev/parca-agent
Sep 15, 2023
…-libbpf-1.2 (#2013) [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [github.com/aquasecurity/libbpfgo](https://togithub.com/aquasecurity/libbpfgo) | require | minor | `v0.4.9-libbpf-1.2.0.0.20230817212518-21cf435d454e` -> `v0.5.0-libbpf-1.2` | --- ### Release Notes <details> <summary>aquasecurity/libbpfgo (github.com/aquasecurity/libbpfgo)</summary> ### [`v0.5.0-libbpf-1.2`](https://togithub.com/aquasecurity/libbpfgo/releases/tag/v0.5.0-libbpf-1.2) #### What's Changed - revive: update revive rules by [@​rafaeldtinoco](https://togithub.com/rafaeldtinoco) in [https://github.com/aquasecurity/libbpfgo/pull/333](https://togithub.com/aquasecurity/libbpfgo/pull/333) - Wrap `bpf_prog_attach` and `bpf_prog_detach2` by [@​mozillazg](https://togithub.com/mozillazg) in [https://github.com/aquasecurity/libbpfgo/pull/335](https://togithub.com/aquasecurity/libbpfgo/pull/335) - ci: running tests on multiple go versions by [@​mozillazg](https://togithub.com/mozillazg) in [https://github.com/aquasecurity/libbpfgo/pull/336](https://togithub.com/aquasecurity/libbpfgo/pull/336) - libbpf: bump to v1.2.2 by [@​geyslan](https://togithub.com/geyslan) in [https://github.com/aquasecurity/libbpfgo/pull/342](https://togithub.com/aquasecurity/libbpfgo/pull/342) - fix: vagrant image install by [@​geyslan](https://togithub.com/geyslan) in [https://github.com/aquasecurity/libbpfgo/pull/341](https://togithub.com/aquasecurity/libbpfgo/pull/341) - Add SkipMemlockBump to NewModuleArgs by [@​bobrik](https://togithub.com/bobrik) in [https://github.com/aquasecurity/libbpfgo/pull/337](https://togithub.com/aquasecurity/libbpfgo/pull/337) - fix: trim quote characters in osinfo by [@​NDStrahilevitz](https://togithub.com/NDStrahilevitz) in [https://github.com/aquasecurity/libbpfgo/pull/344](https://togithub.com/aquasecurity/libbpfgo/pull/344) - helpers: handle non numeric kernel versions by [@​NDStrahilevitz](https://togithub.com/NDStrahilevitz) in [https://github.com/aquasecurity/libbpfgo/pull/345](https://togithub.com/aquasecurity/libbpfgo/pull/345) - osinfo: add support for rhel by [@​NDStrahilevitz](https://togithub.com/NDStrahilevitz) in [https://github.com/aquasecurity/libbpfgo/pull/347](https://togithub.com/aquasecurity/libbpfgo/pull/347) - osinfo: support additional alma linux id by [@​NDStrahilevitz](https://togithub.com/NDStrahilevitz) in [https://github.com/aquasecurity/libbpfgo/pull/348](https://togithub.com/aquasecurity/libbpfgo/pull/348) - chore: increase timeout for selftests by [@​geyslan](https://togithub.com/geyslan) in [https://github.com/aquasecurity/libbpfgo/pull/349](https://togithub.com/aquasecurity/libbpfgo/pull/349) - fix(selftest): handle arm64 function names by [@​geyslan](https://togithub.com/geyslan) in [https://github.com/aquasecurity/libbpfgo/pull/350](https://togithub.com/aquasecurity/libbpfgo/pull/350) - dependabot add by [@​gitworkflows](https://togithub.com/gitworkflows) in [https://github.com/aquasecurity/libbpfgo/pull/351](https://togithub.com/aquasecurity/libbpfgo/pull/351) - build(deps): bump github.com/stretchr/testify from 1.8.2 to 1.8.4 by [@​dependabot](https://togithub.com/dependabot) in [https://github.com/aquasecurity/libbpfgo/pull/353](https://togithub.com/aquasecurity/libbpfgo/pull/353) - build(deps): bump actions/checkout from 2 to 3 by [@​dependabot](https://togithub.com/dependabot) in [https://github.com/aquasecurity/libbpfgo/pull/352](https://togithub.com/aquasecurity/libbpfgo/pull/352) - chore: minor clang format and tidy adjustments by [@​geyslan](https://togithub.com/geyslan) in [https://github.com/aquasecurity/libbpfgo/pull/358](https://togithub.com/aquasecurity/libbpfgo/pull/358) - chore: add helpers to dependabot by [@​geyslan](https://togithub.com/geyslan) in [https://github.com/aquasecurity/libbpfgo/pull/359](https://togithub.com/aquasecurity/libbpfgo/pull/359) - build(deps): bump github.com/stretchr/testify from 1.8.0 to 1.8.4 in /helpers by [@​dependabot](https://togithub.com/dependabot) in [https://github.com/aquasecurity/libbpfgo/pull/360](https://togithub.com/aquasecurity/libbpfgo/pull/360) - build(deps): bump golang.org/x/sys from 0.1.0 to 0.11.0 in /helpers by [@​dependabot](https://togithub.com/dependabot) in [https://github.com/aquasecurity/libbpfgo/pull/361](https://togithub.com/aquasecurity/libbpfgo/pull/361) - fix(selftest): kern_version logic by [@​geyslan](https://togithub.com/geyslan) in [https://github.com/aquasecurity/libbpfgo/pull/362](https://togithub.com/aquasecurity/libbpfgo/pull/362) - fix(selftest): use channel for sync by [@​geyslan](https://togithub.com/geyslan) in [https://github.com/aquasecurity/libbpfgo/pull/364](https://togithub.com/aquasecurity/libbpfgo/pull/364) - Split BPFMap API into managed and unmanaged by [@​geyslan](https://togithub.com/geyslan) in [https://github.com/aquasecurity/libbpfgo/pull/356](https://togithub.com/aquasecurity/libbpfgo/pull/356) - fix(map): fix error wrap by [@​geyslan](https://togithub.com/geyslan) in [https://github.com/aquasecurity/libbpfgo/pull/368](https://togithub.com/aquasecurity/libbpfgo/pull/368) - fix(helpers): lint err regarding return statement by [@​geyslan](https://togithub.com/geyslan) in [https://github.com/aquasecurity/libbpfgo/pull/369](https://togithub.com/aquasecurity/libbpfgo/pull/369) - chore(github): add workflow test by [@​geyslan](https://togithub.com/geyslan) in [https://github.com/aquasecurity/libbpfgo/pull/370](https://togithub.com/aquasecurity/libbpfgo/pull/370) - fix: `GetMap()` comment by [@​geyslan](https://togithub.com/geyslan) in [https://github.com/aquasecurity/libbpfgo/pull/371](https://togithub.com/aquasecurity/libbpfgo/pull/371) - Map of maps by [@​geyslan](https://togithub.com/geyslan) in [https://github.com/aquasecurity/libbpfgo/pull/366](https://togithub.com/aquasecurity/libbpfgo/pull/366) - build(deps): bump golang.org/x/sys from 0.11.0 to 0.12.0 in /helpers by [@​dependabot](https://togithub.com/dependabot) in [https://github.com/aquasecurity/libbpfgo/pull/375](https://togithub.com/aquasecurity/libbpfgo/pull/375) - build(deps): bump actions/checkout from 3 to 4 by [@​dependabot](https://togithub.com/dependabot) in [https://github.com/aquasecurity/libbpfgo/pull/376](https://togithub.com/aquasecurity/libbpfgo/pull/376) #### New Contributors - [@​bobrik](https://togithub.com/bobrik) made their first contribution in [https://github.com/aquasecurity/libbpfgo/pull/337](https://togithub.com/aquasecurity/libbpfgo/pull/337) - [@​gitworkflows](https://togithub.com/gitworkflows) made their first contribution in [https://github.com/aquasecurity/libbpfgo/pull/351](https://togithub.com/aquasecurity/libbpfgo/pull/351) - [@​dependabot](https://togithub.com/dependabot) made their first contribution in [https://github.com/aquasecurity/libbpfgo/pull/353](https://togithub.com/aquasecurity/libbpfgo/pull/353) **Full Changelog**: aquasecurity/libbpfgo@v0.4.9-libbpf-1.2.0...v0.5.0-libbpf-1.2 </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/parca-dev/parca-agent). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNi44My4wIiwidXBkYXRlZEluVmVyIjoiMzYuODMuMCIsInRhcmdldEJyYW5jaCI6Im1haW4ifQ==-->
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.
Close: #93
Context: #343 #213
commit faa3599 (HEAD -> map-of-maps, origin/map-of-maps)
Author: Geyslan Gregório [email protected]
Date: Wed Aug 16 09:27:09 2023 -0300
commit cbd23d8
Author: Geyslan Gregório [email protected]
Date: Mon Aug 14 09:17:20 2023 -0300
commit 8634026
Author: Geyslan Gregório [email protected]
Date: Mon Aug 14 09:00:56 2023 -0300
commit 00f47dd
Author: Geyslan Gregório [email protected]
Date: Mon Aug 14 08:29:21 2023 -0300
commit bc7cb55
Author: Geyslan Gregório [email protected]
Date: Fri Aug 11 18:30:23 2023 -0300
commit c834f37
Author: Geyslan Gregório [email protected]
Date: Fri Aug 11 16:32:48 2023 -0300
commit b28c448
Author: Geyslan Gregório [email protected]
Date: Thu Aug 10 18:53:04 2023 -0300
commit 26259e3
Author: Geyslan Gregório [email protected]
Date: Thu Aug 10 14:41:57 2023 -0300