Commit 7ebd35b
bpf, arm64: Emit BTI for indirect jump target
On CPUs that support BTI, the indirect jump selftest triggers a kernel
panic because there is no BTI instructions at the indirect jump targets.
Fix it by emitting a BTI instruction for each indirect jump target.
For reference, below is a sample panic log.
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
Fixes: f4a66cf ("bpf: arm64: Add support for indirect jumps")
Reviewed-by: Anton Protopopov <[email protected]>
Signed-off-by: Xu Kuohai <[email protected]>1 parent 4228152 commit 7ebd35b
1 file changed
+10
-7
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1198 | 1198 | | |
1199 | 1199 | | |
1200 | 1200 | | |
1201 | | - | |
1202 | | - | |
| 1201 | + | |
| 1202 | + | |
1203 | 1203 | | |
1204 | 1204 | | |
1205 | 1205 | | |
| |||
1224 | 1224 | | |
1225 | 1225 | | |
1226 | 1226 | | |
| 1227 | + | |
| 1228 | + | |
| 1229 | + | |
1227 | 1230 | | |
1228 | 1231 | | |
1229 | 1232 | | |
| |||
1899 | 1902 | | |
1900 | 1903 | | |
1901 | 1904 | | |
1902 | | - | |
| 1905 | + | |
1903 | 1906 | | |
1904 | 1907 | | |
1905 | 1908 | | |
| |||
1918 | 1921 | | |
1919 | 1922 | | |
1920 | 1923 | | |
1921 | | - | |
| 1924 | + | |
1922 | 1925 | | |
1923 | 1926 | | |
1924 | 1927 | | |
| |||
2079 | 2082 | | |
2080 | 2083 | | |
2081 | 2084 | | |
2082 | | - | |
| 2085 | + | |
2083 | 2086 | | |
2084 | 2087 | | |
2085 | 2088 | | |
| |||
2127 | 2130 | | |
2128 | 2131 | | |
2129 | 2132 | | |
2130 | | - | |
| 2133 | + | |
2131 | 2134 | | |
2132 | 2135 | | |
2133 | 2136 | | |
| |||
2136 | 2139 | | |
2137 | 2140 | | |
2138 | 2141 | | |
2139 | | - | |
| 2142 | + | |
2140 | 2143 | | |
2141 | 2144 | | |
2142 | 2145 | | |
| |||
0 commit comments