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: <6b7c6221032fe9ca888d9905479d0bd502f583f7.camel@icloud.com>
Date: Mon, 27 Oct 2025 23:00:33 -0500
From: Zoe Gates <zoe.blair.gates@...oud.com>
To: peterz@...radead.org, mingo@...hat.com, acme@...nel.org,
 namhyung@...nel.org
Cc: mark.rutland@....com, alexander.shishkin@...ux.intel.com,
 jolsa@...nel.org, 	irogers@...gle.com, adrian.hunter@...el.com,
 zoe@...cities.dev, 	yujie.liu@...el.com, sandipan.das@....com,
 leo.yan@....com, 	linux-perf-users@...r.kernel.org,
 linux-kernel@...r.kernel.org
Subject: [PATCH 1/3] perf trace: Fix filter expansion length typo

>From 08185c5be135eb83194a49e593be9258cec78d77 Mon Sep 17 00:00:00 2001
From: Zoe Gates <zoe@...cities.dev>
Date: Mon, 27 Oct 2025 22:14:24 -0500
Subject: [PATCH 1/3] perf trace: Fix filter expansion length typo

Keep the filter expansion helper readable by using
expansion_length everywhere and wrapping the scnprintf call.

Signed-off-by: Zoe Gates <zoe@...cities.dev>
---
 tools/perf/Documentation/perf-script.txt | 2 +-
 tools/perf/builtin-trace.c               | 7 +++++--
 2 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/tools/perf/Documentation/perf-script.txt
b/tools/perf/Documentation/perf-script.txt
index 28bec7e78bc8..e136ca35d380 100644
--- a/tools/perf/Documentation/perf-script.txt
+++ b/tools/perf/Documentation/perf-script.txt
@@ -262,7 +262,7 @@ OPTIONS
 	is printed. This is the full execution path leading to the
sample. This is only supported when the
 	sample was recorded with perf record -b or -j any.
 
-	Use brstackinsnlen to print the brstackinsn lenght. For
example, you
+	Use brstackinsnlen to print the brstackinsn length. For
example, you
 	can’t know the next sequential instruction after an
unconditional branch unless
 	you calculate that based on its length.
 
diff --git a/tools/perf/builtin-trace.c b/tools/perf/builtin-trace.c
index c607f39b8c8b..ae5fabf91c96 100644
--- a/tools/perf/builtin-trace.c
+++ b/tools/perf/builtin-trace.c
@@ -4291,7 +4291,10 @@ static int trace__expand_filter(struct trace
*trace, struct evsel *evsel)
 
 				if (fmt->strtoul(right, right_size,
&syscall_arg, &val)) {
 					char *n, expansion[19];
-					int expansion_lenght =
scnprintf(expansion, sizeof(expansion), "%#" PRIx64, val);
+					int expansion_length;
+
+					expansion_length =
scnprintf(expansion, sizeof(expansion),
+								    
"%#" PRIx64, val);
 					int expansion_offset = right -
new_filter;
 
 					pr_debug("%s", expansion);
@@ -4303,7 +4306,7 @@ static int trace__expand_filter(struct trace
*trace, struct evsel *evsel)
 					}
 					if (new_filter != evsel-
>filter)
 						free(new_filter);
-					left = n + expansion_offset +
expansion_lenght;
+					left = n + expansion_offset +
expansion_length;
 					new_filter = n;
 				} else {
 					pr_err("\"%.*s\" not found for
\"%s\" in \"%s\", can't set filter \"%s\"\n",

base-commit: fd57572253bc356330dbe5b233c2e1d8426c66fd
-- 
2.51.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ