Commit e1ddaa5d authored by Johan Almbladh's avatar Johan Almbladh Committed by Greg Kroah-Hartman
Browse files

bpf/tests: Fix error in tail call limit tests



[ Upstream commit 18935a72 ]

This patch fixes an error in the tail call limit test that caused the
test to fail on for x86-64 JIT. Previously, the register R0 was used to
report the total number of tail calls made. However, after a tail call
fall-through, the value of the R0 register is undefined. Now, all tail
call error path tests instead use context state to store the count.

Fixes: 874be05f ("bpf, tests: Add tail call test suite")
Reported-by: default avatarPaul Chaignon <paul@cilium.io>
Reported-by: default avatarTiezhu Yang <yangtiezhu@loongson.cn>
Signed-off-by: default avatarJohan Almbladh <johan.almbladh@anyfinetworks.com>
Signed-off-by: default avatarDaniel Borkmann <daniel@iogearbox.net>
Tested-by: default avatarTiezhu Yang <yangtiezhu@loongson.cn>
Link: https://lore.kernel.org/bpf/20210914091842.4186267-14-johan.almbladh@anyfinetworks.com


Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent 739b9276
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment