From mboxrd@z Thu Jan 1 00:00:00 1970 Delivery-date: Tue, 21 May 2024 19:15:02 +0200 Received: from metis.whiteo.stw.pengutronix.de ([2a0a:edc0:2:b01:1d::104]) by lore.white.stw.pengutronix.de with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1s9T4o-00CW9z-0c for lore@lore.pengutronix.de; Tue, 21 May 2024 19:15:02 +0200 Received: from localhost ([127.0.0.1] helo=metis.whiteo.stw.pengutronix.de) by metis.whiteo.stw.pengutronix.de with esmtp (Exim 4.92) (envelope-from ) id 1s9T4n-0001uY-RF; Tue, 21 May 2024 19:15:01 +0200 Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.whiteo.stw.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1s9T4h-0001uP-Pw; Tue, 21 May 2024 19:14:55 +0200 Received: from [2a0a:edc0:0:900:1d::77] (helo=ptz.office.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1s9T4h-002Py0-DU; Tue, 21 May 2024 19:14:55 +0200 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.96) (envelope-from ) id 1s9T4h-009YoO-16; Tue, 21 May 2024 19:14:55 +0200 From: =?UTF-8?q?Uwe=20Kleine-K=C3=B6nig?= To: ptxdist@pengutronix.de Date: Tue, 21 May 2024 19:14:53 +0200 Message-ID: <20240521171452.96051-2-u.kleine-koenig@pengutronix.de> X-Mailer: git-send-email 2.43.0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Developer-Signature: v=1; a=openpgp-sha256; l=1363; i=u.kleine-koenig@pengutronix.de; h=from:subject; bh=N8QP6h2gjCRzw5t5iuj15tX/hyRTlhEP1nskFv610NA=; b=owEBbQGS/pANAwAKAY+A+1h9Ev5OAcsmYgBmTNaM6lZE20h5vNUYPCBu3d63fhvbxu3QIB0PH jnV/u6nroqJATMEAAEKAB0WIQQ/gaxpOnoeWYmt/tOPgPtYfRL+TgUCZkzWjAAKCRCPgPtYfRL+ TkUfCACHKWeVEQ7BkwO24ohXDIfrGore597B/8TqdmV2NYCc4Btaic1Vj7QAkNTfd7YAngNkIzY 9P9Ztp/PZ7aItzkhfvOlD2EheHZQn0JhexD+RqdVD4vVaQrm693KRXiC9KJTayNg6ltTSL4bTzb 50rLzRGoI3IC4VxmGEHoLvM8CMrvYc4nXEvPiD90zvxTGLeya8+WeWnxmsXHIedIYG9F8hZrhTF +7fmVpCJUwaAKNjCSgBeR72pBvwTXIQpR5SNhaer2t+BfD3jym3tUKN7/k1MhcOQfm9hhdOEW4t w7Cyc+p9qVJ3LMRuB3aF8UkTxxd6XjEmpo0PDafvCuR9FWyt X-Developer-Key: i=u.kleine-koenig@pengutronix.de; a=openpgp; fpr=0D2511F322BFAB1C1580266BE2DCDD9132669BD6 Content-Transfer-Encoding: 8bit Subject: [ptxdist] [PATCH] kernel/perf: Fix host path leakage X-BeenThere: ptxdist@pengutronix.de X-Mailman-Version: 2.1.29 Precedence: list List-Id: PTXdist Development Mailing List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: ptxdist@pengutronix.de Sender: "ptxdist" X-SA-Exim-Connect-IP: 127.0.0.1 X-SA-Exim-Mail-From: ptxdist-bounces@pengutronix.de X-SA-Exim-Scanned: No (on metis.whiteo.stw.pengutronix.de); SAEximRunCond expanded to false The perf build scripts default to prefix=$HOME, resulting in: # perf script -l open(/home/ukl/libexec/perf-core/scripts) failed. Check "PERF_EXEC_PATH" env to set scripts dir. when I run ptxdist with HOME=/home/ukl. So set prefix explicitly. Signed-off-by: Uwe Kleine-König --- Hello, this obviously only improves the error message to: open(/usr/libexec/perf-core/scripts) failed only. Actually I'd like to call tools/perf_install. However I fail to see how I'd do that in the kernel's install stage with the right variables set and upstream is broken here (as of 6.9) which makes tools/perf_install fail with: /bin/sh: 1: cd: can't cd to $BUILDDIR/tools/perf/tools/perf/ and I fail to see where this happens. So here comes only a partial fix (which IMHO is worth applying anyhow). Best regards Uwe rules/kernel.make | 1 + 1 file changed, 1 insertion(+) diff --git a/rules/kernel.make b/rules/kernel.make index 0fe4f1e1b12a..24aa221e1bd0 100644 --- a/rules/kernel.make +++ b/rules/kernel.make @@ -207,6 +207,7 @@ KERNEL_TOOL_PERF_OPTS := \ -C $(KERNEL_DIR)/tools/perf \ O=$(KERNEL_BUILD_DIR)/tools/perf \ $(KERNEL_BASE_OPT) \ + prefix=/usr \ WERROR=0 \ NO_LIBPERL=1 \ NO_LIBPYTHON=1 \ base-commit: b114f7eb008dee7fab8140bf51cef436d7d57e60 -- 2.43.0