Commit 201166d
Alexei Starovoitov
Merge branch 'fix-bpf_throw-global-subprogs-interaction'
Kumar Kartikeya Dwivedi says:
====================
Fix bpf_throw() vs global subprogs interaction
There is a bug where bpf_throw()'s reachability across global subprogs
is missed by the verifier, leading to successful verification when any
kernel resource or lock is held across global subprog call boundary.
Fix this by effect summarization like other related side effects and
propagate exception reachability into callees.
Changelog:
----------
v1 -> v2
v1: https://lore.kernel.org/bpf/20260516022426.2109698-1-memxor@gmail.com
* Reorder might_throw bit to avoid bpf-next conflicts. (Alexei)
====================
Link: https://patch.msgid.link/20260517075530.3461166-1-memxor@gmail.com
Signed-off-by: Alexei Starovoitov <ast@kernel.org>4 files changed
Lines changed: 53 additions & 7 deletions
File tree
- include/linux
- kernel/bpf
- tools/testing/selftests/bpf/progs
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
729 | 729 | | |
730 | 730 | | |
731 | 731 | | |
| 732 | + | |
732 | 733 | | |
733 | 734 | | |
734 | 735 | | |
| |||
1308 | 1309 | | |
1309 | 1310 | | |
1310 | 1311 | | |
| 1312 | + | |
1311 | 1313 | | |
1312 | 1314 | | |
1313 | 1315 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
64 | 64 | | |
65 | 65 | | |
66 | 66 | | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
67 | 75 | | |
68 | 76 | | |
69 | 77 | | |
70 | 78 | | |
71 | | - | |
| 79 | + | |
72 | 80 | | |
73 | 81 | | |
74 | 82 | | |
| |||
78 | 86 | | |
79 | 87 | | |
80 | 88 | | |
| 89 | + | |
81 | 90 | | |
82 | 91 | | |
83 | 92 | | |
| |||
509 | 518 | | |
510 | 519 | | |
511 | 520 | | |
| 521 | + | |
| 522 | + | |
512 | 523 | | |
513 | 524 | | |
514 | 525 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
442 | 442 | | |
443 | 443 | | |
444 | 444 | | |
445 | | - | |
446 | 445 | | |
447 | 446 | | |
448 | 447 | | |
| |||
5405 | 5404 | | |
5406 | 5405 | | |
5407 | 5406 | | |
5408 | | - | |
| 5407 | + | |
5409 | 5408 | | |
5410 | 5409 | | |
5411 | 5410 | | |
| |||
9499 | 9498 | | |
9500 | 9499 | | |
9501 | 9500 | | |
| 9501 | + | |
| 9502 | + | |
| 9503 | + | |
9502 | 9504 | | |
9503 | 9505 | | |
9504 | 9506 | | |
| |||
9552 | 9554 | | |
9553 | 9555 | | |
9554 | 9556 | | |
| 9557 | + | |
| 9558 | + | |
| 9559 | + | |
| 9560 | + | |
| 9561 | + | |
| 9562 | + | |
| 9563 | + | |
| 9564 | + | |
| 9565 | + | |
| 9566 | + | |
| 9567 | + | |
9555 | 9568 | | |
9556 | 9569 | | |
9557 | 9570 | | |
| |||
11782 | 11795 | | |
11783 | 11796 | | |
11784 | 11797 | | |
11785 | | - | |
| 11798 | + | |
11786 | 11799 | | |
11787 | 11800 | | |
11788 | 11801 | | |
| |||
12972 | 12985 | | |
12973 | 12986 | | |
12974 | 12987 | | |
12975 | | - | |
12976 | | - | |
12977 | 12988 | | |
12978 | 12989 | | |
12979 | 12990 | | |
| |||
13354 | 13365 | | |
13355 | 13366 | | |
13356 | 13367 | | |
13357 | | - | |
| 13368 | + | |
13358 | 13369 | | |
13359 | 13370 | | |
13360 | 13371 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
208 | 208 | | |
209 | 209 | | |
210 | 210 | | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
211 | 233 | | |
212 | 234 | | |
213 | 235 | | |
| |||
0 commit comments