kernel_optimize_test/arch/s390
Ilya Leoshkevich 91b4db5313 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: 6651ee070b ("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>
2019-08-13 16:07:13 +02:00
..
appldata proc/sysctl: add shared variables for range check 2019-07-18 17:08:07 -07:00
boot s390/boot: add missing declarations and includes 2019-07-29 18:05:02 +02:00
configs s390: update configs 2019-07-29 18:05:02 +02:00
crypto s390/crypto: sha: Use -ENODEV instead of -EOPNOTSUPP 2019-06-15 12:24:48 +02:00
hypfs s390/hypfs: fix a typo in the name of a function 2019-07-23 10:45:32 +02:00
include s390/boot: add missing declarations and includes 2019-07-29 18:05:02 +02:00
kernel s390/kexec: add missing include to machine_kexec_reloc.c 2019-07-29 18:05:03 +02:00
kvm KVM: s390: Use kvm_vcpu_wake_up in kvm_s390_vcpu_wakeup 2019-07-20 09:00:45 +02:00
lib s390/lib: add missing include 2019-07-29 18:05:02 +02:00
mm s390/mm: add fallthrough annotations 2019-07-29 18:05:03 +02:00
net s390/bpf: use 32-bit index for tail calls 2019-08-13 16:07:13 +02:00
numa treewide: add checks for the return value of memblock_alloc*() 2019-03-12 10:04:02 -07:00
oprofile s390/unwind: introduce stack unwind API 2019-05-02 13:54:11 +02:00
pci s390 updates for the 5.3 merge window #2 2019-07-12 15:39:22 -07:00
purgatory s390/purgatory: update .gitignore 2019-06-04 15:03:42 +02:00
scripts s390: make chkbss work with clang 2019-04-11 13:36:52 +02:00
tools s390/disassembler: update opcode table 2019-06-04 15:03:58 +02:00
Kbuild
Kconfig dma-direct: Force unencrypted DMA under SME for certain DMA masks 2019-07-16 22:15:46 +02:00
Kconfig.debug
Makefile Kconfig updates for v5.3 2019-07-12 16:06:27 -07:00