Commit 93bbd01
bpf: tcp: Mark bpf_load_hdr_opt() arg2 as read-write
[ Upstream commit 8ac412a ]
MEM_WRITE attribute is defined as: "Non-presence of MEM_WRITE means that
MEM is only being read". bpf_load_hdr_opt() both reads and writes from
its arg2 - void *search_res.
This matters a lot for the next commit where we more precisely track
stack accesses. Without this annotation, the verifier will make false
assumptions about the contents of memory written to by helpers and
possibly prune valid branches.
Fixes: 6fad274 ("bpf: Add MEM_WRITE attribute")
Acked-by: Martin KaFai Lau <martin.lau@kernel.org>
Signed-off-by: Daniel Xu <dxu@dxuuu.xyz>
Link: https://lore.kernel.org/r/730e45f8c39be2a5f3d8c4406cceca9d574cbf14.1736886479.git.dxu@dxuuu.xyz
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
(cherry picked from commit 6ea4c53f5313dc4e51a46d092b99e3a08c3aaa92)1 parent f46d4b9 commit 93bbd01
1 file changed
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7604 | 7604 | | |
7605 | 7605 | | |
7606 | 7606 | | |
7607 | | - | |
| 7607 | + | |
7608 | 7608 | | |
7609 | 7609 | | |
7610 | 7610 | | |
| |||
0 commit comments