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

riscv, bpf: Emit fixed-length instructions for BPF_PSEUDO_FUNC #4137

Closed
wants to merge 1 commit into from

Conversation

kernel-patches-bot
Copy link

Pull request for series with
subject: riscv, bpf: Emit fixed-length instructions for BPF_PSEUDO_FUNC
version: 2
url: https://patchwork.kernel.org/project/netdevbpf/list/?series=701179

@kernel-patches-bot
Copy link
Author

Upstream branch: 01f856a
series: https://patchwork.kernel.org/project/netdevbpf/list/?series=701179
version: 2

@kernel-patches-bot
Copy link
Author

Upstream branch: 01f856a
series: https://patchwork.kernel.org/project/netdevbpf/list/?series=701179
version: 2

@kernel-patches-bot
Copy link
Author

Upstream branch: e931a17
series: https://patchwork.kernel.org/project/netdevbpf/list/?series=701179
version: 2

@kernel-patches-bot
Copy link
Author

At least one diff in series https://patchwork.kernel.org/project/netdevbpf/list/?series=701179 expired. Closing PR.

For BPF_PSEUDO_FUNC instruction, verifier will refill imm with
correct addresses of bpf_calls and then run last pass of JIT.
Since the emit_imm of RV64 is variable-length, which will emit
appropriate length instructions accorroding to the imm, it may
broke ctx->offset, and lead to unpredictable problem, such as
inaccurate jump. So let's fix it with fixed-length instructions.

Fixes: 69c087b ("bpf: Add bpf_for_each_map_elem() helper")
Signed-off-by: Pu Lehui <pulehui@huawei.com>
Suggested-by: Björn Töpel <bjorn@rivosinc.com>
@kernel-patches-bot
Copy link
Author

Upstream branch: e931a17
series: https://patchwork.kernel.org/project/netdevbpf/list/?series=702120
version: 3

@kernel-patches-bot
Copy link
Author

At least one diff in series https://patchwork.kernel.org/project/netdevbpf/list/?series=702120 irrelevant now. Closing PR.

@kernel-patches-bot kernel-patches-bot deleted the series/701179=>bpf branch December 6, 2022 20:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
1 participant