summaryrefslogtreecommitdiff
path: root/samples
diff options
context:
space:
mode:
authorColin Ian King <colin.king@canonical.com>2021-07-15 15:57:12 +0300
committerDaniel Borkmann <daniel@iogearbox.net>2021-07-15 20:47:25 +0300
commit91091656252f5d6d8c476e0c92776ce9fae7b445 (patch)
tree506be8ffce01992886cde96740c4792f6a4679c7 /samples
parent5acc7d3e8d342858405fbbc671221f676b547ce7 (diff)
downloadlinux-91091656252f5d6d8c476e0c92776ce9fae7b445.tar.xz
s390/bpf: Perform r1 range checking before accessing jit->seen_reg[r1]
Currently array jit->seen_reg[r1] is being accessed before the range checking of index r1. The range changing on r1 should be performed first since it will avoid any potential out-of-range accesses on the array seen_reg[] and also it is more optimal to perform checks on r1 before fetching data from the array. Fix this by swapping the order of the checks before the array access. Fixes: 054623105728 ("s390/bpf: Add s390x eBPF JIT compiler backend") Signed-off-by: Colin Ian King <colin.king@canonical.com> Signed-off-by: Daniel Borkmann <daniel@iogearbox.net> Tested-by: Ilya Leoshkevich <iii@linux.ibm.com> Acked-by: Ilya Leoshkevich <iii@linux.ibm.com> Link: https://lore.kernel.org/bpf/20210715125712.24690-1-colin.king@canonical.com
Diffstat (limited to 'samples')
0 files changed, 0 insertions, 0 deletions