On Wed, Jul 6, 2022 at 6:17 AM Alan Maguire <alan.maguire@xxxxxxxxxx> wrote: > > add subtest verifying BPF ksym iter behaviour. The BPF ksym > iter program shows an example of dumping a format different to > /proc/kallsyms. It adds KIND and MAX_SIZE fields which represent the > kind of symbol (core kernel, module, ftrace, bpf, or kprobe) and > the maximum size the symbol can be. The latter is calculated from > the difference between current symbol value and the next symbol > value. > > The key benefit for this iterator will likely be supporting in-kernel > data-gathering rather than dumping symbol details to userspace and > parsing the results. > > Signed-off-by: Alan Maguire <alan.maguire@xxxxxxxxxx> > Acked-by: Yonghong Song <yhs@xxxxxx> > --- Please see progs/bpf_iter.h and add ksym iterator types there. Thanks! > tools/testing/selftests/bpf/prog_tests/bpf_iter.c | 16 +++++ > tools/testing/selftests/bpf/progs/bpf_iter_ksym.c | 74 +++++++++++++++++++++++ > 2 files changed, 90 insertions(+) > create mode 100644 tools/testing/selftests/bpf/progs/bpf_iter_ksym.c > [...]