-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
[v1.13] loader: explicitly insert endpoint policy programs into policy maps #29309
Merged
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
/test-backport-1.13 |
18f47f0
to
c39687a
Compare
/test-backport-1.13 |
c39687a
to
935343b
Compare
/test-backport-1.13 |
[ upstream commit 4098439 ] BPF ELF loaders generally populate maps in a non-deterministic order when it comes to the order of the maps themselves. During some loads, cilium_calls may be populated first, sometimes cilium_(egress)call_policy gets populated first. The latter case is a problem since existing endpoints will constantly get their cilium_call_policy entry invoked for incoming packets. If its tail call map(s) are not yet populated, that will result in missed tail calls leading to packet drops. This commit zeroes the call maps' MapSpec.Contents and manually resolves []MapKV to the referenced policy progs, both for ingress and egress (l7) handlers. Policy programs are explicitly inserted into the respective call maps after the entrypoint(s) have been attached. This calls for major refactoring -- inserting the policy program is equal to attaching an entrypoint to a BPF hook and should be done explicitly by an endpoint manager that has access to the Endpoint object. This would make extracting the endpoint ID from the ELF section name redundant. Signed-off-by: Timo Beckers <timo@isovalent.com>
935343b
to
dffcde6
Compare
/test-backport-1.13 |
1 similar comment
/test-backport-1.13 |
lmb
approved these changes
Nov 22, 2023
brb
added a commit
that referenced
this pull request
Nov 22, 2023
The issue got fixed by #29309. Signed-off-by: Martynas Pumputis <m@lambda.lt>
pchaigno
pushed a commit
that referenced
this pull request
Nov 22, 2023
The issue got fixed by #29309. Signed-off-by: Martynas Pumputis <m@lambda.lt>
pjablonski123
pushed a commit
to pjablonski123/cilium
that referenced
this pull request
Dec 15, 2023
The issue got fixed by cilium#29309. Signed-off-by: Martynas Pumputis <m@lambda.lt>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
backport/1.13
This PR represents a backport for Cilium 1.13.x of a PR that was merged to main.
kind/backports
This PR provides functionality previously merged into master.
ready-to-merge
This PR has passed all tests and received consensus from code owners to merge.
release-note/bug
This PR fixes an issue in a previous release of Cilium.
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.
Manual backport of #29307.