1.7 backports#4980
Merged
Merged
Conversation
[ upstream commit 017ff05 ] Currently we break the resolve loop earlier than it's needed, which might cause premature end of the resolve scan, let's remove that. Let's instead store the last error based on the largest resolved depth and use this error as the final one in case of error. Signed-off-by: Jiri Olsa <jolsa@kernel.org> Signed-off-by: Kornilios Kourtis <kornilios@isovalent.com>
[ upstream commit 4a45a9c ] To simplify the code a bit before following changes. Signed-off-by: Jiri Olsa <jolsa@kernel.org> Signed-off-by: Kornilios Kourtis <kornilios@isovalent.com>
[ upstream commit bca819f ] Keeping the functionality and hoping to make it bit simpler. Signed-off-by: Jiri Olsa <jolsa@kernel.org> Signed-off-by: Kornilios Kourtis <kornilios@isovalent.com>
[ upstream commit f688229 ] Making sure we get expected errors from ResolveBTFPath. Signed-off-by: Jiri Olsa <jolsa@kernel.org> Signed-off-by: Kornilios Kourtis <kornilios@isovalent.com>
[ upstream commit 54268ba ] When unstacking a nested BTF union or anonymous struct, we fail to store the position of the union/struct itself, only capturing the final element. This leads to incorrect offset resolution. To fix this, we introduce an accumulator mechanism that accumulates the union/anonymous struct offset only when the member.name matches the expected attribute. Signed-off-by: Tristan d'Audibert <tdaudibe@isovalent.com> Signed-off-by: Kornilios Kourtis <kornilios@isovalent.com>
[ upstream commit 531dfe3 ] Attribute resolution for unions/anonymous struct has been broken since the Resolve algorithm's introduction. This commit aligns with the new logic by implementing the same accumulator mechanism, ensuring identical return values. Signed-off-by: Tristan d'Audibert <tdaudibe@isovalent.com> Signed-off-by: Kornilios Kourtis <kornilios@isovalent.com>
[ upstream commit 91de8f4 ] Improve the messages so that the error is more understandable. Basic types are types that we support without resolve or are the terminal type when doing resolve. They are the types that users specify as an arg's type within the policy. For dereference issues that happen during resolve, we report the depth, or the index of the resolve configuration where the dereference failed. This change subtracts one from the status value that is reported from the bpf program because status 0 signifies the non-error case. Signed-off-by: Andy Strohman <astrohma@isovalent.com> Signed-off-by: Kornilios Kourtis <kornilios@isovalent.com>
FedeDP
approved these changes
May 11, 2026
This file contains hidden or 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
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.
Backported PRs