[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <77510736c4220e4f745fd152721e86689d8636d8.camel@gmail.com>
Date: Wed, 13 Aug 2025 14:59:50 -0700
From: Eduard Zingerman <eddyz87@...il.com>
To: Yureka Lilian <yuka@...a.dev>, Andrii Nakryiko <andrii@...nel.org>,
Alexei Starovoitov <ast@...nel.org>, Daniel Borkmann
<daniel@...earbox.net>, 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>
Cc: bpf@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2 1/2] bpf: fix reuse of DEVMAP
On Wed, 2025-08-13 at 22:09 +0200, Yureka Lilian wrote:
> Previously, re-using pinned DEVMAP maps would always fail, because
> get_map_info on a DEVMAP always returns flags with BPF_F_RDONLY_PROG set,
> but BPF_F_RDONLY_PROG being set on a map during creation is invalid.
>
> Thus, ignore the BPF_F_RDONLY_PROG flag on both sides when checking for
> compatibility with an existing DEVMAP.
>
> Ignoring it on both sides ensures that it continues to work on older
> kernels which don't set BPF_F_RDONLY_PROG on get_map_info.
>
> The same problem is handled in a third-party ebpf library:
> - https://github.com/cilium/ebpf/issues/925
> - https://github.com/cilium/ebpf/pull/930
>
> Fixes: 0cdbb4b09a06 ("devmap: Allow map lookups from eBPF")
> Signed-off-by: Yureka Lilian <yuka@...a.dev>
> ---
Reviewed-by: Eduard Zingerman <eddyz87@...il.com>
[...]
Powered by blists - more mailing lists