-
Notifications
You must be signed in to change notification settings - Fork 152
bpf: arm64: Fix panic due to missing BTI at indirect jump targets #10382
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
Conversation
|
Upstream branch: 688b745 |
233a075 to
fbe4d04
Compare
|
Upstream branch: bd5bdd2 |
d058d2d to
2a13bc1
Compare
fbe4d04 to
6abef8e
Compare
|
Upstream branch: 34235a3 |
2a13bc1 to
b42c9ef
Compare
6abef8e to
2751ec7
Compare
|
Upstream branch: 85bdeeb |
b42c9ef to
7f5801a
Compare
2751ec7 to
886a6a6
Compare
|
Upstream branch: ff34657 |
7f5801a to
7308e09
Compare
886a6a6 to
4eeea58
Compare
|
Upstream branch: ff34657 |
7308e09 to
1b85a78
Compare
4eeea58 to
a9395d7
Compare
|
Upstream branch: 8f7aa3d |
1b85a78 to
ae04e49
Compare
a9395d7 to
c320ac6
Compare
|
Upstream branch: 835a507 |
ae04e49 to
a00a6fa
Compare
c320ac6 to
d24fc80
Compare
|
Upstream branch: 835a507 |
a00a6fa to
c168260
Compare
d24fc80 to
155b58a
Compare
|
Upstream branch: 835a507 |
c168260 to
f12e82e
Compare
155b58a to
942f7c3
Compare
|
Upstream branch: 81f88f6 |
f12e82e to
d664e95
Compare
942f7c3 to
caaaee4
Compare
|
Upstream branch: 5d9fb42 |
d664e95 to
bdca48e
Compare
caaaee4 to
0f1145d
Compare
|
Upstream branch: 5d9fb42 |
When BTI is enabled, the indirect jump selftest triggers BTI exception: Internal error: Oops - BTI: 0000000036000003 [#1] SMP ... Call trace: bpf_prog_2e5f1c71c13ac3e0_big_jump_table+0x54/0xf8 (P) bpf_prog_run_pin_on_cpu+0x140/0x468 bpf_prog_test_run_syscall+0x280/0x3b8 bpf_prog_test_run+0x22c/0x2c0 __sys_bpf+0x4d8/0x5c8 __arm64_sys_bpf+0x88/0xa8 invoke_syscall+0x80/0x220 el0_svc_common+0x160/0x1d0 do_el0_svc+0x54/0x70 el0_svc+0x54/0x188 el0t_64_sync_handler+0x84/0x130 el0t_64_sync+0x198/0x1a0 This happens because no BTI instruction is generated by the JIT for indirect jump targets. Fix it by emitting BTI instruction for every possible indirect jump targets when BTI is enabled. The targets are identified by traversing all instruction arrays used by the BPF program, since indirect jump targets can only be read from instruction arrays. Fixes: f4a66cf ("bpf: arm64: Add support for indirect jumps") Signed-off-by: Xu Kuohai <xukuohai@huawei.com>
bdca48e to
4702d99
Compare
|
At least one diff in series https://patchwork.kernel.org/project/netdevbpf/list/?series=1028290 expired. Closing PR. |
Pull request for series with
subject: bpf: arm64: Fix panic due to missing BTI at indirect jump targets
version: 1
url: https://patchwork.kernel.org/project/netdevbpf/list/?series=1028290