Commit 79ee070
bpf: Perform CFG walk for exception callback
Since exception callbacks are not referenced using bpf_pseudo_func and
bpf_pseudo_call instructions, check_cfg traversal will never explore
instructions of the exception callback. Even after adding the subprog,
the program will then fail with a 'unreachable insn' error.
We thus need to begin walking from the start of the exception callback
again in check_cfg after a complete CFG traversal finishes, so as to
explore the CFG rooted at the exception callback.
Signed-off-by: Kumar Kartikeya Dwivedi <memxor@gmail.com>1 parent 0e22549 commit 79ee070
1 file changed
+13
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15126 | 15126 | | |
15127 | 15127 | | |
15128 | 15128 | | |
15129 | | - | |
15130 | | - | |
| 15129 | + | |
| 15130 | + | |
15131 | 15131 | | |
15132 | 15132 | | |
15133 | 15133 | | |
| |||
15143 | 15143 | | |
15144 | 15144 | | |
15145 | 15145 | | |
| 15146 | + | |
15146 | 15147 | | |
15147 | 15148 | | |
15148 | 15149 | | |
| |||
15169 | 15170 | | |
15170 | 15171 | | |
15171 | 15172 | | |
| 15173 | + | |
| 15174 | + | |
| 15175 | + | |
| 15176 | + | |
| 15177 | + | |
| 15178 | + | |
| 15179 | + | |
| 15180 | + | |
| 15181 | + | |
| 15182 | + | |
15172 | 15183 | | |
15173 | 15184 | | |
15174 | 15185 | | |
| |||
0 commit comments