lkml.org 
[lkml]   [2022]   [Jul]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH v2 bpf-next 2/2] selftests/bpf: add a ksym iter subtest
From


On 7/1/22 2:27 AM, Alan Maguire 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@oracle.com>

LGTM. Thanks!

Acked-by: Yonghong Song <yhs@fb.com>

> ---
> tools/testing/selftests/bpf/prog_tests/bpf_iter.c | 16 +++++
> tools/testing/selftests/bpf/progs/bpf_iter_ksym.c | 71 +++++++++++++++++++++++
> 2 files changed, 87 insertions(+)
> create mode 100644 tools/testing/selftests/bpf/progs/bpf_iter_ksym.c
>
> diff --git a/tools/testing/selftests/bpf/prog_tests/bpf_iter.c b/tools/testing/selftests/bpf/prog_tests/bpf_iter.c
> index 7ff5fa9..a33874b 100644
> --- a/tools/testing/selftests/bpf/prog_tests/bpf_iter.c
> +++ b/tools/testing/selftests/bpf/prog_tests/bpf_iter.c
> @@ -27,6 +27,7 @@
> #include "bpf_iter_test_kern5.skel.h"
> #include "bpf_iter_test_kern6.skel.h"
> #include "bpf_iter_bpf_link.skel.h"
> +#include "bpf_iter_ksym.skel.h"
>
[...]

\
 
 \ /
  Last update: 2022-07-02 08:17    [W:0.072 / U:0.776 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site