[v1.16] bpf: sock: fix LRP for pre-5.7 kernels#41457
Merged
julianwiedmann merged 4 commits intov1.16from Sep 2, 2025
Merged
Conversation
[ upstream commit a0f64e5 ] bpf_set_retval() was added to the kernel with v5.18. Signed-off-by: Julian Wiedmann <jwi@isovalent.com>
[ upstream commit 36c6431 ] bpf_get_netns_cookie() was added to the kernel with v5.7. Signed-off-by: Julian Wiedmann <jwi@isovalent.com>
[ upstream commit 5745846 ] #33721 refactored the LRP code in bpf_sock, and dropped the HAVE_NETNS_COOKIE guard when calling get_netns_cookie(). When LRP is enabled, this causes the verifier on pre-5.8 kernels (where the helper is not available) to reject the bpf_sock program with "invalid func unknown#122". Re-introduce the check for HAVE_NETNS_COOKIE in the IPv4 path. This matches the IPv6 path. Fixes: 9d8b5f7 ("bpf:move LBx skip map and lookup functions to lb.h") Fixes: #40457 Signed-off-by: Julian Wiedmann <jwi@isovalent.com>
Member
Author
|
/test |
jrajahalme
approved these changes
Sep 2, 2025
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.
Backport of: