[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <5ca8756f0387e5b2be47e9522b1f4b5fc149768d.camel@gmail.com>
Date: Tue, 20 Jan 2026 09:54:59 -0800
From: Eduard Zingerman <eddyz87@...il.com>
To: Zesen Liu <ftyghome@...il.com>
Cc: Alexei Starovoitov <ast@...nel.org>, Daniel Borkmann
<daniel@...earbox.net>, Andrii Nakryiko <andrii@...nel.org>, Martin KaFai
Lau <martin.lau@...ux.dev>, Song Liu <song@...nel.org>, Yonghong Song
<yonghong.song@...ux.dev>, John Fastabend <john.fastabend@...il.com>, KP
Singh <kpsingh@...nel.org>, Stanislav Fomichev <sdf@...ichev.me>, Hao Luo
<haoluo@...gle.com>, Jiri Olsa <jolsa@...nel.org>, Matt Bobrowski
<mattbobrowski@...gle.com>, Steven Rostedt <rostedt@...dmis.org>, Masami
Hiramatsu <mhiramat@...nel.org>, Mathieu Desnoyers
<mathieu.desnoyers@...icios.com>, "David S. Miller" <davem@...emloft.net>,
Eric Dumazet <edumazet@...gle.com>, Jakub Kicinski <kuba@...nel.org>,
Paolo Abeni <pabeni@...hat.com>, Simon Horman <horms@...nel.org>, Daniel Xu
<dxu@...uu.xyz>, bpf@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-trace-kernel@...r.kernel.org, netdev@...r.kernel.org, Shuran Liu
<electronlsr@...il.com>, Peili Gao <gplhust955@...il.com>, Haoran Ni
<haoran.ni.cs@...il.com>
Subject: Re: [PATCH bpf RESEND v2 1/2] bpf: Fix memory access flags in
helper prototypes
On Tue, 2026-01-20 at 11:39 +0800, Zesen Liu wrote:
> [...]
>
> > On Jan 20, 2026, at 04:24, Eduard Zingerman <eddyz87@...il.com> 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.
Ack, makes sense, thank you for explaining.
Powered by blists - more mailing lists