Commit 2edc3de
bpf: Recognize btf_decl_tag("arg: Arena") as PTR_TO_ARENA.
In global bpf functions recognize btf_decl_tag("arg:arena") as PTR_TO_ARENA.
Note, when the verifier sees:
__weak void foo(struct bar *p)
it recognizes 'p' as PTR_TO_MEM and 'struct bar' has to be a struct with scalars.
Hence the only way to use arena pointers in global functions is to tag them with "arg:arena".
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Acked-by: Kumar Kartikeya Dwivedi <memxor@gmail.com>
Link: https://lore.kernel.org/bpf/20240308010812.89848-7-alexei.starovoitov@gmail.com1 parent 6082b6c commit 2edc3de
3 files changed
Lines changed: 31 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
712 | 712 | | |
713 | 713 | | |
714 | 714 | | |
| 715 | + | |
715 | 716 | | |
716 | 717 | | |
717 | 718 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7111 | 7111 | | |
7112 | 7112 | | |
7113 | 7113 | | |
7114 | | - | |
7115 | | - | |
7116 | | - | |
7117 | | - | |
| 7114 | + | |
| 7115 | + | |
| 7116 | + | |
| 7117 | + | |
| 7118 | + | |
7118 | 7119 | | |
7119 | 7120 | | |
7120 | 7121 | | |
| |||
7226 | 7227 | | |
7227 | 7228 | | |
7228 | 7229 | | |
| 7230 | + | |
| 7231 | + | |
7229 | 7232 | | |
7230 | 7233 | | |
7231 | 7234 | | |
| |||
7280 | 7283 | | |
7281 | 7284 | | |
7282 | 7285 | | |
| 7286 | + | |
| 7287 | + | |
| 7288 | + | |
| 7289 | + | |
| 7290 | + | |
| 7291 | + | |
| 7292 | + | |
| 7293 | + | |
7283 | 7294 | | |
7284 | 7295 | | |
7285 | 7296 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9379 | 9379 | | |
9380 | 9380 | | |
9381 | 9381 | | |
| 9382 | + | |
| 9383 | + | |
| 9384 | + | |
| 9385 | + | |
| 9386 | + | |
| 9387 | + | |
| 9388 | + | |
| 9389 | + | |
| 9390 | + | |
| 9391 | + | |
| 9392 | + | |
| 9393 | + | |
9382 | 9394 | | |
9383 | 9395 | | |
9384 | 9396 | | |
| |||
20448 | 20460 | | |
20449 | 20461 | | |
20450 | 20462 | | |
| 20463 | + | |
| 20464 | + | |
| 20465 | + | |
20451 | 20466 | | |
20452 | 20467 | | |
20453 | 20468 | | |
| |||
0 commit comments