linux/arch/s390
Ilya Leoshkevich 7477d43be5 s390/bpf: Fix sign extension in branch_ku
Both signed and unsigned variants of BPF_JMP | BPF_K require
sign-extending the immediate. JIT emits cgfi for the signed case,
which is correct, and clgfi for the unsigned case, which is not
correct: clgfi zero-extends the immediate.

s390 does not provide an instruction that does sign-extension and
unsigned comparison at the same time. Therefore, fix by first loading
the sign-extended immediate into work register REG_1 and proceeding
as if it's BPF_X.

Fixes: 4e9b4a6883 ("s390/bpf: Use relative long branches")
Reported-by: Seth Forshee <seth.forshee@canonical.com>
Signed-off-by: Ilya Leoshkevich <iii@linux.ibm.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Tested-by: Seth Forshee <seth.forshee@canonical.com>
Link: https://lore.kernel.org/bpf/20200717165326.6786-3-iii@linux.ibm.com
2020-07-21 13:26:24 -07:00
..
appldata s390 updates for the 5.8 merge window 2020-06-08 12:05:31 -07:00
boot mm: reorder includes after introduction of linux/pgtable.h 2020-06-09 09:39:13 -07:00
configs s390: update defconfigs 2020-07-01 20:02:38 +02:00
crypto s390/crypto: use scnprintf() instead of snprintf() 2020-06-16 13:44:05 +02:00
hypfs fs_parse: fold fs_parameter_desc/fs_parameter_spec 2020-02-07 14:48:37 -05:00
include Bugfixes and a one-liner patch to silence sparse. 2020-07-06 12:48:04 -07:00
kernel s390/cpum_sf: prohibit callchain data collection 2020-07-01 20:02:33 +02:00
kvm Kbuild updates for v5.8 (2nd) 2020-06-13 13:29:16 -07:00
lib s390 updates for the 5.8 merge window 2020-06-08 12:05:31 -07:00
mm - Update email addresses in MAINTAINERS file and add .mailmap entries 2020-07-10 08:39:33 -07:00
net s390/bpf: Fix sign extension in branch_ku 2020-07-21 13:26:24 -07:00
numa s390/mm: remove fake numa support 2020-02-27 16:02:21 +01:00
oprofile s390/unwind: introduce stack unwind API 2019-05-02 13:54:11 +02:00
pci s390/pci: fix enabling a reserved PCI function 2020-06-29 16:26:28 +02:00
purgatory .gitignore: add SPDX License Identifier 2020-03-25 11:50:48 +01:00
scripts s390/build: use size command to perform empty .bss check 2019-08-08 14:36:53 +02:00
tools .gitignore: add SPDX License Identifier 2020-03-25 11:50:48 +01:00
Kbuild
Kconfig s390/numa: let NODES_SHIFT depend on NEED_MULTIPLE_NODES 2020-06-16 13:44:05 +02:00
Kconfig.debug treewide: replace '---help---' in Kconfig files with 'help' 2020-06-14 01:57:21 +09:00
Makefile s390: make 'install' not depend on vmlinux 2020-02-17 18:01:58 +01:00