Thread (16 messages) 16 messages, 3 authors, 2020-09-29

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

From: Andrii Nakryiko <hidden>
Date: 2020-09-21 17:52:55
Also in: bpf, linux-kselftest, lkml

On Wed, Sep 16, 2020 at 3:38 PM Hao Luo [off-list ref] 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 <redacted>
---
This looks nice and clean, thanks!

Acked-by: Andrii Nakryiko <redacted>
 tools/lib/bpf/libbpf.c | 112 ++++++++++++++++++++++++++++++++++++-----
 1 file changed, 99 insertions(+), 13 deletions(-)
[...]
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help