From: sashiko-bot@kernel.org
To: "Ian Rogers" <irogers@google.com>
Cc: linux-perf-users@vger.kernel.org
Subject: Re: [PATCH v1] perf build: Fix bpf-gcc skeleton codegen and CO-RE relocations
Date: Mon, 23 Nov 2026 04:09:10 +0000 [thread overview]
Message-ID: <sashiko-outbox-228649@kernel.org> (raw)
In-Reply-To: <20261123040151.4094997-1-irogers@google.com>
> When building perf with CC=gcc and bpf-gcc installed, commit
> 63bdd143c589 ("perf build: Support building BPF skeletons with bpf-gcc")
> selects bpf-gcc -O2 by default for tools/perf BPF skeletons. Several
> BPF skeletons compile with bpf-gcc -O2 yet fail at runtime during
> libbpf relocation or kernel BPF verification:
>
> 1. -fivopts strength-reduces bounded array loops over BPF map values
> (such as bperf_cgroup.bpf.c) into PTR_TO_MAP_VALUE != PTR_TO_MAP_VALUE
> end-pointer comparisons. In kernel/bpf/verifier.c, is_branch_taken()
> returns unknown for non-packet pointer comparisons, causing the
> verifier to explore one iteration past the map value end and reject
> the program with -EACCES. Pass -fno-ivopts so bpf-gcc preserves
> scalar loop induction variables.
>
> 2. -fipa-sra and -fpartial-inlining outline cold tails of static BPF
> [ ... ]
> checks (rejected with "pointer arithmetic on ptr_or_null_
> prohibited"). Disable those passes for bpf-gcc builds.
>
> Fixes: 63bdd143c589 ("perf build: Support building BPF skeletons with bpf-gcc")
> Signed-off-by: Ian Rogers <irogers@google.com>
Sashiko has reviewed this patch and found no issues.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261123040151.4094997-1-irogers@google.com?part=1
prev parent reply other threads:[~2026-11-23 4:09 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-23 4:01 [PATCH v1] perf build: Fix bpf-gcc skeleton codegen and CO-RE relocations Ian Rogers
2026-11-23 4:09 ` sashiko-bot [this message]
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-228649@kernel.org \
--to=sashiko-bot@kernel.org \
--cc=irogers@google.com \
--cc=linux-perf-users@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 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.