Re: [PATCH bpf-next v3 2/8] libbpf: Add typeless ksym support to gen_loader

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

 




> On Oct 14, 2021, at 1:56 PM, Kumar Kartikeya Dwivedi <memxor@xxxxxxxxx> wrote:
> 
> This uses the bpf_kallsyms_lookup_name helper added in previous patches
> to relocate typeless ksyms. The return value ENOENT can be ignored, and
> the value written to 'res' can be directly stored to the insn, as it is
> overwritten to 0 on lookup failure. For repeating symbols, we can simply
> copy the previously populated bpf_insn.
> 
> Also, we need to take care to not close fds for typeless ksym_desc, so
> reuse the 'off' member's space to add a marker for typeless ksym and use
> that to skip them in cleanup_relos.
> 
> We add a emit_ksym_relo_log helper that avoids duplicating common
> logging instructions between typeless and weak ksym (for future commit).
> 
> Signed-off-by: Kumar Kartikeya Dwivedi <memxor@xxxxxxxxx>

LGTM! 

Acked-by: Song Liu <songliubraving@xxxxxx>



[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