From: sashiko-bot@kernel.org
To: "Ian Rogers" <irogers@google.com>
Cc: linux-perf-users@vger.kernel.org, bpf@vger.kernel.org
Subject: Re: [PATCH v1 1/2] perf build: Support building BPF skeletons with bpf-gcc
Date: Tue, 13 Oct 2026 22:27:01 +0000 [thread overview]
Message-ID: <sashiko-outbox-170578@kernel.org> (raw)
In-Reply-To: <20261013221643.1815686-2-irogers@google.com>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Medium] perf build: bpf-gcc version check bypassed due to mutually exclusive GCC arguments
--
commit b2c0a31ec137ebce8b46644a6edfe507e7c3b298
Author: Ian Rogers <irogers@google.com>
perf build: Support building BPF skeletons with bpf-gcc
This commit supports building perf BPF skeletons with bpf-gcc (>= 14.0.0)
in addition to clang. It updates the build system to prefer bpf-gcc when
building with GCC, and falls back to Clang if bpf-gcc is unavailable or
too old.
> diff --git a/tools/perf/Makefile.config b/tools/perf/Makefile.config
> --- a/tools/perf/Makefile.config
> +++ b/tools/perf/Makefile.config
[ ... ]
> + define check_bpf_gcc
> + ifneq ($$(call get-executable,$$(BPF_GCC)),)
> + BPF_GCC_VERSION := $$(shell $$(BPF_GCC) -dumpfullversion -dumpversion 2>/dev/null)
[Severity: Medium]
Does passing both -dumpfullversion and -dumpversion simultaneously cause
GCC to fail with a fatal error?
If GCC rejects these mutually exclusive arguments, the error output is
suppressed by 2>/dev/null, resulting in BPF_GCC_VERSION evaluating to an
empty string.
> + ifneq ($$(call version-lt3,$$(BPF_GCC_VERSION),14.0.0),1)
> + have_bpf_gcc := 1
> + endif
When version-lt3 is called with an empty string against 14.0.0, the
underlying awk expression evaluates this as false (0). The outer check
ifneq (0,1) then evaluates to true, unconditionally setting
have_bpf_gcc := 1.
Can this regression result in the version check being completely bypassed,
allowing older, unsupported versions of bpf-gcc to be incorrectly
permitted to build BPF skeletons instead of properly falling back to Clang?
> + endif
> + endef
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261013221643.1815686-1-irogers@google.com?part=1
next prev parent reply other threads:[~2026-10-13 22:27 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-13 22:16 [PATCH v1 0/2] perf build: Support building BPF skeletons with bpf-gcc Ian Rogers
2026-10-13 22:16 ` [PATCH v1 1/2] " Ian Rogers
2026-10-13 22:27 ` sashiko-bot [this message]
2026-10-13 22:16 ` [PATCH v1 2/2] perf test make: Add BPF skeleton build tests for clang and bpf-gcc Ian Rogers
2026-10-13 22:23 ` sashiko-bot
2026-10-13 23:14 ` [PATCH v2 0/2] perf build: Support building BPF skeletons with bpf-gcc Ian Rogers
2026-10-13 23:14 ` [PATCH v2 1/2] " Ian Rogers
2026-10-13 23:22 ` sashiko-bot
2026-10-13 23:14 ` [PATCH v2 2/2] perf test make: Add BPF skeleton build tests for clang and bpf-gcc Ian Rogers
2026-10-13 23:24 ` 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=sashiko-outbox-170578@kernel.org \
--to=sashiko-bot@kernel.org \
--cc=bpf@vger.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox