]> git.baikalelectronics.ru Git - kernel.git/commit
bpf, tests: Add load store test case for tail call
authorXu Kuohai <xukuohai@huawei.com>
Mon, 21 Mar 2022 15:28:52 +0000 (11:28 -0400)
committerDaniel Borkmann <daniel@iogearbox.net>
Thu, 31 Mar 2022 22:27:52 +0000 (00:27 +0200)
commit8893797958e2d9b1aa302bbde2b0cd64baa81cc3
tree1e542b27950443772b7134876a5251022498480f
parent2759ba3b3fb48c8633a4c1c43037c6e8ea2bfa70
bpf, tests: Add load store test case for tail call

Add test case to enusre that the caller and callee's fp offsets are
correct during tail call (mainly asserting for arm64 JIT).

Tested on both big-endian and little-endian arm64 qemu, result:

 test_bpf: Summary: 1026 PASSED, 0 FAILED, [1014/1014 JIT'ed]
 test_bpf: test_tail_calls: Summary: 10 PASSED, 0 FAILED, [10/10 JIT'ed]
 test_bpf: test_skb_segment: Summary: 2 PASSED, 0 FAILED

Signed-off-by: Xu Kuohai <xukuohai@huawei.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Link: https://lore.kernel.org/bpf/20220321152852.2334294-6-xukuohai@huawei.com
lib/test_bpf.c