On 12/12/24 3:22 PM, Daniel Xu wrote:
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.
Acked-by: Martin KaFai Lau <martin.lau@xxxxxxxxxx>