-
Notifications
You must be signed in to change notification settings - Fork 133
LoongArch: BPF: Optimize the calculation method of jmp_offset in the emit_bpf_tail_call function #9013
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
base: bpf-next_base
Are you sure you want to change the base?
Conversation
Upstream branch: c5cebb2 |
21880e2
to
86d7ac4
Compare
Upstream branch: 90b83ef |
977c360
to
2845b18
Compare
86d7ac4
to
9fa5029
Compare
Upstream branch: 90b83ef |
2845b18
to
9a79fd9
Compare
9fa5029
to
148f936
Compare
Upstream branch: bb1556e |
9a79fd9
to
6f947b4
Compare
148f936
to
b3eed83
Compare
Upstream branch: bb1556e |
6f947b4
to
c2df764
Compare
b3eed83
to
5fa9e7d
Compare
Upstream branch: cd2e103 |
c2df764
to
7cd9399
Compare
5fa9e7d
to
810d3c3
Compare
Upstream branch: cd2e103 |
14b9b71
to
e6f4f75
Compare
ccbb215
to
de55d92
Compare
Upstream branch: a570f38 |
e6f4f75
to
66d135f
Compare
de55d92
to
6d7073a
Compare
Upstream branch: 64a064c |
66d135f
to
a0e9418
Compare
6d7073a
to
4a3e54f
Compare
Upstream branch: e41079f |
a0e9418
to
ce9c6e2
Compare
4a3e54f
to
d7c6165
Compare
Upstream branch: e41079f |
ce9c6e2
to
264ec8f
Compare
d7c6165
to
1a13510
Compare
Upstream branch: 97ebac5 |
264ec8f
to
1b3d385
Compare
1a13510
to
79f300f
Compare
Upstream branch: 2bc0575 |
1b3d385
to
7b21122
Compare
79f300f
to
aac333e
Compare
Upstream branch: 5fcf896 |
7b21122
to
df177a4
Compare
aac333e
to
76357bc
Compare
Upstream branch: 2d72dd1 |
…emit_bpf_tail_call function For a ebpf subprog JIT,the last call bpf_int_jit_compile function will directly enter the skip_init_ctx process. At this point, out_offset = -1, the jmp_offset in emit_bpf_tail_call is calculated by #define jmp_offset (out_offset - (cur_offset)) is a negative number, which does not meet expectations.The final generated assembly as follow. 54: bgeu $a2, $t1, -8 # 0x0000004c 58: addi.d $a6, $s5, -1 5c: bltz $a6, -16 # 0x0000004c 60: alsl.d $t2, $a2, $a1, 0x3 64: ld.d $t2, $t2, 264 68: beq $t2, $zero, -28 # 0x0000004c Before apply this patch, the follow test case will reveal soft lock issues. cd tools/testing/selftests/bpf/ ./test_progs --allow=tailcalls/tailcall_bpf2bpf_1 dmesg: watchdog: BUG: soft lockup - CPU#2 stuck for 26s! [test_progs:25056] Signed-off-by: Haoran Jiang <[email protected]>
df177a4
to
19e79e5
Compare
Pull request for series with
subject: LoongArch: BPF: Optimize the calculation method of jmp_offset in the emit_bpf_tail_call function
version: 1
url: https://patchwork.kernel.org/project/netdevbpf/list/?series=966970