]> git.baikalelectronics.ru Git - kernel.git/commit
s390/bpf: Use relative long branches
authorIlya Leoshkevich <iii@linux.ibm.com>
Mon, 18 Nov 2019 18:03:35 +0000 (19:03 +0100)
committerAlexei Starovoitov <ast@kernel.org>
Tue, 19 Nov 2019 03:51:16 +0000 (19:51 -0800)
commit1a1adbc6981e5bffd9366260f7e84832af522636
treea84b391c76e15be3a752b9fcde7b55fc4e1cd651
parent75ae514df0dfbb0409222a6a4159837a073fe448
s390/bpf: Use relative long branches

Currently maximum JITed code size is limited to 64k, because JIT can
emit only relative short branches, whose range is limited by 64k in both
directions.

Teach JIT to use relative long branches. There are no compare+branch
relative long instructions, so using relative long branches consumes
more space due to having to having to emit an explicit comparison
instruction. Therefore do this only when relative short branch is not
enough.

Signed-off-by: Ilya Leoshkevich <iii@linux.ibm.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Link: https://lore.kernel.org/bpf/20191118180340.68373-2-iii@linux.ibm.com
arch/s390/net/bpf_jit_comp.c