linux-stable/tools
Jakub Sitnicki ce52368001 selftests/bpf: Fix test for 4-byte load from remote_port on big-endian
The context access converter rewrites the 4-byte load from
bpf_sk_lookup->remote_port to a 2-byte load from bpf_sk_lookup_kern
structure.

It means that we cannot treat the destination register contents as a 32-bit
value, or the code will not be portable across big- and little-endian
architectures.

This is exactly the same case as with 4-byte loads from bpf_sock->dst_port
so follow the approach outlined in [1] and treat the register contents as a
16-bit value in the test.

[1]: https://lore.kernel.org/bpf/20220317113920.1068535-5-jakub@cloudflare.com/

Fixes: 2ed0dc5937 ("selftests/bpf: Cover 4-byte load from remote_port in bpf_sk_lookup")
Signed-off-by: Jakub Sitnicki <jakub@cloudflare.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Acked-by: Martin KaFai Lau <kafai@fb.com>
Link: https://lore.kernel.org/bpf/20220319183356.233666-4-jakub@cloudflare.com
2022-03-20 18:59:00 -07:00
..
accounting delayacct: track delays from memory compact 2022-01-20 08:52:55 +02:00
arch tools arch x86: Sync the msr-index.h copy with the kernel sources 2022-02-22 17:43:05 -03:00
bootconfig
bpf bpftool: Add BPF_TRACE_KPROBE_MULTI to attach type names table 2022-03-18 17:56:00 +01:00
build Merge remote-tracking branch 'torvalds/master' into perf/core 2022-01-13 10:20:59 -03:00
cgroup tools/cgroup/slabinfo: update to work with struct slab 2022-02-21 11:34:49 +01:00
counter
debugging
edid
firewire
firmware
gpio
hv
iio iio: event_monitor: Flush output on event 2021-12-16 12:20:35 +00:00
include bpf: Add cookie support to programs attached with kprobe multi link 2022-03-17 20:17:19 -07:00
io_uring
kvm/kvm_stat
laptop
leds
lib libbpf: Avoid NULL deref when initializing map BTF info 2022-03-20 18:53:04 -07:00
memory-model tools/memory-model: litmus: Add two tests for unlock(A)+lock(B) ordering 2021-11-30 17:47:08 -08:00
objtool objtool: Fix truncated string warning 2022-01-24 10:09:06 -08:00
pci
pcmcia
perf Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2022-03-03 11:55:12 -08:00
power More ACPI updates for 5.17-rc1 2022-01-18 08:51:51 +02:00
rcu
scripts tools: Fix unavoidable GCC call in Clang builds 2022-03-08 23:36:37 +01:00
spi
testing selftests/bpf: Fix test for 4-byte load from remote_port on big-endian 2022-03-20 18:59:00 -07:00
thermal/tmon thermal: tools: tmon: remove unneeded local variable 2021-11-24 17:26:13 +01:00
time
tracing rtla/osnoise: Fix error message when failing to enable trace instance 2022-02-25 21:05:30 -05:00
usb
virtio
vm
wmi
Makefile