On Wed, Sep 16, 2020 at 3:39 PM Hao Luo <haoluo@xxxxxxxxxx> wrote: > > Selftests for typed ksyms. Tests two types of ksyms: one is a struct, > the other is a plain int. This tests two paths in the kernel. Struct > ksyms will be converted into PTR_TO_BTF_ID by the verifier while int > typed ksyms will be converted into PTR_TO_MEM. > > Signed-off-by: Hao Luo <haoluo@xxxxxxxxxx> > --- LGTM. Acked-by: Andrii Nakryiko <andriin@xxxxxx> > .../testing/selftests/bpf/prog_tests/ksyms.c | 38 ++++------ > .../selftests/bpf/prog_tests/ksyms_btf.c | 70 +++++++++++++++++++ > .../selftests/bpf/progs/test_ksyms_btf.c | 23 ++++++ > tools/testing/selftests/bpf/trace_helpers.c | 27 +++++++ > tools/testing/selftests/bpf/trace_helpers.h | 4 ++ > 5 files changed, 137 insertions(+), 25 deletions(-) > create mode 100644 tools/testing/selftests/bpf/prog_tests/ksyms_btf.c > create mode 100644 tools/testing/selftests/bpf/progs/test_ksyms_btf.c > [...]