Re: [PATCH bpf-next 2/6] bpf: btf: Introduce BTF ID

2018-05-08 Thread Song Liu
> On May 4, 2018, at 2:49 PM, Martin KaFai Lau wrote: > > This patch gives an ID to each loaded BTF. The ID is allocated by > the idr like the existing prog-id and map-id. > > The bpf_put(map->btf) is moved to __bpf_map_put() so that the > userspace can stop seeing the BTF ID ASAP when the la

[PATCH bpf-next 2/6] bpf: btf: Introduce BTF ID

2018-05-04 Thread Martin KaFai Lau
This patch gives an ID to each loaded BTF. The ID is allocated by the idr like the existing prog-id and map-id. The bpf_put(map->btf) is moved to __bpf_map_put() so that the userspace can stop seeing the BTF ID ASAP when the last BTF refcnt is gone. It also makes BTF accessible from userspace th