bpf/tests: Add tail call limit test with external function call
authorJohan Almbladh <johan.almbladh@anyfinetworks.com>
Tue, 14 Sep 2021 09:18:42 +0000 (11:18 +0200)
committerDaniel Borkmann <daniel@iogearbox.net>
Tue, 28 Sep 2021 07:26:29 +0000 (09:26 +0200)
commit29eef85be2f60b1027214b4bfc4b1a9d592830a7
treef4d3eef9f2a898a2c35739b21c3f2885055b40f5
parent18935a72eb25525b655262579e1652362a3b29bb
bpf/tests: Add tail call limit test with external function call

This patch adds a tail call limit test where the program also emits
a BPF_CALL to an external function prior to the tail call. Mainly
testing that JITed programs preserve its internal register state, for
example tail call count, across such external calls.

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