Commit f799243
bpf: Introduce bpf_int_jit_abort()
It will be used to do cleanup for subprog which has been jited in first
pass but extra pass has not been done. The scenario is possible when
extra pass for subprog in the middle fails. The failure may lead to
oops due to inconsistent status for pack allocator (e.g. ro_hdr->size
and use_bpf_prog_pack) and memory leak in aux->jit_data.
For x86-64, bpf_int_jit_abort() will free allocated memories saved in
aux->jit_data and fall back to interpreter mode to bypass the calling
of bpf_jit_binary_pack_free() in bpf_jit_free().
Signed-off-by: Hou Tao <[email protected]>1 parent 029caed commit f799243
File tree
4 files changed
+37
-0
lines changed- arch/x86/net
- include/linux
- kernel/bpf
4 files changed
+37
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2244 | 2244 | | |
2245 | 2245 | | |
2246 | 2246 | | |
| 2247 | + | |
| 2248 | + | |
| 2249 | + | |
| 2250 | + | |
| 2251 | + | |
| 2252 | + | |
| 2253 | + | |
| 2254 | + | |
| 2255 | + | |
| 2256 | + | |
| 2257 | + | |
| 2258 | + | |
| 2259 | + | |
| 2260 | + | |
| 2261 | + | |
| 2262 | + | |
| 2263 | + | |
| 2264 | + | |
| 2265 | + | |
| 2266 | + | |
| 2267 | + | |
| 2268 | + | |
| 2269 | + | |
| 2270 | + | |
2247 | 2271 | | |
2248 | 2272 | | |
2249 | 2273 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
945 | 945 | | |
946 | 946 | | |
947 | 947 | | |
| 948 | + | |
948 | 949 | | |
949 | 950 | | |
950 | 951 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2636 | 2636 | | |
2637 | 2637 | | |
2638 | 2638 | | |
| 2639 | + | |
| 2640 | + | |
| 2641 | + | |
| 2642 | + | |
| 2643 | + | |
| 2644 | + | |
| 2645 | + | |
| 2646 | + | |
| 2647 | + | |
2639 | 2648 | | |
2640 | 2649 | | |
2641 | 2650 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13085 | 13085 | | |
13086 | 13086 | | |
13087 | 13087 | | |
| 13088 | + | |
| 13089 | + | |
| 13090 | + | |
13088 | 13091 | | |
13089 | 13092 | | |
13090 | 13093 | | |
| |||
0 commit comments