lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20251203035526.1237602-1-jon@nutanix.com>
Date: Tue,  2 Dec 2025 20:55:26 -0700
From: Jon Kohler <jon@...anix.com>
To: Peter Zijlstra <peterz@...radead.org>, Ingo Molnar <mingo@...hat.com>,
        Arnaldo Carvalho de Melo <acme@...nel.org>,
        Namhyung Kim <namhyung@...nel.org>,
        Mark Rutland <mark.rutland@....com>,
        Alexander Shishkin <alexander.shishkin@...ux.intel.com>,
        Jiri Olsa <jolsa@...nel.org>, Ian Rogers <irogers@...gle.com>,
        Adrian Hunter <adrian.hunter@...el.com>,
        James Clark <james.clark@...aro.org>,
        Tomas Glozar <tglozar@...hat.com>, linux-perf-users@...r.kernel.org,
        linux-kernel@...r.kernel.org, bpf@...r.kernel.org
Cc: Jon Kohler <jon@...anix.com>, stable@...r.kernel.org
Subject: [PATCH] perf build: build BPF skeletons with fPIC

Fix Makefile.perf to ensure that bpf skeletons are built with fPIC.

When building with BUILD_BPF_SKEL=1, bpf_skel's was not getting built
with fPIC, seeing compilation failures like:

/usr/bin/ld: /builddir/.../tools/perf/util/bpf_skel/.tmp/bootstrap/main.o:
  relocation R_X86_64_32 against `.rodata.str1.8' can not be used when
  making a PIE object; recompile with -fPIE

Bisected down to 6.18 commit a39516805992 ("tools build: Don't assume
libtracefs-devel is always available").

Fixes: a39516805992 ("tools build: Don't assume libtracefs-devel is always available")
Cc: stable@...r.kernel.org
Signed-off-by: Jon Kohler <jon@...anix.com>
---
 tools/perf/Makefile.perf | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/perf/Makefile.perf b/tools/perf/Makefile.perf
index 02f87c49801f..4557c2e89e88 100644
--- a/tools/perf/Makefile.perf
+++ b/tools/perf/Makefile.perf
@@ -1211,7 +1211,7 @@ endif
 
 $(BPFTOOL): | $(SKEL_TMP_OUT)
 	$(Q)CFLAGS= $(MAKE) -C ../bpf/bpftool \
-		OUTPUT=$(SKEL_TMP_OUT)/ bootstrap
+		EXTRA_CFLAGS="-fPIC" OUTPUT=$(SKEL_TMP_OUT)/ bootstrap
 
 # Paths to search for a kernel to generate vmlinux.h from.
 VMLINUX_BTF_ELF_PATHS ?= $(if $(O),$(O)/vmlinux)			\
-- 
2.43.0


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ