]> git.ipfire.org Git - thirdparty/linux.git/commit - lib/test_bpf.c
bpf, tests: Add branch conversion JIT test
authorJohan Almbladh <johan.almbladh@anyfinetworks.com>
Mon, 9 Aug 2021 09:18:25 +0000 (11:18 +0200)
committerDaniel Borkmann <daniel@iogearbox.net>
Tue, 10 Aug 2021 09:33:22 +0000 (11:33 +0200)
commit66e5eb8474554bc021e8a221c336bdaef13f7a69
tree11ae3f1b6a610b75377e923cbfb6a0f5826f4352
parente5009b4636cb593c06243197fd0742ed2e6ac510
bpf, tests: Add branch conversion JIT test

Some JITs may need to convert a conditional jump instruction to
to short PC-relative branch and a long unconditional jump, if the
PC-relative offset exceeds offset field width in the CPU instruction.
This test triggers such branch conversion on the 32-bit MIPS JIT.

Signed-off-by: Johan Almbladh <johan.almbladh@anyfinetworks.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Link: https://lore.kernel.org/bpf/20210809091829.810076-11-johan.almbladh@anyfinetworks.com
lib/test_bpf.c