From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796347682; b=VHEx5bvXxRhPDqlZDbYpG337KF1gVpN8ltgwZZsM5eJCZMJRhRHm9V+Uj0zTFVvSwnQG cmFDw0Iybz/d9ueHJdoJ4cRloy8pJp5G1d93yunV15fPcj8gJIDxUIcsM3xqT4tkE+kjL +iT7jU1orCD3VWDx2T2us0Bd80Ih2Pd7qZpqkCRMO5cG+7+W0787wW5sJlNfym2rz3x0N 9gvgLzXaUgOKKUGca6uxvYEoO8W7EFbfWievdq9euy3f/pPmQRRFoanSPqU4Qd0CoehCO 2tmie6k7oJsEGPegcY6n6tGmgYgDQidSsMQDElLkTzYIev/8YAj5OAdjH9BuSfYWqZw== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796347682; h=Received:DKIM-Signature:Message-ID:From:Subject:Reply-To:To:Cc: In-Reply-To:References:Content-Type:Content-Transfer-Encoding:Date; bh=vd+H8d096HYseRbn1+nqjdxj0TK8i2d/eD0yRqKilxg=; b=H2hXQAswkr77pYV4yKJwdWyrksgh9lrHCNw/S3bwOKP4L5WQyFcAsq1daqIweuG/QC4k FhTj4AvKNCzsJXI/LZIBTQ4Srf7088fx5aeocZvQt3b/D2EPfMoNM9uYpZkD31OJZyDFR B8kcYdEqz9bS8xxR03uwyL70u+PT4DHTR4JdQ3ZIcMVAWIclIv91Gw5G3tWJm0201+H/9 Pt6wM+PCFZI3ZhbVYxGjeee1oGMXxSAl+73spHvorrpo8LbXDRQNKLCb2DAnFvakhKa2d N/FxKA0ZefrQ04bX3xiHXDE5mVmWPj/CXPe+w76yvGXfFd9dxlOE5PNXtZUXnVHNMIA== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=WkmMj+n8; arc=none smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 46C11606A336 for ; Fri, 4 Dec 2026 01:28:02 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=WkmMj+n8 Received: by smtp.kernel.org (Postfix) with ESMTPSA id C482B1F00931; Fri, 4 Dec 2026 01:28:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1796347681; bh=vd+H8d096HYseRbn1+nqjdxj0TK8i2d/eD0yRqKilxg=; h=From:Subject:Reply-To:To:Cc:In-Reply-To:References:Date; b=WkmMj+n87JpSFVQjZFi8wag42LM7V5/M1lQC8m8F7L4BQi18HS0CzNt4szh0snWUg FH8dU+XSg2C5fCSF7PiYfe2iaBQxrYUGrmYgFoKCBWlZHfzoKEjb6qS+sqvv1flGjD aqLyIYaVkUIGozctUKBwb0EfA5cqs+i2Iv97MhEws5DnxyNfZYzEoPHLs3HSvjyDFA 7MfFDAfdPPzUKP8YPx/GjGJymavWbgTxRZcyS+jaVHcB+JPiwH/w2Z9kWFvIjnXKzG y868oukdmQna94+IXp2xxJ3Z8gvnIMGN/jEJ36tx2E8Se4zBB2nNP7tjPCx/EEHLGc pbkXsf8GPPnpA== Message-ID: From: sashiko-bot@kernel.org Subject: Re: [PATCH v2] perf build: Fix bpf-gcc skeleton codegen and CO-RE relocations Reply-To: sashiko-reviews@lists.linux.dev To: "Ian Rogers" Cc: linux-perf-users@vger.kernel.org In-Reply-To: <20261204011619.1955782-1-irogers@google.com> References: <20261204011619.1955782-1-irogers@google.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Date: Fri, 04 Dec 2026 01:28:01 +0000 X-Mailing-List: linux-perf-users@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list > When building perf with CC=3Dgcc 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: >=20 > 1. -fivopts strength-reduces bounded array loops over BPF map values > (such as bperf_cgroup.bpf.c) into PTR_TO_MAP_VALUE !=3D PTR_TO_MAP_VAL= UE > 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. >=20 > 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. >=20 > Fixes: 63bdd143c589 ("perf build: Support building BPF skeletons with bpf= -gcc") > Signed-off-by: Ian Rogers Sashiko has reviewed this patch and found no issues. --=20 Sashiko AI review =C2=B7 https://sashiko.dev/#/patchset/20261204011619.1955= 782-1-irogers@google.com?part=3D1