mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Eduard Zingerman <eddyz87@gmail.com>
To: "Pu Lehui" <pulehui@huaweicloud.com>,
	bpf@vger.kernel.org, linux-kernel@vger.kernel.org,
	"Björn Töpel" <bjorn@kernel.org>,
	"Daniel Borkmann" <daniel@iogearbox.net>
Cc: Alexei Starovoitov <ast@kernel.org>,
	Andrii Nakryiko <andrii@kernel.org>,
	 Kumar Kartikeya Dwivedi	 <memxor@gmail.com>,
	Yonghong Song <yonghong.song@linux.dev>,
	Martin KaFai Lau	 <martin.lau@linux.dev>,
	John Fastabend <john.fastabend@gmail.com>,
	Song Liu	 <song@kernel.org>, Jiri Olsa <jolsa@kernel.org>,
	Emil Tsalapatis	 <emil@etsalapatis.com>,
	Pu Lehui <pulehui@huawei.com>
Subject: Re: [PATCH bpf-next 2/2] selftests/bpf: Add testcases for callback with tailcall
Date: Mon, 13 Jul 2026 15:12:49 -0700	[thread overview]
Message-ID: <6befa724e4fdc197f4a603246b4f95b65748882f.camel@gmail.com> (raw)
In-Reply-To: <20260711104727.4023420-3-pulehui@huaweicloud.com>

On Sat, 2026-07-11 at 10:47 +0000, Pu Lehui wrote:

[...]

> diff --git a/tools/testing/selftests/bpf/prog_tests/tailcalls.c b/tools/testing/selftests/bpf/prog_tests/tailcalls.c
> index a5a226d0104c..c66037162da5 100644
> --- a/tools/testing/selftests/bpf/prog_tests/tailcalls.c
> +++ b/tools/testing/selftests/bpf/prog_tests/tailcalls.c

[...]

>  void test_tailcalls(void)
>  {
>  	if (test__start_subtest("tailcall_1"))
> @@ -1967,4 +1973,5 @@ void test_tailcalls(void)
>  		test_tailcall_cgrp_storage_no_storage_leaf();
>  	if (test__start_subtest("tailcall_cgrp_storage_no_storage_bridge"))
>  		test_tailcall_cgrp_storage_no_storage_bridge();
> +	test_tailcall_callback();

Please use test__start_subtest().

>  }
> diff --git a/tools/testing/selftests/bpf/progs/tailcall_callback.c b/tools/testing/selftests/bpf/progs/tailcall_callback.c
> new file mode 100644
> index 000000000000..504d8e7a6996
> --- /dev/null
> +++ b/tools/testing/selftests/bpf/progs/tailcall_callback.c

[...]

> +/* callback involving 1 subprog with tail call is rejected */
> +SEC("tc")
> +__failure __msg("cannot tail call within callback")
> +int tailcall_bpf2bpf_callback_1(struct __sk_buff *skb)
> +{
> +	clobber_regs_stack();
> +
> +	bpf_loop(1, callback_loop_2, &skb, 0);
> +	return 0;
> +}

I think having all three is a bit redundant,
let's settle on tailcall_bpf2bpf_callback_1?

  reply	other threads:[~2026-07-13 22:12 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-11 10:47 [PATCH bpf-next 0/2] Reject callback subprogs invoke tailcall Pu Lehui
2026-07-11 10:47 ` [PATCH bpf-next 1/2] bpf: " Pu Lehui
2026-07-11 11:33   ` bot+bpf-ci
2026-07-13 22:09   ` Eduard Zingerman
2026-07-11 10:47 ` [PATCH bpf-next 2/2] selftests/bpf: Add testcases for callback with tailcall Pu Lehui
2026-07-13 22:12   ` Eduard Zingerman [this message]
2026-07-14  2:01     ` Pu Lehui

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=6befa724e4fdc197f4a603246b4f95b65748882f.camel@gmail.com \
    --to=eddyz87@gmail.com \
    --cc=andrii@kernel.org \
    --cc=ast@kernel.org \
    --cc=bjorn@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=emil@etsalapatis.com \
    --cc=john.fastabend@gmail.com \
    --cc=jolsa@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=martin.lau@linux.dev \
    --cc=memxor@gmail.com \
    --cc=pulehui@huawei.com \
    --cc=pulehui@huaweicloud.com \
    --cc=song@kernel.org \
    --cc=yonghong.song@linux.dev \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
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

Powered by JetHome