Commit bab08d1
bpf: Simplify mark_stack_slot_obj_read() and callers
Rename mark_stack_slot_obj_read() as mark_stack_slots_scratched() and
directly call it from functions processing iter, dynptr and irq_flag.
Commit 6762e3a ("bpf: simplify liveness to use (callsite, depth)
keyed func_instances") has removed the dynamic liveness component in
mark_stack_slot_obj_read(). The function effectively only marks stack
slots as scratched and always succeed. Therefore, return void, drop the
unused bpf_reg_state argument and rename it to
mark_stack_slots_scratched() to reflect what it does now.
In addition, to prepare for unifying dynptr handling, dynptr_get_spi()
will be moved out of mark_dynptr_read(). As mark_dynptr_read() would join
mark_iter_read() as a thin wrapper of mark_stack_slots_scratched(), just
open code these helpers.
Acked-by: Eduard Zingerman <eddyz87@gmail.com>
Signed-off-by: Amery Hung <ameryhung@gmail.com>
Link: https://lore.kernel.org/r/20260529014936.2811085-2-ameryhung@gmail.com
Signed-off-by: Alexei Starovoitov <ast@kernel.org>1 parent 868d43c commit bab08d1
1 file changed
Lines changed: 21 additions & 48 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3006 | 3006 | | |
3007 | 3007 | | |
3008 | 3008 | | |
3009 | | - | |
3010 | | - | |
| 3009 | + | |
| 3010 | + | |
3011 | 3011 | | |
3012 | 3012 | | |
3013 | 3013 | | |
3014 | 3014 | | |
3015 | 3015 | | |
3016 | | - | |
3017 | | - | |
3018 | | - | |
3019 | | - | |
3020 | | - | |
3021 | | - | |
3022 | | - | |
3023 | | - | |
3024 | | - | |
3025 | | - | |
3026 | | - | |
3027 | | - | |
3028 | | - | |
3029 | | - | |
3030 | | - | |
3031 | | - | |
3032 | | - | |
3033 | | - | |
3034 | | - | |
3035 | | - | |
3036 | | - | |
3037 | | - | |
3038 | | - | |
3039 | | - | |
3040 | | - | |
3041 | | - | |
3042 | | - | |
3043 | | - | |
3044 | | - | |
3045 | | - | |
3046 | | - | |
3047 | | - | |
3048 | | - | |
3049 | | - | |
3050 | | - | |
3051 | | - | |
3052 | | - | |
3053 | 3016 | | |
3054 | 3017 | | |
3055 | 3018 | | |
| |||
7261 | 7224 | | |
7262 | 7225 | | |
7263 | 7226 | | |
7264 | | - | |
| 7227 | + | |
7265 | 7228 | | |
7266 | 7229 | | |
7267 | 7230 | | |
| |||
7323 | 7286 | | |
7324 | 7287 | | |
7325 | 7288 | | |
7326 | | - | |
| 7289 | + | |
| 7290 | + | |
| 7291 | + | |
| 7292 | + | |
| 7293 | + | |
| 7294 | + | |
| 7295 | + | |
| 7296 | + | |
| 7297 | + | |
| 7298 | + | |
| 7299 | + | |
7327 | 7300 | | |
7328 | 7301 | | |
7329 | 7302 | | |
| |||
7433 | 7406 | | |
7434 | 7407 | | |
7435 | 7408 | | |
7436 | | - | |
7437 | | - | |
7438 | | - | |
| 7409 | + | |
7439 | 7410 | | |
7440 | 7411 | | |
7441 | 7412 | | |
| |||
11399 | 11370 | | |
11400 | 11371 | | |
11401 | 11372 | | |
11402 | | - | |
| 11373 | + | |
11403 | 11374 | | |
11404 | 11375 | | |
11405 | 11376 | | |
| |||
11440 | 11411 | | |
11441 | 11412 | | |
11442 | 11413 | | |
11443 | | - | |
11444 | | - | |
11445 | | - | |
| 11414 | + | |
| 11415 | + | |
| 11416 | + | |
| 11417 | + | |
| 11418 | + | |
11446 | 11419 | | |
11447 | 11420 | | |
11448 | 11421 | | |
| |||
0 commit comments