Commit d59232a
bpf: Rename ARG_PTR_TO_KPTR -> ARG_KPTR_XCHG_DEST
ARG_PTR_TO_KPTR is currently only used by the bpf_kptr_xchg helper.
Although it limits reg types for that helper's first arg to
PTR_TO_MAP_VALUE, any arbitrary mapval won't do: further custom
verification logic ensures that the mapval reg being xchgd-into is
pointing to a kptr field. If this is not the case, it's not safe to xchg
into that reg's pointee.
Let's rename the bpf_arg_type to more accurately describe the fairly
specific expectations that this arg type encodes.
This is a nonfunctional change.
Acked-by: Martin KaFai Lau <martin.lau@kernel.org>
Signed-off-by: Dave Marchevsky <davemarchevsky@fb.com>
Signed-off-by: Amery Hung <amery.hung@bytedance.com>
Link: https://lore.kernel.org/r/20240813212424.2871455-4-amery.hung@bytedance.com
Signed-off-by: Alexei Starovoitov <ast@kernel.org>1 parent 7a851ec commit d59232a
3 files changed
Lines changed: 5 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
744 | 744 | | |
745 | 745 | | |
746 | 746 | | |
747 | | - | |
| 747 | + | |
748 | 748 | | |
749 | 749 | | |
750 | 750 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1636 | 1636 | | |
1637 | 1637 | | |
1638 | 1638 | | |
1639 | | - | |
| 1639 | + | |
1640 | 1640 | | |
1641 | 1641 | | |
1642 | 1642 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8412 | 8412 | | |
8413 | 8413 | | |
8414 | 8414 | | |
8415 | | - | |
| 8415 | + | |
8416 | 8416 | | |
8417 | 8417 | | |
8418 | 8418 | | |
| |||
8444 | 8444 | | |
8445 | 8445 | | |
8446 | 8446 | | |
8447 | | - | |
| 8447 | + | |
8448 | 8448 | | |
8449 | 8449 | | |
8450 | 8450 | | |
| |||
9044 | 9044 | | |
9045 | 9045 | | |
9046 | 9046 | | |
9047 | | - | |
| 9047 | + | |
9048 | 9048 | | |
9049 | 9049 | | |
9050 | 9050 | | |
| |||
0 commit comments