RE: [PATCH v2 bpf-next 03/14] libbpf: support CO-RE relocations for multi-prog sections

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

 



Andrii Nakryiko wrote:
> Fix up CO-RE relocation code to handle relocations against ELF sections
> containing multiple BPF programs. This requires lookup of a BPF program by its
> section name and instruction index it contains. While it could have been done
> as a simple loop, it could run into performance issues pretty quickly, as
> number of CO-RE relocations can be quite large in real-world applications, and
> each CO-RE relocation incurs BPF program look up now. So instead of simple
> loop, implement a binary search by section name + insn offset.
> 
> Signed-off-by: Andrii Nakryiko <andriin@xxxxxx>
> ---
>  tools/lib/bpf/libbpf.c | 82 +++++++++++++++++++++++++++++++++++++-----
>  1 file changed, 74 insertions(+), 8 deletions(-)
> 

Acked-by: John Fastabend <john.fastabend@xxxxxxxxx>



[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