aboutsummaryrefslogtreecommitdiff
path: root/net/ipv4/tcp_bpf.c
diff options
context:
space:
mode:
authorGravatar Hou Tao <houtao1@huawei.com> 2021-12-31 23:10:18 +0800
committerGravatar Daniel Borkmann <daniel@iogearbox.net> 2022-01-05 20:43:08 +0100
commite4a41c2c1fa916547e63440c73a51a5eb06247af (patch)
tree4ed4f82750c7d3110e15fb8960737bc66ecc0b1a /net/ipv4/tcp_bpf.c
parentbpf/selftests: Fix namespace mount setup in tc_redirect (diff)
downloadlinux-e4a41c2c1fa916547e63440c73a51a5eb06247af.tar.gz
linux-e4a41c2c1fa916547e63440c73a51a5eb06247af.tar.bz2
linux-e4a41c2c1fa916547e63440c73a51a5eb06247af.zip
bpf, arm64: Use emit_addr_mov_i64() for BPF_PSEUDO_FUNC
The following error is reported when running "./test_progs -t for_each" under arm64: bpf_jit: multi-func JIT bug 58 != 56 [...] JIT doesn't support bpf-to-bpf calls The root cause is the size of BPF_PSEUDO_FUNC instruction increases from 2 to 3 after the address of called bpf-function is settled and there are two bpf-to-bpf calls in test_pkt_access. The generated instructions are shown below: 0x48: 21 00 C0 D2 movz x1, #0x1, lsl #32 0x4c: 21 00 80 F2 movk x1, #0x1 0x48: E1 3F C0 92 movn x1, #0x1ff, lsl #32 0x4c: 41 FE A2 F2 movk x1, #0x17f2, lsl #16 0x50: 81 70 9F F2 movk x1, #0xfb84 Fixing it by using emit_addr_mov_i64() for BPF_PSEUDO_FUNC, so the size of jited image will not change. Fixes: 69c087ba6225 ("bpf: Add bpf_for_each_map_elem() helper") Signed-off-by: Hou Tao <houtao1@huawei.com> Signed-off-by: Daniel Borkmann <daniel@iogearbox.net> Link: https://lore.kernel.org/bpf/20211231151018.3781550-1-houtao1@huawei.com
Diffstat (limited to 'net/ipv4/tcp_bpf.c')
0 files changed, 0 insertions, 0 deletions