All of lore.kernel.org
 help / color / mirror / Atom feed
From: Yonghong Song <yonghong.song@linux.dev>
To: Alexei Starovoitov <alexei.starovoitov@gmail.com>, bpf@vger.kernel.org
Cc: Alexei Starovoitov <ast@kernel.org>,
	Andrii Nakryiko <andrii@kernel.org>,
	Daniel Borkmann <daniel@iogearbox.net>,
	kernel-team@fb.com, Martin KaFai Lau <martin.lau@kernel.org>
Subject: Re: [PATCH bpf-next 1/3] selftests/bpf: Keep int return type for tailcall subprogs with maps
Date: Tue, 9 Jun 2026 15:21:45 -0700	[thread overview]
Message-ID: <2bd48c7e-e1b4-4498-99ba-18df16e7b358@linux.dev> (raw)
In-Reply-To: <DJ4ULU6H2NYA.24B49ESUI6RNP@gmail.com>



On 6/9/26 2:49 PM, Alexei Starovoitov wrote:
> On Tue Jun 9, 2026 at 2:30 PM PDT, Yonghong Song wrote:
>> const struct bpf_func_proto bpf_tail_call_proto = {         /* func is
>> unused for tail_call, we set it to pass the          * get_helper_proto
>> check          */         .func           = BPF_PTR_POISON,
>> .gpl_only       = false,         .ret_type       = RET_VOID,
>> .arg1_type      = ARG_PTR_TO_CTX,         .arg2_type      =
>> ARG_CONST_MAP_PTR,         .arg3_type      = ARG_ANYTHING, }; and for
>> RET_VOID, we have below in verifier.c:         switch
>> (base_type(ret_type)) {         case RET_INTEGER:                 /*
>> sets type to SCALAR_VALUE */                 mark_reg_unknown(env, regs,
>> BPF_REG_0);                 break;         case RET_VOID:
>>     regs[BPF_REG_0].type = NOT_INIT;                 break; so we cannot
>> return 'r0'.
> Ahh, so bpf_tail_call() is a void return.
> Then, I'll take it back. bpf_tail_call_static() is correct with void return.
> I guess we have to teach the verifier to accept void subprogs asap.
>
> In the meantime let's do shortest possible hack for tailcall_bpf2bpf_hierarchy1.c
> to pass with llvm 23.

Sounds good. Will do.


  reply	other threads:[~2026-06-09 22:21 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-09 16:39 [PATCH bpf-next 0/3] selftests/bpf: Fix tests for llvm23 true signature Yonghong Song
2026-06-09 16:39 ` [PATCH bpf-next 1/3] selftests/bpf: Keep int return type for tailcall subprogs with maps Yonghong Song
2026-06-09 16:48   ` sashiko-bot
2026-06-09 17:02     ` Yonghong Song
2026-06-09 18:00   ` Alexei Starovoitov
2026-06-09 21:30     ` Yonghong Song
2026-06-09 21:49       ` Alexei Starovoitov
2026-06-09 22:21         ` Yonghong Song [this message]
2026-06-09 16:39 ` [PATCH bpf-next 2/3] selftests/bpf: Keep int return type for tailcall subprogs Yonghong Song
2026-06-09 18:42   ` sashiko-bot
2026-06-09 16:40 ` [PATCH bpf-next 3/3] selftests/bpf: Adjust fexit_bpf2bpf ctx layout for llvm23 true signature Yonghong Song
2026-06-09 18:43   ` sashiko-bot

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=2bd48c7e-e1b4-4498-99ba-18df16e7b358@linux.dev \
    --to=yonghong.song@linux.dev \
    --cc=alexei.starovoitov@gmail.com \
    --cc=andrii@kernel.org \
    --cc=ast@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=kernel-team@fb.com \
    --cc=martin.lau@kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.