linux-brain/tools/bpf
Martin KaFai Lau 0d6f9d8f31 bpftool: Fix printing incorrect pointer in btf_dump_ptr
commit 555089fdfc37ad65e0ee9b42ca40c238ff546f83 upstream.

For plain text output, it incorrectly prints the pointer value
"void *data".  The "void *data" is actually pointing to memory that
contains a bpf-map's value.  The intention is to print the content of
the bpf-map's value instead of printing the pointer pointing to the
bpf-map's value.

In this case, a member of the bpf-map's value is a pointer type.
Thus, it should print the "*(void **)data".

Fixes: 22c349e8db ("tools: bpftool: fix format strings and arguments for jsonw_printf()")
Signed-off-by: Martin KaFai Lau <kafai@fb.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Reviewed-by: Quentin Monnet <quentin.monnet@netronome.com>
Link: https://lore.kernel.org/bpf/20200110231644.3484151-1-kafai@fb.com
Cc: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-04-29 16:31:07 +02:00
..
bpftool bpftool: Fix printing incorrect pointer in btf_dump_ptr 2020-04-29 16:31:07 +02:00
.gitignore tools/bpftool: ignore build products 2018-07-26 02:50:26 +02:00
bpf_asm.c tools: rename tools/net directory to tools/bpf 2017-10-04 21:45:05 -07:00
bpf_dbg.c bpf: fix uninitialized variable in bpf tools 2018-04-26 22:23:02 +02:00
bpf_exp.l bpf: fix cbpf parser bug for octal numbers 2018-06-03 07:46:55 -07:00
bpf_exp.y tools: rename tools/net directory to tools/bpf 2017-10-04 21:45:05 -07:00
bpf_jit_disasm.c tools/bpf_jit_disasm: silence a static checker warning 2018-01-18 22:15:37 +01:00
Makefile bpf: fix for lex/yacc build error with gcc-5 2018-04-25 23:27:46 +02:00
Makefile.helpers tools: bpf: build and install man page for eBPF helpers from bpftool/ 2018-07-12 18:55:53 +02:00