android_kernel_oneplus_msm8998/arch/s390
Ilya Leoshkevich a8c60149c0 s390/bpf: use 32-bit index for tail calls
[ Upstream commit 91b4db5313a2c793aabc2143efb8ed0cf0fdd097 ]

"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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2019-09-21 07:12:49 +02:00
..
appldata
boot s390/decompressor: fix initrd corruption caused by bss clear 2017-04-12 12:38:34 +02:00
configs s390/defconfig: set SCSI_DH=y 2015-10-01 10:48:36 +02:00
crypto s390/crypto: unlock on error in prng_tdes_read() 2017-01-12 11:22:49 +01:00
hypfs hypfs_kill_super(): deal with failed allocations 2018-04-24 09:32:11 +02:00
include s390: fix stfle zero padding 2019-07-21 09:07:15 +02:00
kernel s390/smp: Fix calling smp_call_ipl_cpu() from ipl CPU 2019-02-06 19:43:05 +01:00
kvm KVM: s390: Do not leak kernel stack data in the KVM_S390_INTERRUPT ioctl 2019-09-21 07:12:43 +02:00
lib s390/lib: use expoline for all bcr instructions 2018-09-15 09:40:42 +02:00
mm mm: replace get_user_pages_unlocked() write/force parameters with gup_flags 2018-12-17 21:55:16 +01:00
net s390/bpf: use 32-bit index for tail calls 2019-09-21 07:12:49 +02:00
numa s390/mm: Fix ERROR: "__node_distance" undefined! 2018-11-27 16:08:01 +01:00
oprofile s390/oprofile: fix compile error 2015-07-01 09:34:39 +02:00
pci s390/pci: fix out of bounds access during irq setup 2018-09-05 09:18:40 +02:00
defconfig s390: new default configuration 2015-06-25 09:39:25 +02:00
Kbuild s390/numa: add core infrastructure 2015-08-03 18:40:25 +02:00
Kconfig s390: add sysfs attributes for spectre 2018-04-29 07:50:04 +02:00
Kconfig.debug
Makefile s390: add automatic detection of the spectre defense 2018-04-29 07:50:04 +02:00