Linux s390 Architecture development
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Jose Fernandez (Anthropic)" <jose.fernandez@linux.dev>
Cc: linux-s390@vger.kernel.org, "Heiko Carstens" <hca@linux.ibm.com>,
	"Vasily Gorbik" <gor@linux.ibm.com>,
	"Alexander Gordeev" <agordeev@linux.ibm.com>,
	"Christian Borntraeger" <borntraeger@linux.ibm.com>
Subject: Re: [PATCH bpf v2] bpf: Fix jited line info off by the CFI preamble
Date: Fri, 30 Oct 2026 18:19:25 +0000	[thread overview]
Message-ID: <sashiko-outbox-191402@kernel.org> (raw)
In-Reply-To: <20261030-b4-arm64-bpf-linfo-cfi-v2-1-4eac83435d4b@linux.dev>

> With CONFIG_CFI=y, every jited line info entry after a function's
> first is cfi_get_offset() bytes too high on x86-64, riscv64 and arm64,
> so tools that use it show the wrong source line.
> 
> The JITs count the insn_to_jit_off[] offsets from the start of the
> image. Since the CFI commits below, prog->bpf_func starts
> cfi_get_offset() bytes into the image, and bpf_prog_fill_jited_linfo()
> adds the offsets to prog->bpf_func. s390 corrects its offsets before
> the call, the other three JITs do not.
> 
> Subtract cfi_get_offset() once in bpf_prog_fill_jited_linfo() and drop
> the s390 correction. jited_linfo[0] stays prog->bpf_func, the
> function's ksym address. Without CONFIG_CFI, cfi_get_offset() is 0 and
> nothing changes.
> 
> Fixes: 4f9087f16651 ("x86/cfi,bpf: Fix BPF JIT call")
> Fixes: e63985ecd226 ("bpf, riscv64/cfi: Support kCFI + BPF on riscv64")
> Fixes: 710618c760c0 ("arm64/cfi,bpf: Support kCFI + BPF on arm64")
> Reported-by: Sashiko <sashiko-bot@kernel.org>
> Closes: https://lore.kernel.org/all/20260904014748.C04AA1F000E9@smtp.kernel.org/
> Reported-by: Alexei Starovoitov <ast@kernel.org>
> Closes: https://lore.kernel.org/all/DLNXZ2WK7TPD.2RZBUNRS4FA4L@gmail.com/
> Signed-off-by: Jose Fernandez (Anthropic) <jose.fernandez@linux.dev>

Sashiko has reviewed this patch and found no issues.

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261030-b4-arm64-bpf-linfo-cfi-v2-1-4eac83435d4b@linux.dev?part=1


  reply	other threads:[~2026-10-30 18:19 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-30 18:14 [PATCH bpf v2] bpf: Fix jited line info off by the CFI preamble Jose Fernandez (Anthropic)
2026-10-30 18:19 ` sashiko-bot [this message]
2026-10-30 21:40 ` patchwork-bot+netdevbpf

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=sashiko-outbox-191402@kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=agordeev@linux.ibm.com \
    --cc=borntraeger@linux.ibm.com \
    --cc=gor@linux.ibm.com \
    --cc=hca@linux.ibm.com \
    --cc=jose.fernandez@linux.dev \
    --cc=linux-s390@vger.kernel.org \
    --cc=sashiko-reviews@lists.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