From: Quentin Monnet <quentin.monnet@netronome.com>
To: Martin KaFai Lau <kafai@fb.com>, bpf@vger.kernel.org
Cc: Alexei Starovoitov <ast@kernel.org>,
Daniel Borkmann <daniel@iogearbox.net>,
David Miller <davem@davemloft.net>,
kernel-team@fb.com, netdev@vger.kernel.org
Subject: Re: [PATCH bpf] bpftool: Fix printing incorrect pointer in btf_dump_ptr
Date: Sat, 11 Jan 2020 20:07:52 +0000 [thread overview]
Message-ID: <2e5a0dfc-6b22-4a5f-d305-da920c9a44c7@netronome.com> (raw)
In-Reply-To: <20200110231644.3484151-1-kafai@fb.com>
2020-01-10 15:16 UTC-0800 ~ Martin KaFai Lau <kafai@fb.com>
> 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: 22c349e8db89 ("tools: bpftool: fix format strings and arguments for jsonw_printf()")
> Cc: Quentin Monnet <quentin.monnet@netronome.com>
> Signed-off-by: Martin KaFai Lau <kafai@fb.com>
My bad, thank you for the fix!
Reviewed-by: Quentin Monnet <quentin.monnet@netronome.com>
next prev parent reply other threads:[~2020-01-11 20:07 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-01-10 23:16 [PATCH bpf] bpftool: Fix printing incorrect pointer in btf_dump_ptr Martin KaFai Lau
2020-01-11 20:07 ` Quentin Monnet [this message]
2020-01-12 3:09 ` Alexei Starovoitov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=2e5a0dfc-6b22-4a5f-d305-da920c9a44c7@netronome.com \
--to=quentin.monnet@netronome.com \
--cc=ast@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=daniel@iogearbox.net \
--cc=davem@davemloft.net \
--cc=kafai@fb.com \
--cc=kernel-team@fb.com \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.