BPF List
 help / color / mirror / Atom feed
From: Leon Hwang <leon.hwang@linux.dev>
To: Tiezhu Yang <yangtiezhu@loongson.cn>,
	Alexei Starovoitov <ast@kernel.org>,
	Daniel Borkmann <daniel@iogearbox.net>,
	Andrii Nakryiko <andrii@kernel.org>
Cc: Puranjay Mohan <puranjay@kernel.org>,
	loongarch@lists.linux.dev, bpf@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH bpf-next v2] bpf: Fix unaligned interpreter panic on JIT fallback path
Date: Thu, 11 Jun 2026 18:23:42 +0800	[thread overview]
Message-ID: <aede5a4b-7325-47fc-8947-1c8307f10665@linux.dev> (raw)
In-Reply-To: <20260611101216.30153-1-yangtiezhu@loongson.cn>

On 11/6/26 18:12, Tiezhu Yang wrote:
[...]
> +/* Fix up helper call offsets for inlined helpers on JIT fallback path. */
> +static void bpf_fixup_fallback_inline_helpers(struct bpf_verifier_env *env, struct bpf_prog *fp)
> +{
> +	struct bpf_insn *insn = fp->insnsi;
> +	const struct bpf_func_proto *fn;
> +	int i;
> +
> +	if (!env || !env->ops->get_func_proto)
> +		return;
> +
> +	for (i = 0; i < fp->len; i++, insn++) {
> +		if (insn->code == (BPF_JMP | BPF_CALL) && insn->src_reg == 0) {

NIT: better to use bpf_helper_call() here.

Other than that, lgtm:

Acked-by: Leon Hwang <leon.hwang@linux.dev>

> [...]

  reply	other threads:[~2026-06-11 10:24 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-11 10:12 [PATCH bpf-next v2] bpf: Fix unaligned interpreter panic on JIT fallback path Tiezhu Yang
2026-06-11 10:23 ` Leon Hwang [this message]
2026-06-11 10:54 ` bot+bpf-ci
2026-06-11 11:28   ` Tiezhu Yang
2026-06-12 12:37 ` Xu Kuohai
2026-06-15  1:23   ` Tiezhu Yang
2026-06-15  1:49     ` Leon Hwang
2026-06-15  2:05       ` Tiezhu Yang
2026-06-15  2:15         ` Leon Hwang

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=aede5a4b-7325-47fc-8947-1c8307f10665@linux.dev \
    --to=leon.hwang@linux.dev \
    --cc=andrii@kernel.org \
    --cc=ast@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=loongarch@lists.linux.dev \
    --cc=puranjay@kernel.org \
    --cc=yangtiezhu@loongson.cn \
    /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