summaryrefslogtreecommitdiffstats
path: root/tools/lib/bpf/usdt.c
diff options
context:
space:
mode:
authorIlya Leoshkevich <iii@linux.ibm.com>2022-04-07 23:44:10 +0200
committerAndrii Nakryiko <andrii@kernel.org>2022-04-07 20:59:10 -0700
commit6f403d9d530635f533577d37929c61474d6c5d7f (patch)
tree5fbfede8553008d503ceb38367cbf286ff453318 /tools/lib/bpf/usdt.c
parente1b6df598aa86e351437135c76ed38c9a5e3d397 (diff)
downloadlinux-6f403d9d530635f533577d37929c61474d6c5d7f.tar.bz2
libbpf: Make BPF-side of USDT support work on big-endian machines
BPF_USDT_ARG_REG_DEREF handling always reads 8 bytes, regardless of the actual argument size. On little-endian the relevant argument bits end up in the lower bits of val, and later on the code that handles all the argument types expects them to be there. On big-endian they end up in the upper bits of val, breaking that expectation. Fix by right-shifting val on big-endian. Signed-off-by: Ilya Leoshkevich <iii@linux.ibm.com> Signed-off-by: Andrii Nakryiko <andrii@kernel.org> Link: https://lore.kernel.org/bpf/20220407214411.257260-3-iii@linux.ibm.com
Diffstat (limited to 'tools/lib/bpf/usdt.c')
0 files changed, 0 insertions, 0 deletions