[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <600177c05c552f470cc5e25c7dba6990d96790e9.camel@gmail.com>
Date: Mon, 19 Jan 2026 12:25:08 -0800
From: Eduard Zingerman <eddyz87@...il.com>
To: Zesen Liu <ftyghome@...il.com>, 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>
Cc: 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 2/2] bpf: Require ARG_PTR_TO_MEM with
memory flag
On Sun, 2026-01-18 at 16:16 +0800, Zesen Liu wrote:
> Add check to ensure that ARG_PTR_TO_MEM is used with either MEM_WRITE or
> MEM_RDONLY.
>
> Using ARG_PTR_TO_MEM alone without tags does not make sense because:
>
> - If the helper does not change the argument, missing MEM_RDONLY causes the
> verifier to incorrectly reject a read-only buffer.
> - If the helper does change the argument, missing MEM_WRITE causes the
> verifier to incorrectly assume the memory is unchanged, leading to errors
> in code optimization.
>
> Co-developed-by: Shuran Liu <electronlsr@...il.com>
> Signed-off-by: Shuran Liu <electronlsr@...il.com>
> Co-developed-by: Peili Gao <gplhust955@...il.com>
> Signed-off-by: Peili Gao <gplhust955@...il.com>
> Co-developed-by: Haoran Ni <haoran.ni.cs@...il.com>
> Signed-off-by: Haoran Ni <haoran.ni.cs@...il.com>
> Signed-off-by: Zesen Liu <ftyghome@...il.com>
> ---
Note: this patch no longer applies properly because of the change in
the check_func_proto() signature.
[...]
Powered by blists - more mailing lists