diff options
author | Yonghong Song | 2019-01-10 20:14:02 +0100 |
---|---|---|
committer | Daniel Borkmann | 2019-01-11 10:40:54 +0100 |
commit | 298e59d322954e89ed2a556c601a04a4c007d1b3 (patch) | |
tree | 8702529ada7e857caa223af4c4523d5c2e58cb59 /tools/thermal/tmon/pid.c | |
parent | tools/bpf: test btf bitfield with >=256 struct member offset (diff) | |
download | kernel-qcow2-linux-298e59d322954e89ed2a556c601a04a4c007d1b3.tar.gz kernel-qcow2-linux-298e59d322954e89ed2a556c601a04a4c007d1b3.tar.xz kernel-qcow2-linux-298e59d322954e89ed2a556c601a04a4c007d1b3.zip |
tools/bpf: fix bpftool map dump with bitfields
Commit 8772c8bc093b ("tools: bpftool: support pretty print
with kind_flag set") added bpftool map dump with kind_flag
support. When bitfield_size can be retrieved directly from
btf_member, function btf_dumper_bitfield() is called to
dump the bitfield. The implementation passed the
wrong parameter "bit_offset" to the function. The excepted
value is the bit_offset within a byte while the passed-in
value is the struct member offset.
This commit fixed the bug with passing correct "bit_offset"
with adjusted data pointer.
Fixes: 8772c8bc093b ("tools: bpftool: support pretty print with kind_flag set")
Acked-by: Martin KaFai Lau <kafai@fb.com>
Signed-off-by: Yonghong Song <yhs@fb.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Diffstat (limited to 'tools/thermal/tmon/pid.c')
0 files changed, 0 insertions, 0 deletions