Skip to content
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

LoongArch: BPF: Use move_addr() for BPF_PSEUDO_FUNC #8685

Open
wants to merge 1 commit into
base: bpf-next_base
Choose a base branch
from

Conversation

kernel-patches-daemon-bpf[bot]
Copy link

Pull request for series with
subject: LoongArch: BPF: Use move_addr() for BPF_PSEUDO_FUNC
version: 1
url: https://patchwork.kernel.org/project/netdevbpf/list/?series=944472

@kernel-patches-daemon-bpf
Copy link
Author

Upstream branch: 812f770
series: https://patchwork.kernel.org/project/netdevbpf/list/?series=944472
version: 1

@kernel-patches-daemon-bpf
Copy link
Author

Upstream branch: 812f770
series: https://patchwork.kernel.org/project/netdevbpf/list/?series=944472
version: 1

@kernel-patches-daemon-bpf
Copy link
Author

Upstream branch: b02f072
series: https://patchwork.kernel.org/project/netdevbpf/list/?series=944472
version: 1

@kernel-patches-daemon-bpf
Copy link
Author

Upstream branch: f3f8649
series: https://patchwork.kernel.org/project/netdevbpf/list/?series=944472
version: 1

@kernel-patches-daemon-bpf
Copy link
Author

Upstream branch: ae0a457
series: https://patchwork.kernel.org/project/netdevbpf/list/?series=944472
version: 1

@kernel-patches-daemon-bpf
Copy link
Author

Upstream branch: f4edc66
series: https://patchwork.kernel.org/project/netdevbpf/list/?series=944472
version: 1

@kernel-patches-daemon-bpf
Copy link
Author

Upstream branch: 6ca2162
series: https://patchwork.kernel.org/project/netdevbpf/list/?series=944472
version: 1

@kernel-patches-daemon-bpf
Copy link
Author

Upstream branch: a259804
series: https://patchwork.kernel.org/project/netdevbpf/list/?series=944472
version: 1

@kernel-patches-daemon-bpf
Copy link
Author

Upstream branch: 79db658
series: https://patchwork.kernel.org/project/netdevbpf/list/?series=944472
version: 1

@kernel-patches-daemon-bpf
Copy link
Author

Upstream branch: e16e64f
series: https://patchwork.kernel.org/project/netdevbpf/list/?series=944472
version: 1

@kernel-patches-daemon-bpf
Copy link
Author

Upstream branch: 51d6504
series: https://patchwork.kernel.org/project/netdevbpf/list/?series=944472
version: 1

@kernel-patches-daemon-bpf
Copy link
Author

Upstream branch: 307ef66
series: https://patchwork.kernel.org/project/netdevbpf/list/?series=944472
version: 1

@kernel-patches-daemon-bpf
Copy link
Author

Upstream branch: 9aa8fe2
series: https://patchwork.kernel.org/project/netdevbpf/list/?series=944472
version: 1

@kernel-patches-daemon-bpf
Copy link
Author

Upstream branch: 9aa8fe2
series: https://patchwork.kernel.org/project/netdevbpf/list/?series=944472
version: 1

@kernel-patches-daemon-bpf
Copy link
Author

Upstream branch: 9aa8fe2
series: https://patchwork.kernel.org/project/netdevbpf/list/?series=944472
version: 1

@kernel-patches-daemon-bpf
Copy link
Author

Upstream branch: 9aa8fe2
series: https://patchwork.kernel.org/project/netdevbpf/list/?series=944472
version: 1

Vincent reported that running XDP synproxy program on LoongArch
results in the following error:
    JIT doesn't support bpf-to-bpf calls
With dmesg:
    multi-func JIT bug 1391 != 1390

The root cause is that verifier will refill the imm with the
correct addresses of bpf_calls for BPF_PSEUDO_FUNC instructions
and then run the last pass of JIT. So we generate different JIT
code for the same instruction in two passes (one for placeholder
and one for real address). Let's use move_addr() instead.

See commit 64f50f6 ("LoongArch, bpf: Use 4 instructions for
 function address in JIT") for a similar fix.

Fixes: 69c087b ("bpf: Add bpf_for_each_map_elem() helper")
Fixes: bb035ef ("LoongArch: BPF: Support mixing bpf2bpf and tailcalls")
Reported-by: Vincent Li <[email protected]>
Closes: https://lore.kernel.org/loongarch/CAK3+h2yfM9FTNiXvEQBkvtuoJrvzmN4c_NZsFXqEk4Cj1tsBNA@mail.gmail.com/T/#u
Signed-off-by: Hengqi Chen <[email protected]>
Tested-by: Vincent Li <[email protected]>
@kernel-patches-daemon-bpf
Copy link
Author

Upstream branch: 9aa8fe2
series: https://patchwork.kernel.org/project/netdevbpf/list/?series=944472
version: 1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant