From: Sasha Levin <sashal@kernel•org>
To: linux-kernel@vger•kernel.org, stable@vger•kernel.org
Cc: "Tiezhu Yang" <yangtiezhu@loongson•cn>,
"Daniel Borkmann" <daniel@iogearbox•net>,
"Johan Almbladh" <johan.almbladh@anyfinetworks•com>,
"Ilya Leoshkevich" <iii@linux•ibm.com>,
"Björn Töpel" <bjorn@kernel•org>,
"Sasha Levin" <sashal@kernel•org>,
illusionist.neo@gmail•com, linux@armlinux•org.uk, ast@kernel•org,
andrii@kernel•org, zlim.lnx@gmail•com, catalin.marinas@arm•com,
will@kernel•org, paulburton@kernel•org,
tsbogend@alpha•franken.de, naveen.n.rao@linux•ibm.com,
mpe@ellerman•id.au, luke.r.nels@gmail•com, xi.wang@gmail•com,
paul.walmsley@sifive•com, palmer@dabbelt•com,
aou@eecs•berkeley.edu, hca@linux•ibm.com, gor@linux•ibm.com,
borntraeger@linux•ibm.com, davem@davemloft•net,
yoshfuji@linux-ipv6•org, dsahern@kernel•org, tglx@linutronix•de,
mingo@redhat•com, bp@alien8•de, dave.hansen@linux•intel.com,
x86@kernel•org, udknight@gmail•com, yhs@fb•com,
john.fastabend@gmail•com, davemarchevsky@fb•com,
joannekoong@fb•com, liuhangbin@gmail•com, revest@chromium•org,
joe@cilium•io, brouer@redhat•com, netdev@vger•kernel.org,
bpf@vger•kernel.org, linux-arm-kernel@lists•infradead.org,
linux-mips@vger•kernel.org, linuxppc-dev@lists•ozlabs.org,
linux-riscv@lists•infradead.org, linux-s390@vger•kernel.org,
sparclinux@vger•kernel.org
Subject: [PATCH AUTOSEL 5.16 026/217] bpf: Change value of MAX_TAIL_CALL_CNT from 32 to 33
Date: Mon, 17 Jan 2022 21:16:29 -0500 [thread overview]
Message-ID: <20220118021940.1942199-26-sashal@kernel.org> (raw)
In-Reply-To: <20220118021940.1942199-1-sashal@kernel.org>
From: Tiezhu Yang <yangtiezhu@loongson•cn>
[ Upstream commit ebf7f6f0a6cdcc17a3da52b81e4b3a98c4005028 ]
In the current code, the actual max tail call count is 33 which is greater
than MAX_TAIL_CALL_CNT (defined as 32). The actual limit is not consistent
with the meaning of MAX_TAIL_CALL_CNT and thus confusing at first glance.
We can see the historical evolution from commit 04fd61ab36ec ("bpf: allow
bpf programs to tail-call other bpf programs") and commit f9dabe016b63
("bpf: Undo off-by-one in interpreter tail call count limit"). In order
to avoid changing existing behavior, the actual limit is 33 now, this is
reasonable.
After commit 874be05f525e ("bpf, tests: Add tail call test suite"), we can
see there exists failed testcase.
On all archs when CONFIG_BPF_JIT_ALWAYS_ON is not set:
# echo 0 > /proc/sys/net/core/bpf_jit_enable
# modprobe test_bpf
# dmesg | grep -w FAIL
Tail call error path, max count reached jited:0 ret 34 != 33 FAIL
On some archs:
# echo 1 > /proc/sys/net/core/bpf_jit_enable
# modprobe test_bpf
# dmesg | grep -w FAIL
Tail call error path, max count reached jited:1 ret 34 != 33 FAIL
Although the above failed testcase has been fixed in commit 18935a72eb25
("bpf/tests: Fix error in tail call limit tests"), it would still be good
to change the value of MAX_TAIL_CALL_CNT from 32 to 33 to make the code
more readable.
The 32-bit x86 JIT was using a limit of 32, just fix the wrong comments and
limit to 33 tail calls as the constant MAX_TAIL_CALL_CNT updated. For the
mips64 JIT, use "ori" instead of "addiu" as suggested by Johan Almbladh.
For the riscv JIT, use RV_REG_TCC directly to save one register move as
suggested by Björn Töpel. For the other implementations, no function changes,
it does not change the current limit 33, the new value of MAX_TAIL_CALL_CNT
can reflect the actual max tail call count, the related tail call testcases
in test_bpf module and selftests can work well for the interpreter and the
JIT.
Here are the test results on x86_64:
# uname -m
x86_64
# echo 0 > /proc/sys/net/core/bpf_jit_enable
# modprobe test_bpf test_suite=test_tail_calls
# dmesg | tail -1
test_bpf: test_tail_calls: Summary: 8 PASSED, 0 FAILED, [0/8 JIT'ed]
# rmmod test_bpf
# echo 1 > /proc/sys/net/core/bpf_jit_enable
# modprobe test_bpf test_suite=test_tail_calls
# dmesg | tail -1
test_bpf: test_tail_calls: Summary: 8 PASSED, 0 FAILED, [8/8 JIT'ed]
# rmmod test_bpf
# ./test_progs -t tailcalls
#142 tailcalls:OK
Summary: 1/11 PASSED, 0 SKIPPED, 0 FAILED
Signed-off-by: Tiezhu Yang <yangtiezhu@loongson•cn>
Signed-off-by: Daniel Borkmann <daniel@iogearbox•net>
Tested-by: Johan Almbladh <johan.almbladh@anyfinetworks•com>
Tested-by: Ilya Leoshkevich <iii@linux•ibm.com>
Acked-by: Björn Töpel <bjorn@kernel•org>
Acked-by: Johan Almbladh <johan.almbladh@anyfinetworks•com>
Acked-by: Ilya Leoshkevich <iii@linux•ibm.com>
Link: https://lore.kernel.org/bpf/1636075800-3264-1-git-send-email-yangtiezhu@loongson.cn
Signed-off-by: Sasha Levin <sashal@kernel•org>
---
arch/arm/net/bpf_jit_32.c | 5 +++--
arch/arm64/net/bpf_jit_comp.c | 5 +++--
arch/mips/net/bpf_jit_comp32.c | 3 +--
arch/mips/net/bpf_jit_comp64.c | 2 +-
arch/powerpc/net/bpf_jit_comp32.c | 4 ++--
arch/powerpc/net/bpf_jit_comp64.c | 4 ++--
arch/riscv/net/bpf_jit_comp32.c | 6 ++----
arch/riscv/net/bpf_jit_comp64.c | 7 +++----
arch/s390/net/bpf_jit_comp.c | 6 +++---
arch/sparc/net/bpf_jit_comp_64.c | 2 +-
arch/x86/net/bpf_jit_comp.c | 10 +++++-----
arch/x86/net/bpf_jit_comp32.c | 4 ++--
include/linux/bpf.h | 2 +-
include/uapi/linux/bpf.h | 2 +-
kernel/bpf/core.c | 3 ++-
lib/test_bpf.c | 4 ++--
tools/include/uapi/linux/bpf.h | 2 +-
17 files changed, 35 insertions(+), 36 deletions(-)
diff --git a/arch/arm/net/bpf_jit_32.c b/arch/arm/net/bpf_jit_32.c
index eeb6dc0ecf463..e59b41e9ab0c1 100644
--- a/arch/arm/net/bpf_jit_32.c
+++ b/arch/arm/net/bpf_jit_32.c
@@ -1199,7 +1199,8 @@ static int emit_bpf_tail_call(struct jit_ctx *ctx)
/* tmp2[0] = array, tmp2[1] = index */
- /* if (tail_call_cnt > MAX_TAIL_CALL_CNT)
+ /*
+ * if (tail_call_cnt >= MAX_TAIL_CALL_CNT)
* goto out;
* tail_call_cnt++;
*/
@@ -1208,7 +1209,7 @@ static int emit_bpf_tail_call(struct jit_ctx *ctx)
tc = arm_bpf_get_reg64(tcc, tmp, ctx);
emit(ARM_CMP_I(tc[0], hi), ctx);
_emit(ARM_COND_EQ, ARM_CMP_I(tc[1], lo), ctx);
- _emit(ARM_COND_HI, ARM_B(jmp_offset), ctx);
+ _emit(ARM_COND_CS, ARM_B(jmp_offset), ctx);
emit(ARM_ADDS_I(tc[1], tc[1], 1), ctx);
emit(ARM_ADC_I(tc[0], tc[0], 0), ctx);
arm_bpf_put_reg64(tcc, tmp, ctx);
diff --git a/arch/arm64/net/bpf_jit_comp.c b/arch/arm64/net/bpf_jit_comp.c
index 3a8a7140a9bfb..356fb2116c6b2 100644
--- a/arch/arm64/net/bpf_jit_comp.c
+++ b/arch/arm64/net/bpf_jit_comp.c
@@ -287,13 +287,14 @@ static int emit_bpf_tail_call(struct jit_ctx *ctx)
emit(A64_CMP(0, r3, tmp), ctx);
emit(A64_B_(A64_COND_CS, jmp_offset), ctx);
- /* if (tail_call_cnt > MAX_TAIL_CALL_CNT)
+ /*
+ * if (tail_call_cnt >= MAX_TAIL_CALL_CNT)
* goto out;
* tail_call_cnt++;
*/
emit_a64_mov_i64(tmp, MAX_TAIL_CALL_CNT, ctx);
emit(A64_CMP(1, tcc, tmp), ctx);
- emit(A64_B_(A64_COND_HI, jmp_offset), ctx);
+ emit(A64_B_(A64_COND_CS, jmp_offset), ctx);
emit(A64_ADD_I(1, tcc, tcc, 1), ctx);
/* prog = array->ptrs[index];
diff --git a/arch/mips/net/bpf_jit_comp32.c b/arch/mips/net/bpf_jit_comp32.c
index bd996ede12f8e..044b11b65bcac 100644
--- a/arch/mips/net/bpf_jit_comp32.c
+++ b/arch/mips/net/bpf_jit_comp32.c
@@ -1381,8 +1381,7 @@ void build_prologue(struct jit_context *ctx)
* 16-byte area in the parent's stack frame. On a tail call, the
* calling function jumps into the prologue after these instructions.
*/
- emit(ctx, ori, MIPS_R_T9, MIPS_R_ZERO,
- min(MAX_TAIL_CALL_CNT + 1, 0xffff));
+ emit(ctx, ori, MIPS_R_T9, MIPS_R_ZERO, min(MAX_TAIL_CALL_CNT, 0xffff));
emit(ctx, sw, MIPS_R_T9, 0, MIPS_R_SP);
/*
diff --git a/arch/mips/net/bpf_jit_comp64.c b/arch/mips/net/bpf_jit_comp64.c
index 815ade7242278..6475828ffb36d 100644
--- a/arch/mips/net/bpf_jit_comp64.c
+++ b/arch/mips/net/bpf_jit_comp64.c
@@ -552,7 +552,7 @@ void build_prologue(struct jit_context *ctx)
* On a tail call, the calling function jumps into the prologue
* after this instruction.
*/
- emit(ctx, addiu, tc, MIPS_R_ZERO, min(MAX_TAIL_CALL_CNT + 1, 0xffff));
+ emit(ctx, ori, tc, MIPS_R_ZERO, min(MAX_TAIL_CALL_CNT, 0xffff));
/* === Entry-point for tail calls === */
diff --git a/arch/powerpc/net/bpf_jit_comp32.c b/arch/powerpc/net/bpf_jit_comp32.c
index 0da31d41d4131..8a4faa05f9e41 100644
--- a/arch/powerpc/net/bpf_jit_comp32.c
+++ b/arch/powerpc/net/bpf_jit_comp32.c
@@ -221,13 +221,13 @@ static int bpf_jit_emit_tail_call(u32 *image, struct codegen_context *ctx, u32 o
PPC_BCC(COND_GE, out);
/*
- * if (tail_call_cnt > MAX_TAIL_CALL_CNT)
+ * if (tail_call_cnt >= MAX_TAIL_CALL_CNT)
* goto out;
*/
EMIT(PPC_RAW_CMPLWI(_R0, MAX_TAIL_CALL_CNT));
/* tail_call_cnt++; */
EMIT(PPC_RAW_ADDIC(_R0, _R0, 1));
- PPC_BCC(COND_GT, out);
+ PPC_BCC(COND_GE, out);
/* prog = array->ptrs[index]; */
EMIT(PPC_RAW_RLWINM(_R3, b2p_index, 2, 0, 29));
diff --git a/arch/powerpc/net/bpf_jit_comp64.c b/arch/powerpc/net/bpf_jit_comp64.c
index 8b5157ccfebae..8571aafcc9e1e 100644
--- a/arch/powerpc/net/bpf_jit_comp64.c
+++ b/arch/powerpc/net/bpf_jit_comp64.c
@@ -228,12 +228,12 @@ static int bpf_jit_emit_tail_call(u32 *image, struct codegen_context *ctx, u32 o
PPC_BCC(COND_GE, out);
/*
- * if (tail_call_cnt > MAX_TAIL_CALL_CNT)
+ * if (tail_call_cnt >= MAX_TAIL_CALL_CNT)
* goto out;
*/
PPC_BPF_LL(b2p[TMP_REG_1], 1, bpf_jit_stack_tailcallcnt(ctx));
EMIT(PPC_RAW_CMPLWI(b2p[TMP_REG_1], MAX_TAIL_CALL_CNT));
- PPC_BCC(COND_GT, out);
+ PPC_BCC(COND_GE, out);
/*
* tail_call_cnt++;
diff --git a/arch/riscv/net/bpf_jit_comp32.c b/arch/riscv/net/bpf_jit_comp32.c
index e6497424cbf60..529a83b85c1c9 100644
--- a/arch/riscv/net/bpf_jit_comp32.c
+++ b/arch/riscv/net/bpf_jit_comp32.c
@@ -799,11 +799,10 @@ static int emit_bpf_tail_call(int insn, struct rv_jit_context *ctx)
emit_bcc(BPF_JGE, lo(idx_reg), RV_REG_T1, off, ctx);
/*
- * temp_tcc = tcc - 1;
- * if (tcc < 0)
+ * if (--tcc < 0)
* goto out;
*/
- emit(rv_addi(RV_REG_T1, RV_REG_TCC, -1), ctx);
+ emit(rv_addi(RV_REG_TCC, RV_REG_TCC, -1), ctx);
off = ninsns_rvoff(tc_ninsn - (ctx->ninsns - start_insn));
emit_bcc(BPF_JSLT, RV_REG_TCC, RV_REG_ZERO, off, ctx);
@@ -829,7 +828,6 @@ static int emit_bpf_tail_call(int insn, struct rv_jit_context *ctx)
if (is_12b_check(off, insn))
return -1;
emit(rv_lw(RV_REG_T0, off, RV_REG_T0), ctx);
- emit(rv_addi(RV_REG_TCC, RV_REG_T1, 0), ctx);
/* Epilogue jumps to *(t0 + 4). */
__build_epilogue(true, ctx);
return 0;
diff --git a/arch/riscv/net/bpf_jit_comp64.c b/arch/riscv/net/bpf_jit_comp64.c
index f2a779c7e225d..603630b6f3c5b 100644
--- a/arch/riscv/net/bpf_jit_comp64.c
+++ b/arch/riscv/net/bpf_jit_comp64.c
@@ -327,12 +327,12 @@ static int emit_bpf_tail_call(int insn, struct rv_jit_context *ctx)
off = ninsns_rvoff(tc_ninsn - (ctx->ninsns - start_insn));
emit_branch(BPF_JGE, RV_REG_A2, RV_REG_T1, off, ctx);
- /* if (TCC-- < 0)
+ /* if (--TCC < 0)
* goto out;
*/
- emit_addi(RV_REG_T1, tcc, -1, ctx);
+ emit_addi(RV_REG_TCC, tcc, -1, ctx);
off = ninsns_rvoff(tc_ninsn - (ctx->ninsns - start_insn));
- emit_branch(BPF_JSLT, tcc, RV_REG_ZERO, off, ctx);
+ emit_branch(BPF_JSLT, RV_REG_TCC, RV_REG_ZERO, off, ctx);
/* prog = array->ptrs[index];
* if (!prog)
@@ -352,7 +352,6 @@ static int emit_bpf_tail_call(int insn, struct rv_jit_context *ctx)
if (is_12b_check(off, insn))
return -1;
emit_ld(RV_REG_T3, off, RV_REG_T2, ctx);
- emit_mv(RV_REG_TCC, RV_REG_T1, ctx);
__build_epilogue(true, ctx);
return 0;
}
diff --git a/arch/s390/net/bpf_jit_comp.c b/arch/s390/net/bpf_jit_comp.c
index 233cc9bcd6527..9ff2bd83aad70 100644
--- a/arch/s390/net/bpf_jit_comp.c
+++ b/arch/s390/net/bpf_jit_comp.c
@@ -1369,7 +1369,7 @@ static noinline int bpf_jit_insn(struct bpf_jit *jit, struct bpf_prog *fp,
jit->prg);
/*
- * if (tail_call_cnt++ > MAX_TAIL_CALL_CNT)
+ * if (tail_call_cnt++ >= MAX_TAIL_CALL_CNT)
* goto out;
*/
@@ -1381,9 +1381,9 @@ static noinline int bpf_jit_insn(struct bpf_jit *jit, struct bpf_prog *fp,
EMIT4_IMM(0xa7080000, REG_W0, 1);
/* laal %w1,%w0,off(%r15) */
EMIT6_DISP_LH(0xeb000000, 0x00fa, REG_W1, REG_W0, REG_15, off);
- /* clij %w1,MAX_TAIL_CALL_CNT,0x2,out */
+ /* clij %w1,MAX_TAIL_CALL_CNT-1,0x2,out */
patch_2_clij = jit->prg;
- EMIT6_PCREL_RIEC(0xec000000, 0x007f, REG_W1, MAX_TAIL_CALL_CNT,
+ EMIT6_PCREL_RIEC(0xec000000, 0x007f, REG_W1, MAX_TAIL_CALL_CNT - 1,
2, jit->prg);
/*
diff --git a/arch/sparc/net/bpf_jit_comp_64.c b/arch/sparc/net/bpf_jit_comp_64.c
index 9a2f20cbd48b7..0bfe1c72a0c9e 100644
--- a/arch/sparc/net/bpf_jit_comp_64.c
+++ b/arch/sparc/net/bpf_jit_comp_64.c
@@ -867,7 +867,7 @@ static void emit_tail_call(struct jit_ctx *ctx)
emit(LD32 | IMMED | RS1(SP) | S13(off) | RD(tmp), ctx);
emit_cmpi(tmp, MAX_TAIL_CALL_CNT, ctx);
#define OFFSET2 13
- emit_branch(BGU, ctx->idx, ctx->idx + OFFSET2, ctx);
+ emit_branch(BGEU, ctx->idx, ctx->idx + OFFSET2, ctx);
emit_nop(ctx);
emit_alu_K(ADD, tmp, 1, ctx);
diff --git a/arch/x86/net/bpf_jit_comp.c b/arch/x86/net/bpf_jit_comp.c
index bafe36e69227d..b87d98efd2240 100644
--- a/arch/x86/net/bpf_jit_comp.c
+++ b/arch/x86/net/bpf_jit_comp.c
@@ -412,7 +412,7 @@ static void emit_indirect_jump(u8 **pprog, int reg, u8 *ip)
* ... bpf_tail_call(void *ctx, struct bpf_array *array, u64 index) ...
* if (index >= array->map.max_entries)
* goto out;
- * if (++tail_call_cnt > MAX_TAIL_CALL_CNT)
+ * if (tail_call_cnt++ >= MAX_TAIL_CALL_CNT)
* goto out;
* prog = array->ptrs[index];
* if (prog == NULL)
@@ -446,14 +446,14 @@ static void emit_bpf_tail_call_indirect(u8 **pprog, bool *callee_regs_used,
EMIT2(X86_JBE, offset); /* jbe out */
/*
- * if (tail_call_cnt > MAX_TAIL_CALL_CNT)
+ * if (tail_call_cnt++ >= MAX_TAIL_CALL_CNT)
* goto out;
*/
EMIT2_off32(0x8B, 0x85, tcc_off); /* mov eax, dword ptr [rbp - tcc_off] */
EMIT3(0x83, 0xF8, MAX_TAIL_CALL_CNT); /* cmp eax, MAX_TAIL_CALL_CNT */
offset = ctx->tail_call_indirect_label - (prog + 2 - start);
- EMIT2(X86_JA, offset); /* ja out */
+ EMIT2(X86_JAE, offset); /* jae out */
EMIT3(0x83, 0xC0, 0x01); /* add eax, 1 */
EMIT2_off32(0x89, 0x85, tcc_off); /* mov dword ptr [rbp - tcc_off], eax */
@@ -504,14 +504,14 @@ static void emit_bpf_tail_call_direct(struct bpf_jit_poke_descriptor *poke,
int offset;
/*
- * if (tail_call_cnt > MAX_TAIL_CALL_CNT)
+ * if (tail_call_cnt++ >= MAX_TAIL_CALL_CNT)
* goto out;
*/
EMIT2_off32(0x8B, 0x85, tcc_off); /* mov eax, dword ptr [rbp - tcc_off] */
EMIT3(0x83, 0xF8, MAX_TAIL_CALL_CNT); /* cmp eax, MAX_TAIL_CALL_CNT */
offset = ctx->tail_call_direct_label - (prog + 2 - start);
- EMIT2(X86_JA, offset); /* ja out */
+ EMIT2(X86_JAE, offset); /* jae out */
EMIT3(0x83, 0xC0, 0x01); /* add eax, 1 */
EMIT2_off32(0x89, 0x85, tcc_off); /* mov dword ptr [rbp - tcc_off], eax */
diff --git a/arch/x86/net/bpf_jit_comp32.c b/arch/x86/net/bpf_jit_comp32.c
index da9b7cfa46329..429a89c5468b5 100644
--- a/arch/x86/net/bpf_jit_comp32.c
+++ b/arch/x86/net/bpf_jit_comp32.c
@@ -1323,7 +1323,7 @@ static void emit_bpf_tail_call(u8 **pprog, u8 *ip)
EMIT2(IA32_JBE, jmp_label(jmp_label1, 2));
/*
- * if (tail_call_cnt > MAX_TAIL_CALL_CNT)
+ * if (tail_call_cnt++ >= MAX_TAIL_CALL_CNT)
* goto out;
*/
lo = (u32)MAX_TAIL_CALL_CNT;
@@ -1337,7 +1337,7 @@ static void emit_bpf_tail_call(u8 **pprog, u8 *ip)
/* cmp ecx,lo */
EMIT3(0x83, add_1reg(0xF8, IA32_ECX), lo);
- /* ja out */
+ /* jae out */
EMIT2(IA32_JAE, jmp_label(jmp_label1, 2));
/* add eax,0x1 */
diff --git a/include/linux/bpf.h b/include/linux/bpf.h
index 755f38e893be1..9f20b0f539f78 100644
--- a/include/linux/bpf.h
+++ b/include/linux/bpf.h
@@ -1082,7 +1082,7 @@ struct bpf_array {
};
#define BPF_COMPLEXITY_LIMIT_INSNS 1000000 /* yes. 1M insns */
-#define MAX_TAIL_CALL_CNT 32
+#define MAX_TAIL_CALL_CNT 33
#define BPF_F_ACCESS_MASK (BPF_F_RDONLY | \
BPF_F_RDONLY_PROG | \
diff --git a/include/uapi/linux/bpf.h b/include/uapi/linux/bpf.h
index ba5af15e25f5c..b12cfceddb6e9 100644
--- a/include/uapi/linux/bpf.h
+++ b/include/uapi/linux/bpf.h
@@ -1744,7 +1744,7 @@ union bpf_attr {
* if the maximum number of tail calls has been reached for this
* chain of programs. This limit is defined in the kernel by the
* macro **MAX_TAIL_CALL_CNT** (not accessible to user space),
- * which is currently set to 32.
+ * which is currently set to 33.
* Return
* 0 on success, or a negative error in case of failure.
*
diff --git a/kernel/bpf/core.c b/kernel/bpf/core.c
index 2405e39d800fe..b52dc845ecea3 100644
--- a/kernel/bpf/core.c
+++ b/kernel/bpf/core.c
@@ -1574,7 +1574,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;
tail_call_cnt++;
diff --git a/lib/test_bpf.c b/lib/test_bpf.c
index adae39567264f..0c5cb2d6436a4 100644
--- a/lib/test_bpf.c
+++ b/lib/test_bpf.c
@@ -14683,7 +14683,7 @@ static struct tail_call_test tail_call_tests[] = {
BPF_EXIT_INSN(),
},
.flags = FLAG_NEED_STATE | FLAG_RESULT_IN_STATE,
- .result = (MAX_TAIL_CALL_CNT + 1 + 1) * MAX_TESTRUNS,
+ .result = (MAX_TAIL_CALL_CNT + 1) * MAX_TESTRUNS,
},
{
"Tail call count preserved across function calls",
@@ -14705,7 +14705,7 @@ static struct tail_call_test tail_call_tests[] = {
},
.stack_depth = 8,
.flags = FLAG_NEED_STATE | FLAG_RESULT_IN_STATE,
- .result = (MAX_TAIL_CALL_CNT + 1 + 1) * MAX_TESTRUNS,
+ .result = (MAX_TAIL_CALL_CNT + 1) * MAX_TESTRUNS,
},
{
"Tail call error path, NULL target",
diff --git a/tools/include/uapi/linux/bpf.h b/tools/include/uapi/linux/bpf.h
index ba5af15e25f5c..b12cfceddb6e9 100644
--- a/tools/include/uapi/linux/bpf.h
+++ b/tools/include/uapi/linux/bpf.h
@@ -1744,7 +1744,7 @@ union bpf_attr {
* if the maximum number of tail calls has been reached for this
* chain of programs. This limit is defined in the kernel by the
* macro **MAX_TAIL_CALL_CNT** (not accessible to user space),
- * which is currently set to 32.
+ * which is currently set to 33.
* Return
* 0 on success, or a negative error in case of failure.
*
--
2.34.1
next prev parent reply other threads:[~2022-01-18 2:24 UTC|newest]
Thread overview: 95+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-01-18 2:16 [PATCH AUTOSEL 5.16 001/217] Bluetooth: hci_sock: purge socket queues in the destruct() callback Sasha Levin
2022-01-18 2:16 ` [PATCH AUTOSEL 5.16 002/217] Bluetooth: Fix debugfs entry leak in hci_register_dev() Sasha Levin
2022-01-18 2:16 ` [PATCH AUTOSEL 5.16 003/217] Bluetooth: Fix memory leak of hci device Sasha Levin
2022-01-18 2:16 ` [PATCH AUTOSEL 5.16 005/217] Bluetooth: Fix removing adv when processing cmd complete Sasha Levin
2022-01-18 2:16 ` [PATCH AUTOSEL 5.16 008/217] libbpf: Detect corrupted ELF symbols section Sasha Levin
2022-01-18 2:16 ` [PATCH AUTOSEL 5.16 009/217] libbpf: Improve sanity checking during BTF fix up Sasha Levin
2022-01-18 2:16 ` [PATCH AUTOSEL 5.16 010/217] libbpf: Validate that .BTF and .BTF.ext sections contain data Sasha Levin
2022-01-18 2:16 ` [PATCH AUTOSEL 5.16 012/217] selftests/bpf: Fix memory leaks in btf_type_c_dump() helper Sasha Levin
2022-01-18 2:16 ` [PATCH AUTOSEL 5.16 013/217] selftests/bpf: Destroy XDP link correctly Sasha Levin
2022-01-18 2:16 ` [PATCH AUTOSEL 5.16 014/217] selftests/bpf: Fix bpf_object leak in skb_ctx selftest Sasha Levin
2022-01-18 2:16 ` [PATCH AUTOSEL 5.16 015/217] ar5523: Fix null-ptr-deref with unexpected WDCMSG_TARGET_START reply Sasha Levin
2022-01-18 2:16 ` [PATCH AUTOSEL 5.16 024/217] ath11k: enable IEEE80211_VHT_EXT_NSS_BW_CAPABLE if NSS ratio enabled Sasha Levin
2022-01-18 2:16 ` [PATCH AUTOSEL 5.16 025/217] batman-adv: allow netlink usage in unprivileged containers Sasha Levin
2022-01-18 2:16 ` Sasha Levin [this message]
2022-01-18 2:16 ` [PATCH AUTOSEL 5.16 028/217] ath11k: Fix crash caused by uninitialized TX ring Sasha Levin
2022-01-18 2:16 ` [PATCH AUTOSEL 5.16 034/217] amd: lance: use eth_hw_addr_set() Sasha Levin
2022-01-18 2:16 ` [PATCH AUTOSEL 5.16 035/217] amd: ni65: " Sasha Levin
2022-01-18 2:16 ` [PATCH AUTOSEL 5.16 036/217] amd: a2065/ariadne: " Sasha Levin
2022-01-18 2:16 ` [PATCH AUTOSEL 5.16 037/217] amd: hplance: " Sasha Levin
2022-01-18 2:16 ` [PATCH AUTOSEL 5.16 038/217] amd: atarilance: " Sasha Levin
2022-01-18 2:16 ` [PATCH AUTOSEL 5.16 039/217] amd: mvme147: " Sasha Levin
2022-01-18 2:16 ` [PATCH AUTOSEL 5.16 040/217] 8390: smc-ultra: " Sasha Levin
2022-01-18 2:16 ` [PATCH AUTOSEL 5.16 041/217] 8390: hydra: " Sasha Levin
2022-01-18 2:16 ` [PATCH AUTOSEL 5.16 042/217] 8390: mac8390: " Sasha Levin
2022-01-18 2:16 ` [PATCH AUTOSEL 5.16 043/217] 8390: wd: " Sasha Levin
2022-01-18 2:16 ` [PATCH AUTOSEL 5.16 044/217] smc9194: " Sasha Levin
2022-01-18 2:16 ` [PATCH AUTOSEL 5.16 045/217] lasi_82594: " Sasha Levin
2022-01-18 2:16 ` [PATCH AUTOSEL 5.16 046/217] apple: macmace: " Sasha Levin
2022-01-18 2:16 ` [PATCH AUTOSEL 5.16 047/217] cirrus: mac89x0: " Sasha Levin
2022-01-18 16:56 ` Jakub Kicinski
2022-01-22 18:51 ` Sasha Levin
2022-01-18 2:16 ` [PATCH AUTOSEL 5.16 051/217] libbpf: Accommodate DWARF/compiler bug with duplicated structs Sasha Levin
2022-01-18 2:16 ` [PATCH AUTOSEL 5.16 052/217] ethernet: renesas: Use div64_ul instead of do_div Sasha Levin
2022-01-18 2:16 ` [PATCH AUTOSEL 5.16 053/217] 82596: use eth_hw_addr_set() Sasha Levin
2022-01-18 2:17 ` [PATCH AUTOSEL 5.16 059/217] ath11k: Fix mon status ring rx tlv processing Sasha Levin
2022-01-18 2:17 ` [PATCH AUTOSEL 5.16 063/217] mlxsw: pci: Add shutdown method in PCI driver Sasha Levin
2022-01-18 2:17 ` [PATCH AUTOSEL 5.16 074/217] rtw89: fix potentially access out of range of RF register array Sasha Levin
2022-01-18 2:17 ` [PATCH AUTOSEL 5.16 075/217] rtw88: add quirk to disable pci caps on HP 250 G7 Notebook PC Sasha Levin
2022-01-18 2:17 ` [PATCH AUTOSEL 5.16 076/217] mwifiex: Fix skb_over_panic in mwifiex_usb_recv() Sasha Levin
2022-01-18 2:17 ` [PATCH AUTOSEL 5.16 077/217] rsi: Fix use-after-free in rsi_rx_done_handler() Sasha Levin
2022-01-18 2:17 ` [PATCH AUTOSEL 5.16 078/217] rsi: Fix out-of-bounds read in rsi_read_pkt() Sasha Levin
2022-01-18 2:17 ` [PATCH AUTOSEL 5.16 079/217] ath11k: Avoid NULL ptr access during mgmt tx cleanup Sasha Levin
2022-01-18 2:17 ` [PATCH AUTOSEL 5.16 104/217] iwlwifi: mvm: synchronize with FW after multicast commands Sasha Levin
2022-01-18 2:17 ` [PATCH AUTOSEL 5.16 105/217] iwlwifi: mvm: avoid clearing a just saved session protection id Sasha Levin
2022-01-18 2:17 ` [PATCH AUTOSEL 5.16 106/217] iwlwifi: acpi: fix wgds rev 3 size Sasha Levin
2022-01-18 2:17 ` [PATCH AUTOSEL 5.16 108/217] net: dsa: ocelot: felix: Remove requirement for PCS in felix devices Sasha Levin
2022-01-18 12:23 ` Vladimir Oltean
2022-01-22 19:02 ` Sasha Levin
2022-01-18 2:17 ` [PATCH AUTOSEL 5.16 109/217] ath11k: avoid deadlock by change ieee80211_queue_work for regd_update_work Sasha Levin
2022-01-18 2:17 ` [PATCH AUTOSEL 5.16 110/217] ath10k: Fix tx hanging Sasha Levin
2022-01-18 2:17 ` [PATCH AUTOSEL 5.16 111/217] rtw89: don't kick off TX DMA if failed to write skb Sasha Levin
2022-01-18 2:17 ` [PATCH AUTOSEL 5.16 112/217] net-sysfs: update the queue counts in the unregistration path Sasha Levin
2022-01-18 2:17 ` [PATCH AUTOSEL 5.16 113/217] ath10k: drop beacon and probe response which leak from other channel Sasha Levin
2022-01-18 2:17 ` [PATCH AUTOSEL 5.16 114/217] net: phy: prefer 1000baseT over 1000baseKX Sasha Levin
2022-01-18 2:18 ` [PATCH AUTOSEL 5.16 118/217] net: Enable neighbor sysctls that is save for userns root Sasha Levin
2022-01-18 16:59 ` Jakub Kicinski
2022-01-19 3:46 ` David Ahern
2022-01-22 19:13 ` Sasha Levin
2022-01-18 2:18 ` [PATCH AUTOSEL 5.16 120/217] ath11k: Avoid false DEADLOCK warning reported by lockdep Sasha Levin
2022-01-18 2:18 ` [PATCH AUTOSEL 5.16 127/217] net: bonding: debug: avoid printing debug logs when bond is not notifying peers Sasha Levin
2022-01-18 2:18 ` [PATCH AUTOSEL 5.16 129/217] bpf: Do not WARN in bpf_warn_invalid_xdp_action() Sasha Levin
2022-01-18 2:18 ` [PATCH AUTOSEL 5.16 152/217] mt76: mt7615: fix possible deadlock while mt7615_register_ext_phy() Sasha Levin
2022-01-18 2:18 ` [PATCH AUTOSEL 5.16 153/217] mt76: mt7915: fix SMPS operation fail Sasha Levin
2022-01-18 2:18 ` [PATCH AUTOSEL 5.16 154/217] mt76: connac: fix a theoretical NULL pointer dereference in mt76_connac_get_phy_mode Sasha Levin
2022-01-18 2:18 ` [PATCH AUTOSEL 5.16 155/217] mt76: do not pass the received frame with decryption error Sasha Levin
2022-01-18 2:18 ` [PATCH AUTOSEL 5.16 156/217] mt76: mt7615: improve wmm index allocation Sasha Levin
2022-01-18 2:18 ` [PATCH AUTOSEL 5.16 157/217] mt76: mt7921: fix network buffer leak by txs missing Sasha Levin
2022-01-18 2:18 ` [PATCH AUTOSEL 5.16 158/217] ath9k_htc: fix NULL pointer dereference at ath9k_htc_rxep() Sasha Levin
2022-01-18 2:18 ` [PATCH AUTOSEL 5.16 159/217] ath9k_htc: fix NULL pointer dereference at ath9k_htc_tx_get_packet() Sasha Levin
2022-01-18 2:18 ` [PATCH AUTOSEL 5.16 160/217] ath9k: Fix out-of-bound memcpy in ath9k_hif_usb_rx_stream Sasha Levin
2022-01-18 2:18 ` [PATCH AUTOSEL 5.16 161/217] rtw88: 8822c: update rx settings to prevent potential hw deadlock Sasha Levin
2022-01-18 2:18 ` [PATCH AUTOSEL 5.16 163/217] iwlwifi: recognize missing PNVM data and then log filename Sasha Levin
2022-01-18 2:18 ` [PATCH AUTOSEL 5.16 164/217] iwlwifi: fix leaks/bad data after failed firmware load Sasha Levin
2022-01-18 2:18 ` [PATCH AUTOSEL 5.16 165/217] iwlwifi: remove module loading failure message Sasha Levin
2022-01-18 2:18 ` [PATCH AUTOSEL 5.16 166/217] iwlwifi: mvm: Fix calculation of frame length Sasha Levin
2022-01-18 2:18 ` [PATCH AUTOSEL 5.16 167/217] iwlwifi: mvm: fix AUX ROC removal Sasha Levin
2022-01-18 2:18 ` [PATCH AUTOSEL 5.16 168/217] iwlwifi: pcie: make sure prph_info is set when treating wakeup IRQ Sasha Levin
2022-01-18 2:18 ` [PATCH AUTOSEL 5.16 172/217] ath11k: Fix napi related hang Sasha Levin
2022-01-18 2:18 ` [PATCH AUTOSEL 5.16 176/217] xfrm: rate limit SA mapping change message to user space Sasha Levin
2022-01-18 2:19 ` [PATCH AUTOSEL 5.16 191/217] net/mlx5: DR, Fix error flow in creating matcher Sasha Levin
2022-01-18 2:19 ` [PATCH AUTOSEL 5.16 194/217] net: mdio: Demote probed message to debug print Sasha Levin
2022-01-18 2:19 ` [PATCH AUTOSEL 5.16 195/217] mac80211: allow non-standard VHT MCS-10/11 Sasha Levin
2022-01-18 2:19 ` [PATCH AUTOSEL 5.16 198/217] can: do not increase rx statistics when generating a CAN rx error message frame Sasha Levin
2022-01-18 2:19 ` [PATCH AUTOSEL 5.16 199/217] bpf/selftests: Fix namespace mount setup in tc_redirect Sasha Levin
2022-01-18 2:19 ` [PATCH AUTOSEL 5.16 200/217] mlxsw: pci: Avoid flow control for EMAD packets Sasha Levin
2022-01-18 2:19 ` [PATCH AUTOSEL 5.16 201/217] net: phy: marvell: configure RGMII delays for 88E1118 Sasha Levin
2022-01-18 2:19 ` [PATCH AUTOSEL 5.16 202/217] net: gemini: allow any RGMII interface mode Sasha Levin
2022-01-18 2:19 ` [PATCH AUTOSEL 5.16 203/217] net: dsa: hold rtnl_mutex when calling dsa_master_{setup,teardown} Sasha Levin
2022-01-18 12:13 ` Vladimir Oltean
2022-01-22 19:17 ` Sasha Levin
2022-01-18 2:19 ` [PATCH AUTOSEL 5.16 209/217] net/mlx5: Update log_max_qp value to FW max capability Sasha Levin
2022-01-18 2:19 ` [PATCH AUTOSEL 5.16 210/217] net/mlx5e: Unblock setting vid 0 for VF in case PF isn't eswitch manager Sasha Levin
2022-01-18 2:19 ` [PATCH AUTOSEL 5.16 213/217] can: flexcan: allow to change quirks at runtime Sasha Levin
2022-01-18 2:19 ` [PATCH AUTOSEL 5.16 214/217] can: flexcan: rename RX modes Sasha Levin
2022-01-18 2:19 ` [PATCH AUTOSEL 5.16 215/217] can: flexcan: add more quirks to describe RX path capabilities Sasha Levin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220118021940.1942199-26-sashal@kernel.org \
--to=sashal@kernel$(echo .)org \
--cc=andrii@kernel$(echo .)org \
--cc=aou@eecs$(echo .)berkeley.edu \
--cc=ast@kernel$(echo .)org \
--cc=bjorn@kernel$(echo .)org \
--cc=borntraeger@linux$(echo .)ibm.com \
--cc=bp@alien8$(echo .)de \
--cc=bpf@vger$(echo .)kernel.org \
--cc=brouer@redhat$(echo .)com \
--cc=catalin.marinas@arm$(echo .)com \
--cc=daniel@iogearbox$(echo .)net \
--cc=dave.hansen@linux$(echo .)intel.com \
--cc=davem@davemloft$(echo .)net \
--cc=davemarchevsky@fb$(echo .)com \
--cc=dsahern@kernel$(echo .)org \
--cc=gor@linux$(echo .)ibm.com \
--cc=hca@linux$(echo .)ibm.com \
--cc=iii@linux$(echo .)ibm.com \
--cc=illusionist.neo@gmail$(echo .)com \
--cc=joannekoong@fb$(echo .)com \
--cc=joe@cilium$(echo .)io \
--cc=johan.almbladh@anyfinetworks$(echo .)com \
--cc=john.fastabend@gmail$(echo .)com \
--cc=linux-arm-kernel@lists$(echo .)infradead.org \
--cc=linux-kernel@vger$(echo .)kernel.org \
--cc=linux-mips@vger$(echo .)kernel.org \
--cc=linux-riscv@lists$(echo .)infradead.org \
--cc=linux-s390@vger$(echo .)kernel.org \
--cc=linux@armlinux$(echo .)org.uk \
--cc=linuxppc-dev@lists$(echo .)ozlabs.org \
--cc=liuhangbin@gmail$(echo .)com \
--cc=luke.r.nels@gmail$(echo .)com \
--cc=mingo@redhat$(echo .)com \
--cc=mpe@ellerman$(echo .)id.au \
--cc=naveen.n.rao@linux$(echo .)ibm.com \
--cc=netdev@vger$(echo .)kernel.org \
--cc=palmer@dabbelt$(echo .)com \
--cc=paul.walmsley@sifive$(echo .)com \
--cc=paulburton@kernel$(echo .)org \
--cc=revest@chromium$(echo .)org \
--cc=sparclinux@vger$(echo .)kernel.org \
--cc=stable@vger$(echo .)kernel.org \
--cc=tglx@linutronix$(echo .)de \
--cc=tsbogend@alpha$(echo .)franken.de \
--cc=udknight@gmail$(echo .)com \
--cc=will@kernel$(echo .)org \
--cc=x86@kernel$(echo .)org \
--cc=xi.wang@gmail$(echo .)com \
--cc=yangtiezhu@loongson$(echo .)cn \
--cc=yhs@fb$(echo .)com \
--cc=yoshfuji@linux-ipv6$(echo .)org \
--cc=zlim.lnx@gmail$(echo .)com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox