> bpf: Reject offloaded maps as map-in-map inner maps TL;DR: Nit only: the comment in bpf_map_meta_equal() saying ops need no comparison now contradicts the new ops check in bpf_map_fd_get_ptr(); suggests updating it or moving the check there. > diff --git a/kernel/bpf/map_in_map.c b/kernel/bpf/map_in_map.c > --- a/kernel/bpf/map_in_map.c > +++ b/kernel/bpf/map_in_map.c [ ... ] > @@ -110,7 +112,8 @@ void *bpf_map_fd_get_ptr(struct bpf_map *map, > return ERR_PTR(-ENOTSUPP); > > inner_map_meta = map->inner_map_meta; > - if (inner_map_meta->ops->map_meta_equal(inner_map_meta, inner_map)) { > + if (inner_map_meta->ops == inner_map->ops && > + inner_map_meta->ops->map_meta_equal(inner_map_meta, inner_map)) { This isn't a bug, but the comment in bpf_map_meta_equal() still says: /* No need to compare ops because it is covered by map_type */ Offloaded maps share map_type with software maps but use bpf_map_offload_ops, so that comment now contradicts the new ops check here. Could it be updated or dropped? Another option is to move the ops comparison into bpf_map_meta_equal(), which array_map_meta_equal() and xsk_map_meta_equal() also call, and replace the comment there. --- AI reviewed your patch. Please fix the bug or email reply why it's not a bug. See: https://github.com/kernel-patches/vmtest/blob/master/ci/claude/README.md CI run summary: https://github.com/kernel-patches/bpf/actions/runs/43208166255