Commit d826684
bpf: Fix net.core.bpf_jit_harden race
It is the bpf_jit_harden counterpart to commit 60b58af ("bpf: fix
net.core.bpf_jit_enable race"). bpf_jit_harden will be tested twice
for each subprog if there are subprogs in bpf program and constant
blinding may increase the length of program, so when running
"./test_progs -t subprogs" and toggling bpf_jit_harden between 0 and 2,
jit_subprogs may fail because constant blinding increases the length
of subprog instructions during extra passs.
So cache the value of bpf_jit_blinding_enabled() during program
allocation, and use the cached value during constant blinding, subprog
JITing and args tracking of tail call.
Signed-off-by: Hou Tao <[email protected]>1 parent 4b7eea7 commit d826684
3 files changed
+6
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
566 | 566 | | |
567 | 567 | | |
568 | 568 | | |
| 569 | + | |
569 | 570 | | |
570 | 571 | | |
571 | 572 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
105 | 105 | | |
106 | 106 | | |
107 | 107 | | |
| 108 | + | |
108 | 109 | | |
109 | 110 | | |
110 | 111 | | |
| |||
1382 | 1383 | | |
1383 | 1384 | | |
1384 | 1385 | | |
1385 | | - | |
| 1386 | + | |
1386 | 1387 | | |
1387 | 1388 | | |
1388 | 1389 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13023 | 13023 | | |
13024 | 13024 | | |
13025 | 13025 | | |
| 13026 | + | |
13026 | 13027 | | |
13027 | 13028 | | |
13028 | 13029 | | |
| |||
13149 | 13150 | | |
13150 | 13151 | | |
13151 | 13152 | | |
| 13153 | + | |
13152 | 13154 | | |
13153 | 13155 | | |
13154 | 13156 | | |
| |||
13242 | 13244 | | |
13243 | 13245 | | |
13244 | 13246 | | |
13245 | | - | |
13246 | 13247 | | |
13247 | 13248 | | |
13248 | 13249 | | |
| |||
13406 | 13407 | | |
13407 | 13408 | | |
13408 | 13409 | | |
13409 | | - | |
| 13410 | + | |
13410 | 13411 | | |
13411 | 13412 | | |
13412 | 13413 | | |
| |||
0 commit comments