Re: [PATCH bpf-next v3] bpf: Change value of MAX_TAIL_CALL_CNT from 32 to 33

From: Daniel Borkmann
Date: Mon Nov 01 2021 - 11:45:02 EST


On 10/29/21 1:53 PM, Tiezhu Yang wrote:
[...]
diff --git a/kernel/bpf/core.c b/kernel/bpf/core.c
index b6c72af..6d10292 100644
--- a/kernel/bpf/core.c
+++ b/kernel/bpf/core.c
@@ -1565,7 +1565,8 @@ static u64 ___bpf_prog_run(u64 *regs, const struct bpf_insn *insn)
if (unlikely(index >= array->map.max_entries))
goto out;
- if (unlikely(tail_call_cnt > MAX_TAIL_CALL_CNT))
+
+ if (unlikely(tail_call_cnt == MAX_TAIL_CALL_CNT))
goto out;

Why making it less robust by going with == rather than >= ?