Commit e73b2439 authored by Ilya Leoshkevich's avatar Ilya Leoshkevich Committed by Zheng Zengkai
Browse files

s390/bpf: Fix branch shortening during codegen pass

stable inclusion
from stable-5.10.68
commit ab7cf225016159bc2c3590be6fa12965565d903b
bugzilla: 182671 https://gitee.com/openeuler/kernel/issues/I4EWUH

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=ab7cf225016159bc2c3590be6fa12965565d903b



--------------------------------

commit 1511df6f upstream.

EMIT6_PCREL() macro assumes that the previous pass generated 6 bytes
of code, which is not the case if branch shortening took place. Fix by
using jit->prg, like all the other EMIT6_PCREL_*() macros.

Reported-by: default avatarJohan Almbladh <johan.almbladh@anyfinetworks.com>
Fixes: 4e9b4a68 ("s390/bpf: Use relative long branches")
Signed-off-by: default avatarIlya Leoshkevich <iii@linux.ibm.com>
Signed-off-by: default avatarVasily Gorbik <gor@linux.ibm.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: default avatarChen Jun <chenjun102@huawei.com>
Acked-by: default avatarWeilong Chen <chenweilong@huawei.com>

Signed-off-by: default avatarChen Jun <chenjun102@huawei.com>
Signed-off-by: default avatarZheng Zengkai <zhengzengkai@huawei.com>
parent 9b63869a
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment