Re: [PATCH bpf-next] libbpf: fix bpf_object name determination for bpf_object__open_file()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Nov 21, 2019 at 4:36 PM Andrii Nakryiko <andriin@xxxxxx> wrote:
>
> If bpf_object__open_file() gets path like "some/dir/obj.o", it should derive
> BPF object's name as "obj" (unless overriden through opts->object_name).
> Instead, due to using `path` as a fallback value for opts->obj_name, path is
> used as is for object name, so for above example BPF object's name will be
> verbatim "some/dir/obj", which leads to all sorts of troubles, especially when
> internal maps are concern (they are using up to 8 characters of object name).
> Fix that by ensuring object_name stays NULL, unless overriden.
>
> Fixes: 291ee02b5e40 ("libbpf: Refactor bpf_object__open APIs to use common opts")
> Signed-off-by: Andrii Nakryiko <andriin@xxxxxx>

Applied to bpf-next. Thanks



[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux