Repository navigation
bpf, arm64: use emit_addr_mov_i64() for BPF_PSEUDO_FUNC - #2351
Closed
kernel-patches-bot wants to merge 2 commits into
Closed
kernel-patches-bot wants to merge 2 commits into
kernel-patches-bot wants to merge 2 commits into
Conversation
Author
|
Master branch: 9e6b19a |
Author
|
Master branch: e63a023 |
kernel-patches-bot
force-pushed
the
series/602174=>bpf-next
branch
from
December 31, 2021 15:43
2a6412b to
a49758d
Compare
Author
|
Master branch: 5e22dd1 |
The following error is reported when running "./test_progs -t for_each"
under arm64:
bpf_jit: multi-func JIT bug 58 != 56
......
JIT doesn't support bpf-to-bpf calls
The root cause is the size of BPF_PSEUDO_FUNC instruction increases
from 2 to 3 after the address of called bpf-function is settled and
there are two bpf-to-bpf calls in test_pkt_access. The generated
instructions are shown below:
>before callback_fn is jited, its addr is 0x1-00000001
0x48: 21 00 C0 D2 movz x1, #0x1, lsl #32
0x4c: 21 00 80 F2 movk x1, #0x1
>after callback_fn is jited, its addr is 0xfffffe0017f2fb84
0x48: E1 3F C0 92 movn x1, #0x1ff, lsl #32
0x4c: 41 FE A2 F2 movk x1, #0x17f2, lsl #16
0x50: 81 70 9F F2 movk x1, #0xfb84
Fixing it by using emit_addr_mov_i64() for BPF_PSEUDO_FUNC, so
the size of jited image will not change.
Fixes: 69c087b ("bpf: Add bpf_for_each_map_elem() helper")
Signed-off-by: Hou Tao <[email protected]>
kernel-patches-bot
force-pushed
the
series/602174=>bpf-next
branch
from
January 5, 2022 12:40
a49758d to
79f5e96
Compare
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.
Pull request for series with
subject: bpf, arm64: use emit_addr_mov_i64() for BPF_PSEUDO_FUNC
version: 1
url: https://patchwork.kernel.org/project/netdevbpf/list/?series=602174