Re: [RFC PATCH bpf-next 08/13] bpf: Alloc and free bpf_map id in bpf namespace

From: Toke Høiland-Jørgensen
Date: Sun Mar 26 2023 - 06:51:13 EST


Yafang Shao <laoar.shao@xxxxxxxxx> writes:

> We only expose the bpf map id under current bpf namespace to user. The
> map->id is still the id in the init bpf namespace.
>
> The result as follows,
>
> Run bpftool in a new bpf namespace
> $ bpftool map show
> 4: array name kprobe_b.rodata flags 0x80
> key 4B value 37B max_entries 1 memlock 360B
> btf_id 159 frozen

The btf_id is identical for all the different objects in this example
output; surely that can't be right? Copy-paste error? Same thing in the
other patches...

-Toke