diff options
author | Okash Khawaja <osk@fb.com> | 2018-07-10 14:33:07 -0700 |
---|---|---|
committer | Daniel Borkmann <daniel@iogearbox.net> | 2018-07-11 22:36:08 +0200 |
commit | b65f370d0671c4980ffe866c41e327b88893245c (patch) | |
tree | 6f2c9bc4ce56c7d0f63b7754d5cb34bb3960b4a4 /block/Kconfig.iosched | |
parent | 61d769807f273fda962866f3d4c677cda9974d3c (diff) |
bpf: btf: Fix bitfield extraction for big endian
When extracting bitfield from a number, btf_int_bits_seq_show() builds
a mask and accesses least significant byte of the number in a way
specific to little-endian. This patch fixes that by checking endianness
of the machine and then shifting left and right the unneeded bits.
Thanks to Martin Lau for the help in navigating potential pitfalls when
dealing with endianess and for the final solution.
Fixes: b00b8daec828 ("bpf: btf: Add pretty print capability for data with BTF type info")
Signed-off-by: Okash Khawaja <osk@fb.com>
Acked-by: Martin KaFai Lau <kafai@fb.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Diffstat (limited to 'block/Kconfig.iosched')
0 files changed, 0 insertions, 0 deletions