-
Notifications
You must be signed in to change notification settings - Fork 705
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
maps: finalize scalar maps during creation, defer prog and outer maps
`cl.loadMap()` now finalizes maps that can be finalized right after creation, aka. 'scalar' maps without references to other bpf resources. Prog maps or outer maps are populated at a later stage. After doing a first pass over all requested Maps and Programs, a separate pass is run by `cl.populateMaps()` (renamed to `populateDeferredMaps()`) that only considers prog maps and outer maps, lazy-loads dependencies and fully resolves Spec.Contents, then finalizes the Map. This fixes .rodata being frozen after the verifier has run, which not only defeats the point of having constants, but also causes verifier errors if a runtime-provided constant is used as a return code or helper argument that must be proven to be within a certain range during verification. Signed-off-by: Timo Beckers <timo@isovalent.com>
- Loading branch information
Showing
2 changed files
with
46 additions
and
25 deletions.
There are no files selected for viewing
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