]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
selftests/bpf: Test tail call counting with bpf2bpf and data on stack
authorJakub Sitnicki <jakub@cloudflare.com>
Thu, 16 Jun 2022 16:20:37 +0000 (18:20 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 20 Nov 2023 10:08:14 +0000 (11:08 +0100)
commit3eefb2fbf4ec1c1ff239b8b65e6e78aae335e4a6
tree556c41b7838db728b5e61f70a9e7569ad61ea9af
parentab91992ec4d4e65f3fa366e4b563bec4a2006df9
selftests/bpf: Test tail call counting with bpf2bpf and data on stack

[ Upstream commit 5e0b0a4c52d30bb09659446f40b77a692361600d ]

Cover the case when tail call count needs to be passed from BPF function to
BPF function, and the caller has data on stack. Specifically when the size
of data allocated on BPF stack is not a multiple on 8.

Signed-off-by: Jakub Sitnicki <jakub@cloudflare.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Link: https://lore.kernel.org/bpf/20220616162037.535469-3-jakub@cloudflare.com
Stable-dep-of: 96daa9874211 ("selftests/bpf: Correct map_fd to data_fd in tailcalls")
Signed-off-by: Sasha Levin <sashal@kernel.org>
tools/testing/selftests/bpf/prog_tests/tailcalls.c
tools/testing/selftests/bpf/progs/tailcall_bpf2bpf6.c [new file with mode: 0644]