Re: [PATCH bpf RESEND v2 1/2] bpf: Fix memory access flags in helper prototypes

From: Zesen Liu

Date: Mon Jan 19 2026 - 22:39:55 EST


[...]

> On Jan 20, 2026, at 04:24, Eduard Zingerman <eddyz87@xxxxxxxxx> wrote:
>
> Q: why ARG_PTR_TO_UNINIT_MEM here, but not for a previous function and
> not for snprintf variants?

For bpf_get_stack_proto_raw_tp, I chose ARG_PTR_TO_UNINIT_MEM to be consistent with its siblings:

• bpf_get_stack_proto_tp (bpf_trace.c:1425)
• bpf_get_stack_proto (stackmap.c:525)
• bpf_get_stack_sleepable_proto (stackmap.c:541)

All of these are wrappers around the same core function bpf_get_stack() / __bpf_get_stack(), passing the buffer with identical semantics, and all use ARG_PTR_TO_UNINIT_MEM.