]> git.baikalelectronics.ru Git - kernel.git/commit
bpf: Fix off-by-one in tail call count limiting
authorJohan Almbladh <johan.almbladh@anyfinetworks.com>
Wed, 28 Jul 2021 16:47:41 +0000 (18:47 +0200)
committerAndrii Nakryiko <andrii@kernel.org>
Mon, 2 Aug 2021 22:05:43 +0000 (15:05 -0700)
commit90eb5df2c847157349b3360eb40ee8b9b9d6c3ee
tree65723b716120462a8be617eda038846a59045dca
parentde7f743280982913808f50e84571f07e4a1a6611
bpf: Fix off-by-one in tail call count limiting

Before, the interpreter allowed up to MAX_TAIL_CALL_CNT + 1 tail calls.
Now precisely MAX_TAIL_CALL_CNT is allowed, which is in line with the
behavior of the x86 JITs.

Signed-off-by: Johan Almbladh <johan.almbladh@anyfinetworks.com>
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Acked-by: Yonghong Song <yhs@fb.com>
Link: https://lore.kernel.org/bpf/20210728164741.350370-1-johan.almbladh@anyfinetworks.com
kernel/bpf/core.c