summaryrefslogtreecommitdiffstats
path: root/tools/testing/selftests/bpf/test_sock.c
diff options
context:
space:
mode:
authorIlya Leoshkevich <iii@linux.ibm.com>2019-08-12 18:18:07 +0200
committerDaniel Borkmann <daniel@iogearbox.net>2019-08-13 16:07:13 +0200
commit91b4db5313a2c793aabc2143efb8ed0cf0fdd097 (patch)
tree2755a796763324928a570c322302fd15b3f17a30 /tools/testing/selftests/bpf/test_sock.c
parents390/bpf: fix lcgr instruction encoding (diff)
downloadlinux-91b4db5313a2c793aabc2143efb8ed0cf0fdd097.tar.xz
linux-91b4db5313a2c793aabc2143efb8ed0cf0fdd097.zip
s390/bpf: use 32-bit index for tail calls
"p runtime/jit: pass > 32bit index to tail_call" fails when bpf_jit_enable=1, because the tail call is not executed. This in turn is because the generated code assumes index is 64-bit, while it must be 32-bit, and as a result prog array bounds check fails, while it should pass. Even if bounds check would have passed, the code that follows uses 64-bit index to compute prog array offset. Fix by using clrj instead of clgrj for comparing index with array size, and also by using llgfr for truncating index to 32 bits before using it to compute prog array offset. Fixes: 6651ee070b31 ("s390/bpf: implement bpf_tail_call() helper") Reported-by: Yauheni Kaliuta <yauheni.kaliuta@redhat.com> Acked-by: Vasily Gorbik <gor@linux.ibm.com> Signed-off-by: Ilya Leoshkevich <iii@linux.ibm.com> Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Diffstat (limited to 'tools/testing/selftests/bpf/test_sock.c')
0 files changed, 0 insertions, 0 deletions