mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
From: "Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>
To: ptxdist@pengutronix.de
Subject: [ptxdist] [PATCH] kernel/perf: Fix host path leakage
Date: Tue, 21 May 2024 19:14:53 +0200	[thread overview]
Message-ID: <20240521171452.96051-2-u.kleine-koenig@pengutronix.de> (raw)

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 <u.kleine-koenig@pengutronix.de>
---
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




             reply	other threads:[~2024-05-21 17:15 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-21 17:14 Uwe Kleine-König [this message]
2024-06-10 19:41 ` [ptxdist] [APPLIED] " Michael Olbrich

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=20240521171452.96051-2-u.kleine-koenig@pengutronix.de \
    --to=u.kleine-koenig@pengutronix.de \
    --cc=ptxdist@pengutronix.de \
    /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