Re: [PATCH bpf-next v3 2/6] bpf/libbpf: BTF support for typed ksyms

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

 



On Wed, Sep 16, 2020 at 3:38 PM Hao Luo <haoluo@xxxxxxxxxx> wrote:
>
> If a ksym is defined with a type, libbpf will try to find the ksym's btf
> information from kernel btf. If a valid btf entry for the ksym is found,
> libbpf can pass in the found btf id to the verifier, which validates the
> ksym's type and value.
>
> Typeless ksyms (i.e. those defined as 'void') will not have such btf_id,
> but it has the symbol's address (read from kallsyms) and its value is
> treated as a raw pointer.
>
> Signed-off-by: Hao Luo <haoluo@xxxxxxxxxx>
> ---

This looks nice and clean, thanks!

Acked-by: Andrii Nakryiko <andriin@xxxxxx>

>  tools/lib/bpf/libbpf.c | 112 ++++++++++++++++++++++++++++++++++++-----
>  1 file changed, 99 insertions(+), 13 deletions(-)
>

[...]



[Index of Archives]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux