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 1/2] bpf: Reject callback subprogs invoke tailcall
Date: Mon, 13 Jul 2026 15:09:45 -0700	[thread overview]
Message-ID: <3e15d4b9ce4e24e94e0a95d3785fcc0c90448c10.camel@gmail.com> (raw)
In-Reply-To: <20260711104727.4023420-2-pulehui@huaweicloud.com>

On Sat, 2026-07-11 at 10:47 +0000, Pu Lehui wrote:
> From: Pu Lehui <pulehui@huawei.com>
> 
> Some JIT compilers, such as x86_64, rely on a register to pass the TCC.
> When subprograms of synchronous callback invoke tailcall, C helpers
> invoking bpf callback clobber this register, and the corrupted TCC may
> bypass the TCC limit, leading to infinite tailcall.
> 
> Fix this by rejecting tailcall inside all subprogs of sync callback.
> This also cleanly consolidates the existing async and exception callback
> checks into a single unified `is_cb` check.
> 
> Reported-by: Sashiko <sashiko-bot@kernel.org>
> Reported-by: Björn Töpel <bjorn@kernel.org>
> Signed-off-by: Pu Lehui <pulehui@huawei.com>
> ---

Acked-by: Eduard Zingerman <eddyz87@gmail.com>

[...]

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

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-11 10:47 [PATCH bpf-next 0/2] " 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 [this message]
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
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=3e15d4b9ce4e24e94e0a95d3785fcc0c90448c10.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