From 615c8c41ee4f9291bdd437751e96671d5eaf4cbb Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Sat, 15 Jun 2024 13:27:35 +0200 Subject: [PATCH] drop a bunch of perf patches --- ...ate-add-demangle-and-demangle-kernel.patch | 62 --- ...t-rid-of-duplicate-group-option-item.patch | 48 --- ...issing-libgen.h-header-needed-for-us.patch | 53 --- queue-4.19/series | 3 - ...ate-add-demangle-and-demangle-kernel.patch | 62 --- ...t-rid-of-duplicate-group-option-item.patch | 48 --- ...nals-inject-build-id-fix-trap-divide.patch | 55 --- ...the-right-prefix-for-struct-evlist-s.patch | 144 ------- ...x-unassigned-instruction-op-discover.patch | 73 ---- ...issing-libgen.h-header-needed-for-us.patch | 53 --- ...te-session-after-stopping-sideband-t.patch | 83 ---- ...id-segv-in-report__setup_sample_type.patch | 47 --- ...display-metric-header-for-non-leader.patch | 90 ----- ...i-exit-screen-refresh-race-condition.patch | 75 ---- .../perf-ui-browser-avoid-segv-on-title.patch | 46 --- ...r-don-t-save-pointer-to-stack-memory.patch | 143 ------- .../perf-ui-update-use-of-pthread-mutex.patch | 382 ------------------ queue-5.10/series | 13 - ...t-rid-of-duplicate-group-option-item.patch | 48 --- ...nals-inject-build-id-fix-trap-divide.patch | 55 --- ...file-leak-in-daemon_session__control.patch | 59 --- ...erf-docs-document-bpf-event-modifier.patch | 48 --- ...x-unassigned-instruction-op-discover.patch | 73 ---- ...issing-libgen.h-header-needed-for-us.patch | 53 --- ...te-session-after-stopping-sideband-t.patch | 83 ---- ...id-segv-in-report__setup_sample_type.patch | 47 --- ...display-metric-header-for-non-leader.patch | 90 ----- ...i-exit-screen-refresh-race-condition.patch | 75 ---- .../perf-ui-browser-avoid-segv-on-title.patch | 46 --- ...r-don-t-save-pointer-to-stack-memory.patch | 143 ------- .../perf-ui-update-use-of-pthread-mutex.patch | 382 ------------------ queue-5.15/series | 13 - ...ate-add-demangle-and-demangle-kernel.patch | 62 --- ...t-rid-of-duplicate-group-option-item.patch | 48 --- ...issing-libgen.h-header-needed-for-us.patch | 53 --- ...display-metric-header-for-non-leader.patch | 90 ----- ...i-exit-screen-refresh-race-condition.patch | 75 ---- .../perf-ui-browser-avoid-segv-on-title.patch | 46 --- ...r-don-t-save-pointer-to-stack-memory.patch | 143 ------- .../perf-ui-update-use-of-pthread-mutex.patch | 382 ------------------ queue-5.4/series | 8 - 41 files changed, 3602 deletions(-) delete mode 100644 queue-4.19/perf-annotate-add-demangle-and-demangle-kernel.patch delete mode 100644 queue-4.19/perf-annotate-get-rid-of-duplicate-group-option-item.patch delete mode 100644 queue-4.19/perf-probe-add-missing-libgen.h-header-needed-for-us.patch delete mode 100644 queue-5.10/perf-annotate-add-demangle-and-demangle-kernel.patch delete mode 100644 queue-5.10/perf-annotate-get-rid-of-duplicate-group-option-item.patch delete mode 100644 queue-5.10/perf-bench-internals-inject-build-id-fix-trap-divide.patch delete mode 100644 queue-5.10/perf-evlist-use-the-right-prefix-for-struct-evlist-s.patch delete mode 100644 queue-5.10/perf-intel-pt-fix-unassigned-instruction-op-discover.patch delete mode 100644 queue-5.10/perf-probe-add-missing-libgen.h-header-needed-for-us.patch delete mode 100644 queue-5.10/perf-record-delete-session-after-stopping-sideband-t.patch delete mode 100644 queue-5.10/perf-report-avoid-segv-in-report__setup_sample_type.patch delete mode 100644 queue-5.10/perf-stat-don-t-display-metric-header-for-non-leader.patch delete mode 100644 queue-5.10/perf-top-fix-tui-exit-screen-refresh-race-condition.patch delete mode 100644 queue-5.10/perf-ui-browser-avoid-segv-on-title.patch delete mode 100644 queue-5.10/perf-ui-browser-don-t-save-pointer-to-stack-memory.patch delete mode 100644 queue-5.10/perf-ui-update-use-of-pthread-mutex.patch delete mode 100644 queue-5.15/perf-annotate-get-rid-of-duplicate-group-option-item.patch delete mode 100644 queue-5.15/perf-bench-internals-inject-build-id-fix-trap-divide.patch delete mode 100644 queue-5.15/perf-daemon-fix-file-leak-in-daemon_session__control.patch delete mode 100644 queue-5.15/perf-docs-document-bpf-event-modifier.patch delete mode 100644 queue-5.15/perf-intel-pt-fix-unassigned-instruction-op-discover.patch delete mode 100644 queue-5.15/perf-probe-add-missing-libgen.h-header-needed-for-us.patch delete mode 100644 queue-5.15/perf-record-delete-session-after-stopping-sideband-t.patch delete mode 100644 queue-5.15/perf-report-avoid-segv-in-report__setup_sample_type.patch delete mode 100644 queue-5.15/perf-stat-don-t-display-metric-header-for-non-leader.patch delete mode 100644 queue-5.15/perf-top-fix-tui-exit-screen-refresh-race-condition.patch delete mode 100644 queue-5.15/perf-ui-browser-avoid-segv-on-title.patch delete mode 100644 queue-5.15/perf-ui-browser-don-t-save-pointer-to-stack-memory.patch delete mode 100644 queue-5.15/perf-ui-update-use-of-pthread-mutex.patch delete mode 100644 queue-5.4/perf-annotate-add-demangle-and-demangle-kernel.patch delete mode 100644 queue-5.4/perf-annotate-get-rid-of-duplicate-group-option-item.patch delete mode 100644 queue-5.4/perf-probe-add-missing-libgen.h-header-needed-for-us.patch delete mode 100644 queue-5.4/perf-stat-don-t-display-metric-header-for-non-leader.patch delete mode 100644 queue-5.4/perf-top-fix-tui-exit-screen-refresh-race-condition.patch delete mode 100644 queue-5.4/perf-ui-browser-avoid-segv-on-title.patch delete mode 100644 queue-5.4/perf-ui-browser-don-t-save-pointer-to-stack-memory.patch delete mode 100644 queue-5.4/perf-ui-update-use-of-pthread-mutex.patch diff --git a/queue-4.19/perf-annotate-add-demangle-and-demangle-kernel.patch b/queue-4.19/perf-annotate-add-demangle-and-demangle-kernel.patch deleted file mode 100644 index dcaae018456..00000000000 --- a/queue-4.19/perf-annotate-add-demangle-and-demangle-kernel.patch +++ /dev/null @@ -1,62 +0,0 @@ -From ffe555e5e0ce9dbc178c94896fadb680a04d39c6 Mon Sep 17 00:00:00 2001 -From: Sasha Levin -Date: Tue, 30 Mar 2021 20:33:55 +0200 -Subject: perf annotate: Add --demangle and --demangle-kernel -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -From: Martin Liška - -[ Upstream commit 3406ac5347dbf64ab9f7b137ed25a18493f5ea2d ] - -'perf annotate' supports --symbol but it's impossible to filter a C++ -symbol. With --no-demangle one can filter easily by mangled function -name. - -Signed-off-by: Martin Liška -Link: http://lore.kernel.org/lkml/c3c7e959-9f7f-18e2-e795-f604275cbac3@suse.cz -Signed-off-by: Arnaldo Carvalho de Melo -Stable-dep-of: 374af9f1f06b ("perf annotate: Get rid of duplicate --group option item") -Signed-off-by: Sasha Levin ---- - tools/perf/Documentation/perf-annotate.txt | 7 +++++++ - tools/perf/builtin-annotate.c | 4 ++++ - 2 files changed, 11 insertions(+) - -diff --git a/tools/perf/Documentation/perf-annotate.txt b/tools/perf/Documentation/perf-annotate.txt -index e8c972f89357d..066ecfffbf4ed 100644 ---- a/tools/perf/Documentation/perf-annotate.txt -+++ b/tools/perf/Documentation/perf-annotate.txt -@@ -118,6 +118,13 @@ OPTIONS - --group:: - Show event group information together - -+--demangle:: -+ Demangle symbol names to human readable form. It's enabled by default, -+ disable with --no-demangle. -+ -+--demangle-kernel:: -+ Demangle kernel symbol names to human readable form (for C++ kernels). -+ - --percent-type:: - Set annotation percent type from following choices: - global-period, local-period, global-hits, local-hits -diff --git a/tools/perf/builtin-annotate.c b/tools/perf/builtin-annotate.c -index 830481b8db26a..d12430fe9c783 100644 ---- a/tools/perf/builtin-annotate.c -+++ b/tools/perf/builtin-annotate.c -@@ -533,6 +533,10 @@ int cmd_annotate(int argc, const char **argv) - "Specify disassembler style (e.g. -M intel for intel syntax)"), - OPT_STRING(0, "objdump", &annotate.opts.objdump_path, "path", - "objdump binary to use for disassembly and annotations"), -+ OPT_BOOLEAN(0, "demangle", &symbol_conf.demangle, -+ "Enable symbol demangling"), -+ OPT_BOOLEAN(0, "demangle-kernel", &symbol_conf.demangle_kernel, -+ "Enable kernel symbol demangling"), - OPT_BOOLEAN(0, "group", &symbol_conf.event_group, - "Show event group information together"), - OPT_BOOLEAN(0, "show-total-period", &symbol_conf.show_total_period, --- -2.43.0 - diff --git a/queue-4.19/perf-annotate-get-rid-of-duplicate-group-option-item.patch b/queue-4.19/perf-annotate-get-rid-of-duplicate-group-option-item.patch deleted file mode 100644 index 631f550f6ab..00000000000 --- a/queue-4.19/perf-annotate-get-rid-of-duplicate-group-option-item.patch +++ /dev/null @@ -1,48 +0,0 @@ -From 4e48c899ca93506e41f82ffc104535acccf7f5f9 Mon Sep 17 00:00:00 2001 -From: Sasha Levin -Date: Fri, 22 Mar 2024 15:43:12 -0700 -Subject: perf annotate: Get rid of duplicate --group option item - -From: Namhyung Kim - -[ Upstream commit 374af9f1f06b5e991c810d2e4983d6f58df32136 ] - -The options array in cmd_annotate() has duplicate --group options. It -only needs one and let's get rid of the other. - - $ perf annotate -h 2>&1 | grep group - --group Show event group information together - --group Show event group information together - -Fixes: 7ebaf4890f63eb90 ("perf annotate: Support '--group' option") -Reviewed-by: Kan Liang -Signed-off-by: Namhyung Kim -Cc: Adrian Hunter -Cc: Ian Rogers -Cc: Ingo Molnar -Cc: Jin Yao -Cc: Jiri Olsa -Cc: Peter Zijlstra -Link: https://lore.kernel.org/r/20240322224313.423181-1-namhyung@kernel.org -Signed-off-by: Arnaldo Carvalho de Melo -Signed-off-by: Sasha Levin ---- - tools/perf/builtin-annotate.c | 2 -- - 1 file changed, 2 deletions(-) - -diff --git a/tools/perf/builtin-annotate.c b/tools/perf/builtin-annotate.c -index d12430fe9c783..17d008b706c92 100644 ---- a/tools/perf/builtin-annotate.c -+++ b/tools/perf/builtin-annotate.c -@@ -537,8 +537,6 @@ int cmd_annotate(int argc, const char **argv) - "Enable symbol demangling"), - OPT_BOOLEAN(0, "demangle-kernel", &symbol_conf.demangle_kernel, - "Enable kernel symbol demangling"), -- OPT_BOOLEAN(0, "group", &symbol_conf.event_group, -- "Show event group information together"), - OPT_BOOLEAN(0, "show-total-period", &symbol_conf.show_total_period, - "Show a column with the sum of periods"), - OPT_BOOLEAN('n', "show-nr-samples", &symbol_conf.show_nr_samples, --- -2.43.0 - diff --git a/queue-4.19/perf-probe-add-missing-libgen.h-header-needed-for-us.patch b/queue-4.19/perf-probe-add-missing-libgen.h-header-needed-for-us.patch deleted file mode 100644 index d644e3ab61e..00000000000 --- a/queue-4.19/perf-probe-add-missing-libgen.h-header-needed-for-us.patch +++ /dev/null @@ -1,53 +0,0 @@ -From 04af210e5a2bad24c4c984d1bb1cd6e64770de59 Mon Sep 17 00:00:00 2001 -From: Sasha Levin -Date: Thu, 21 Mar 2024 11:13:30 -0300 -Subject: perf probe: Add missing libgen.h header needed for using basename() - -From: Arnaldo Carvalho de Melo - -[ Upstream commit 581037151910126a7934e369e4b6ac70eda9a703 ] - -This prototype is obtained indirectly, by luck, from some other header -in probe-event.c in most systems, but recently exploded on alpine:edge: - - 8 13.39 alpine:edge : FAIL gcc version 13.2.1 20240309 (Alpine 13.2.1_git20240309) - util/probe-event.c: In function 'convert_exec_to_group': - util/probe-event.c:225:16: error: implicit declaration of function 'basename' [-Werror=implicit-function-declaration] - 225 | ptr1 = basename(exec_copy); - | ^~~~~~~~ - util/probe-event.c:225:14: error: assignment to 'char *' from 'int' makes pointer from integer without a cast [-Werror=int-conversion] - 225 | ptr1 = basename(exec_copy); - | ^ - cc1: all warnings being treated as errors - make[3]: *** [/git/perf-6.8.0/tools/build/Makefile.build:158: util] Error 2 - -Fix it by adding the libgen.h header where basename() is prototyped. - -Fixes: fb7345bbf7fad9bf ("perf probe: Support basic dwarf-based operations on uprobe events") -Cc: Masami Hiramatsu -Cc: Adrian Hunter -Cc: Ian Rogers -Cc: Jiri Olsa -Cc: Namhyung Kim -Link: https://lore.kernel.org/lkml/ -Signed-off-by: Arnaldo Carvalho de Melo -Signed-off-by: Sasha Levin ---- - tools/perf/util/probe-event.c | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/tools/perf/util/probe-event.c b/tools/perf/util/probe-event.c -index 4aeb3e1399010..c4c72d5c82ccc 100644 ---- a/tools/perf/util/probe-event.c -+++ b/tools/perf/util/probe-event.c -@@ -25,6 +25,7 @@ - #include - #include - #include -+#include - #include - #include - #include --- -2.43.0 - diff --git a/queue-4.19/series b/queue-4.19/series index 81f3f90c834..4a620a77011 100644 --- a/queue-4.19/series +++ b/queue-4.19/series @@ -82,10 +82,7 @@ netrom-fix-possible-dead-lock-in-nr_rt_ioctl.patch af_packet-do-not-call-packet_read_pending-from-tpack.patch sched-topology-don-t-set-sd_balance_wake-on-cpuset-d.patch sched-fair-allow-disabling-sched_balance_newidle-wit.patch -perf-probe-add-missing-libgen.h-header-needed-for-us.patch greybus-lights-check-return-of-get_channel_from_mode.patch -perf-annotate-add-demangle-and-demangle-kernel.patch -perf-annotate-get-rid-of-duplicate-group-option-item.patch dmaengine-idma64-add-check-for-dma_set_max_seg_size.patch firmware-dmi-id-add-a-release-callback-function.patch serial-max3100-lock-port-lock-when-calling-uart_hand.patch diff --git a/queue-5.10/perf-annotate-add-demangle-and-demangle-kernel.patch b/queue-5.10/perf-annotate-add-demangle-and-demangle-kernel.patch deleted file mode 100644 index 04dc5b215aa..00000000000 --- a/queue-5.10/perf-annotate-add-demangle-and-demangle-kernel.patch +++ /dev/null @@ -1,62 +0,0 @@ -From 5c4f71950a66fe00f105ee3cf400a58c5508034e Mon Sep 17 00:00:00 2001 -From: Sasha Levin -Date: Tue, 30 Mar 2021 20:33:55 +0200 -Subject: perf annotate: Add --demangle and --demangle-kernel -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -From: Martin Liška - -[ Upstream commit 3406ac5347dbf64ab9f7b137ed25a18493f5ea2d ] - -'perf annotate' supports --symbol but it's impossible to filter a C++ -symbol. With --no-demangle one can filter easily by mangled function -name. - -Signed-off-by: Martin Liška -Link: http://lore.kernel.org/lkml/c3c7e959-9f7f-18e2-e795-f604275cbac3@suse.cz -Signed-off-by: Arnaldo Carvalho de Melo -Stable-dep-of: 374af9f1f06b ("perf annotate: Get rid of duplicate --group option item") -Signed-off-by: Sasha Levin ---- - tools/perf/Documentation/perf-annotate.txt | 7 +++++++ - tools/perf/builtin-annotate.c | 4 ++++ - 2 files changed, 11 insertions(+) - -diff --git a/tools/perf/Documentation/perf-annotate.txt b/tools/perf/Documentation/perf-annotate.txt -index 1b5042f134a86..80c1be5d566cb 100644 ---- a/tools/perf/Documentation/perf-annotate.txt -+++ b/tools/perf/Documentation/perf-annotate.txt -@@ -124,6 +124,13 @@ OPTIONS - --group:: - Show event group information together - -+--demangle:: -+ Demangle symbol names to human readable form. It's enabled by default, -+ disable with --no-demangle. -+ -+--demangle-kernel:: -+ Demangle kernel symbol names to human readable form (for C++ kernels). -+ - --percent-type:: - Set annotation percent type from following choices: - global-period, local-period, global-hits, local-hits -diff --git a/tools/perf/builtin-annotate.c b/tools/perf/builtin-annotate.c -index 4940d10074c3e..8059cf12cce86 100644 ---- a/tools/perf/builtin-annotate.c -+++ b/tools/perf/builtin-annotate.c -@@ -538,6 +538,10 @@ int cmd_annotate(int argc, const char **argv) - "Strip first N entries of source file path name in programs (with --prefix)"), - OPT_STRING(0, "objdump", &annotate.opts.objdump_path, "path", - "objdump binary to use for disassembly and annotations"), -+ OPT_BOOLEAN(0, "demangle", &symbol_conf.demangle, -+ "Enable symbol demangling"), -+ OPT_BOOLEAN(0, "demangle-kernel", &symbol_conf.demangle_kernel, -+ "Enable kernel symbol demangling"), - OPT_BOOLEAN(0, "group", &symbol_conf.event_group, - "Show event group information together"), - OPT_BOOLEAN(0, "show-total-period", &symbol_conf.show_total_period, --- -2.43.0 - diff --git a/queue-5.10/perf-annotate-get-rid-of-duplicate-group-option-item.patch b/queue-5.10/perf-annotate-get-rid-of-duplicate-group-option-item.patch deleted file mode 100644 index 0fbb10a5383..00000000000 --- a/queue-5.10/perf-annotate-get-rid-of-duplicate-group-option-item.patch +++ /dev/null @@ -1,48 +0,0 @@ -From 70ad563333c47fe171be973657fae186560e9fbb Mon Sep 17 00:00:00 2001 -From: Sasha Levin -Date: Fri, 22 Mar 2024 15:43:12 -0700 -Subject: perf annotate: Get rid of duplicate --group option item - -From: Namhyung Kim - -[ Upstream commit 374af9f1f06b5e991c810d2e4983d6f58df32136 ] - -The options array in cmd_annotate() has duplicate --group options. It -only needs one and let's get rid of the other. - - $ perf annotate -h 2>&1 | grep group - --group Show event group information together - --group Show event group information together - -Fixes: 7ebaf4890f63eb90 ("perf annotate: Support '--group' option") -Reviewed-by: Kan Liang -Signed-off-by: Namhyung Kim -Cc: Adrian Hunter -Cc: Ian Rogers -Cc: Ingo Molnar -Cc: Jin Yao -Cc: Jiri Olsa -Cc: Peter Zijlstra -Link: https://lore.kernel.org/r/20240322224313.423181-1-namhyung@kernel.org -Signed-off-by: Arnaldo Carvalho de Melo -Signed-off-by: Sasha Levin ---- - tools/perf/builtin-annotate.c | 2 -- - 1 file changed, 2 deletions(-) - -diff --git a/tools/perf/builtin-annotate.c b/tools/perf/builtin-annotate.c -index 8059cf12cce86..d8e8359c97a15 100644 ---- a/tools/perf/builtin-annotate.c -+++ b/tools/perf/builtin-annotate.c -@@ -542,8 +542,6 @@ int cmd_annotate(int argc, const char **argv) - "Enable symbol demangling"), - OPT_BOOLEAN(0, "demangle-kernel", &symbol_conf.demangle_kernel, - "Enable kernel symbol demangling"), -- OPT_BOOLEAN(0, "group", &symbol_conf.event_group, -- "Show event group information together"), - OPT_BOOLEAN(0, "show-total-period", &symbol_conf.show_total_period, - "Show a column with the sum of periods"), - OPT_BOOLEAN('n', "show-nr-samples", &symbol_conf.show_nr_samples, --- -2.43.0 - diff --git a/queue-5.10/perf-bench-internals-inject-build-id-fix-trap-divide.patch b/queue-5.10/perf-bench-internals-inject-build-id-fix-trap-divide.patch deleted file mode 100644 index 365ddc16183..00000000000 --- a/queue-5.10/perf-bench-internals-inject-build-id-fix-trap-divide.patch +++ /dev/null @@ -1,55 +0,0 @@ -From 954de3a31c3ebb3d0b512edd437f3d46adc2b494 Mon Sep 17 00:00:00 2001 -From: Sasha Levin -Date: Tue, 7 May 2024 14:50:26 +0800 -Subject: perf bench internals inject-build-id: Fix trap divide when collecting - just one DSO - -From: He Zhe - -[ Upstream commit d9180e23fbfa3875424d3a6b28b71b072862a52a ] - -'perf bench internals inject-build-id' suffers from the following error when -only one DSO is collected. - - # perf bench internals inject-build-id -v - Collected 1 DSOs - traps: internals-injec[2305] trap divide error - ip:557566ba6394 sp:7ffd4de97fe0 error:0 in perf[557566b2a000+23d000] - Build-id injection benchmark - Iteration #1 - Floating point exception - -This patch removes the unnecessary minus one from the divisor which also -corrects the randomization range. - -Signed-off-by: He Zhe -Fixes: 0bf02a0d80427f26 ("perf bench: Add build-id injection benchmark") -Cc: Adrian Hunter -Cc: Alexander Shishkin -Cc: Ian Rogers -Cc: Jiri Olsa -Cc: Mark Rutland -Cc: Namhyung Kim -Link: https://lore.kernel.org/r/20240507065026.2652929-1-zhe.he@windriver.com -Signed-off-by: Arnaldo Carvalho de Melo -Signed-off-by: Sasha Levin ---- - tools/perf/bench/inject-buildid.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/tools/perf/bench/inject-buildid.c b/tools/perf/bench/inject-buildid.c -index f4ec01da8da68..922b3c3837642 100644 ---- a/tools/perf/bench/inject-buildid.c -+++ b/tools/perf/bench/inject-buildid.c -@@ -361,7 +361,7 @@ static int inject_build_id(struct bench_data *data, u64 *max_rss) - return -1; - - for (i = 0; i < nr_mmaps; i++) { -- int idx = rand() % (nr_dsos - 1); -+ int idx = rand() % nr_dsos; - struct bench_dso *dso = &dsos[idx]; - u64 timestamp = rand() % 1000000; - --- -2.43.0 - diff --git a/queue-5.10/perf-evlist-use-the-right-prefix-for-struct-evlist-s.patch b/queue-5.10/perf-evlist-use-the-right-prefix-for-struct-evlist-s.patch deleted file mode 100644 index c69444a5820..00000000000 --- a/queue-5.10/perf-evlist-use-the-right-prefix-for-struct-evlist-s.patch +++ /dev/null @@ -1,144 +0,0 @@ -From d6856c4a1a34386a80b784789774a285afb3080a Mon Sep 17 00:00:00 2001 -From: Sasha Levin -Date: Mon, 30 Nov 2020 09:40:10 -0300 -Subject: perf evlist: Use the right prefix for 'struct evlist' sideband thread - methods - -From: Arnaldo Carvalho de Melo - -[ Upstream commit 08c83997ca87f9e162563a59ea43eabadc9e4231 ] - -perf_evlist__ is for 'struct perf_evlist' methods, in tools/lib/perf/, -go on completing this split. - -Cc: Adrian Hunter -Cc: Ian Rogers -Cc: Jiri Olsa -Cc: Namhyung Kim -Signed-off-by: Arnaldo Carvalho de Melo -Stable-dep-of: 88ce0106a1f6 ("perf record: Delete session after stopping sideband thread") -Signed-off-by: Sasha Levin ---- - tools/perf/builtin-record.c | 4 ++-- - tools/perf/builtin-top.c | 4 ++-- - tools/perf/util/bpf-event.c | 2 +- - tools/perf/util/evlist.h | 11 ++++------- - tools/perf/util/sideband_evlist.c | 8 ++++---- - 5 files changed, 13 insertions(+), 16 deletions(-) - -diff --git a/tools/perf/builtin-record.c b/tools/perf/builtin-record.c -index 167cd8d3b7a21..a7d9f00382d9f 100644 ---- a/tools/perf/builtin-record.c -+++ b/tools/perf/builtin-record.c -@@ -1548,7 +1548,7 @@ static int record__setup_sb_evlist(struct record *rec) - } - } - #endif -- if (perf_evlist__start_sb_thread(rec->sb_evlist, &rec->opts.target)) { -+ if (evlist__start_sb_thread(rec->sb_evlist, &rec->opts.target)) { - pr_debug("Couldn't start the BPF side band thread:\nBPF programs starting from now on won't be annotatable\n"); - opts->no_bpf_event = true; - } -@@ -2066,7 +2066,7 @@ static int __cmd_record(struct record *rec, int argc, const char **argv) - perf_session__delete(session); - - if (!opts->no_bpf_event) -- perf_evlist__stop_sb_thread(rec->sb_evlist); -+ evlist__stop_sb_thread(rec->sb_evlist); - return status; - } - -diff --git a/tools/perf/builtin-top.c b/tools/perf/builtin-top.c -index ee30372f77133..2cf4791290263 100644 ---- a/tools/perf/builtin-top.c -+++ b/tools/perf/builtin-top.c -@@ -1763,7 +1763,7 @@ int cmd_top(int argc, const char **argv) - } - #endif - -- if (perf_evlist__start_sb_thread(top.sb_evlist, target)) { -+ if (evlist__start_sb_thread(top.sb_evlist, target)) { - pr_debug("Couldn't start the BPF side band thread:\nBPF programs starting from now on won't be annotatable\n"); - opts->no_bpf_event = true; - } -@@ -1771,7 +1771,7 @@ int cmd_top(int argc, const char **argv) - status = __cmd_top(&top); - - if (!opts->no_bpf_event) -- perf_evlist__stop_sb_thread(top.sb_evlist); -+ evlist__stop_sb_thread(top.sb_evlist); - - out_delete_evlist: - evlist__delete(top.evlist); -diff --git a/tools/perf/util/bpf-event.c b/tools/perf/util/bpf-event.c -index c50d2c7a264fe..fccc4bf20c74f 100644 ---- a/tools/perf/util/bpf-event.c -+++ b/tools/perf/util/bpf-event.c -@@ -530,7 +530,7 @@ int evlist__add_bpf_sb_event(struct evlist *evlist, struct perf_env *env) - */ - attr.wakeup_watermark = 1; - -- return perf_evlist__add_sb_event(evlist, &attr, bpf_event__sb_cb, env); -+ return evlist__add_sb_event(evlist, &attr, bpf_event__sb_cb, env); - } - - void __bpf_event__print_bpf_prog_info(struct bpf_prog_info *info, -diff --git a/tools/perf/util/evlist.h b/tools/perf/util/evlist.h -index 9298fce53ea31..8b00e9a7c0fe2 100644 ---- a/tools/perf/util/evlist.h -+++ b/tools/perf/util/evlist.h -@@ -112,14 +112,11 @@ int __evlist__add_default_attrs(struct evlist *evlist, - - int evlist__add_dummy(struct evlist *evlist); - --int perf_evlist__add_sb_event(struct evlist *evlist, -- struct perf_event_attr *attr, -- evsel__sb_cb_t cb, -- void *data); -+int evlist__add_sb_event(struct evlist *evlist, struct perf_event_attr *attr, -+ evsel__sb_cb_t cb, void *data); - void evlist__set_cb(struct evlist *evlist, evsel__sb_cb_t cb, void *data); --int perf_evlist__start_sb_thread(struct evlist *evlist, -- struct target *target); --void perf_evlist__stop_sb_thread(struct evlist *evlist); -+int evlist__start_sb_thread(struct evlist *evlist, struct target *target); -+void evlist__stop_sb_thread(struct evlist *evlist); - - int evlist__add_newtp(struct evlist *evlist, const char *sys, const char *name, void *handler); - -diff --git a/tools/perf/util/sideband_evlist.c b/tools/perf/util/sideband_evlist.c -index ded9ced027973..90ed016bb3489 100644 ---- a/tools/perf/util/sideband_evlist.c -+++ b/tools/perf/util/sideband_evlist.c -@@ -12,8 +12,8 @@ - #include - #include - --int perf_evlist__add_sb_event(struct evlist *evlist, struct perf_event_attr *attr, -- evsel__sb_cb_t cb, void *data) -+int evlist__add_sb_event(struct evlist *evlist, struct perf_event_attr *attr, -+ evsel__sb_cb_t cb, void *data) - { - struct evsel *evsel; - -@@ -94,7 +94,7 @@ void evlist__set_cb(struct evlist *evlist, evsel__sb_cb_t cb, void *data) - } - } - --int perf_evlist__start_sb_thread(struct evlist *evlist, struct target *target) -+int evlist__start_sb_thread(struct evlist *evlist, struct target *target) - { - struct evsel *counter; - -@@ -138,7 +138,7 @@ int perf_evlist__start_sb_thread(struct evlist *evlist, struct target *target) - return -1; - } - --void perf_evlist__stop_sb_thread(struct evlist *evlist) -+void evlist__stop_sb_thread(struct evlist *evlist) - { - if (!evlist) - return; --- -2.43.0 - diff --git a/queue-5.10/perf-intel-pt-fix-unassigned-instruction-op-discover.patch b/queue-5.10/perf-intel-pt-fix-unassigned-instruction-op-discover.patch deleted file mode 100644 index 804508d993d..00000000000 --- a/queue-5.10/perf-intel-pt-fix-unassigned-instruction-op-discover.patch +++ /dev/null @@ -1,73 +0,0 @@ -From 4ae1c79165b270be6efbd6758a5fb9175072b10d Mon Sep 17 00:00:00 2001 -From: Sasha Levin -Date: Tue, 26 Mar 2024 10:32:23 +0200 -Subject: perf intel-pt: Fix unassigned instruction op (discovered by - MemorySanitizer) - -From: Adrian Hunter - -[ Upstream commit e101a05f79fd4ee3e89d2f3fb716493c33a33708 ] - -MemorySanitizer discovered instances where the instruction op value was -not assigned.: - - WARNING: MemorySanitizer: use-of-uninitialized-value - #0 0x5581c00a76b3 in intel_pt_sample_flags tools/perf/util/intel-pt.c:1527:17 - Uninitialized value was stored to memory at - #0 0x5581c005ddf8 in intel_pt_walk_insn tools/perf/util/intel-pt-decoder/intel-pt-decoder.c:1256:25 - -The op value is used to set branch flags for branch instructions -encountered when walking the code, so fix by setting op to -INTEL_PT_OP_OTHER in other cases. - -Fixes: 4c761d805bb2d2ea ("perf intel-pt: Fix intel_pt_fup_event() assumptions about setting state type") -Reported-by: Ian Rogers -Signed-off-by: Adrian Hunter -Tested-by: Ian Rogers -Cc: Jiri Olsa -Cc: Namhyung Kim -Closes: https://lore.kernel.org/linux-perf-users/20240320162619.1272015-1-irogers@google.com/ -Link: https://lore.kernel.org/r/20240326083223.10883-1-adrian.hunter@intel.com -Signed-off-by: Arnaldo Carvalho de Melo -Signed-off-by: Sasha Levin ---- - tools/perf/util/intel-pt-decoder/intel-pt-decoder.c | 2 ++ - tools/perf/util/intel-pt.c | 2 ++ - 2 files changed, 4 insertions(+) - -diff --git a/tools/perf/util/intel-pt-decoder/intel-pt-decoder.c b/tools/perf/util/intel-pt-decoder/intel-pt-decoder.c -index 48fda1a19ab5b..6cbd4b4973042 100644 ---- a/tools/perf/util/intel-pt-decoder/intel-pt-decoder.c -+++ b/tools/perf/util/intel-pt-decoder/intel-pt-decoder.c -@@ -1118,6 +1118,8 @@ static bool intel_pt_fup_event(struct intel_pt_decoder *decoder) - bool ret = false; - - decoder->state.type &= ~INTEL_PT_BRANCH; -+ decoder->state.insn_op = INTEL_PT_OP_OTHER; -+ decoder->state.insn_len = 0; - - if (decoder->set_fup_tx_flags) { - decoder->set_fup_tx_flags = false; -diff --git a/tools/perf/util/intel-pt.c b/tools/perf/util/intel-pt.c -index 453773ce6f455..32192b7ac79e8 100644 ---- a/tools/perf/util/intel-pt.c -+++ b/tools/perf/util/intel-pt.c -@@ -574,6 +574,7 @@ static int intel_pt_walk_next_insn(struct intel_pt_insn *intel_pt_insn, - bool one_map = true; - - intel_pt_insn->length = 0; -+ intel_pt_insn->op = INTEL_PT_OP_OTHER; - - if (to_ip && *ip == to_ip) - goto out_no_cache; -@@ -649,6 +650,7 @@ static int intel_pt_walk_next_insn(struct intel_pt_insn *intel_pt_insn, - - if (to_ip && *ip == to_ip) { - intel_pt_insn->length = 0; -+ intel_pt_insn->op = INTEL_PT_OP_OTHER; - goto out_no_cache; - } - --- -2.43.0 - diff --git a/queue-5.10/perf-probe-add-missing-libgen.h-header-needed-for-us.patch b/queue-5.10/perf-probe-add-missing-libgen.h-header-needed-for-us.patch deleted file mode 100644 index 382aecda43e..00000000000 --- a/queue-5.10/perf-probe-add-missing-libgen.h-header-needed-for-us.patch +++ /dev/null @@ -1,53 +0,0 @@ -From 6d5643a7bf0a6e537809f389caf6e2d102ca64ff Mon Sep 17 00:00:00 2001 -From: Sasha Levin -Date: Thu, 21 Mar 2024 11:13:30 -0300 -Subject: perf probe: Add missing libgen.h header needed for using basename() - -From: Arnaldo Carvalho de Melo - -[ Upstream commit 581037151910126a7934e369e4b6ac70eda9a703 ] - -This prototype is obtained indirectly, by luck, from some other header -in probe-event.c in most systems, but recently exploded on alpine:edge: - - 8 13.39 alpine:edge : FAIL gcc version 13.2.1 20240309 (Alpine 13.2.1_git20240309) - util/probe-event.c: In function 'convert_exec_to_group': - util/probe-event.c:225:16: error: implicit declaration of function 'basename' [-Werror=implicit-function-declaration] - 225 | ptr1 = basename(exec_copy); - | ^~~~~~~~ - util/probe-event.c:225:14: error: assignment to 'char *' from 'int' makes pointer from integer without a cast [-Werror=int-conversion] - 225 | ptr1 = basename(exec_copy); - | ^ - cc1: all warnings being treated as errors - make[3]: *** [/git/perf-6.8.0/tools/build/Makefile.build:158: util] Error 2 - -Fix it by adding the libgen.h header where basename() is prototyped. - -Fixes: fb7345bbf7fad9bf ("perf probe: Support basic dwarf-based operations on uprobe events") -Cc: Masami Hiramatsu -Cc: Adrian Hunter -Cc: Ian Rogers -Cc: Jiri Olsa -Cc: Namhyung Kim -Link: https://lore.kernel.org/lkml/ -Signed-off-by: Arnaldo Carvalho de Melo -Signed-off-by: Sasha Levin ---- - tools/perf/util/probe-event.c | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/tools/perf/util/probe-event.c b/tools/perf/util/probe-event.c -index 97e2a72bd6f5e..42ba3046f25ec 100644 ---- a/tools/perf/util/probe-event.c -+++ b/tools/perf/util/probe-event.c -@@ -11,6 +11,7 @@ - #include - #include - #include -+#include - #include - #include - #include --- -2.43.0 - diff --git a/queue-5.10/perf-record-delete-session-after-stopping-sideband-t.patch b/queue-5.10/perf-record-delete-session-after-stopping-sideband-t.patch deleted file mode 100644 index 0069d7821d4..00000000000 --- a/queue-5.10/perf-record-delete-session-after-stopping-sideband-t.patch +++ /dev/null @@ -1,83 +0,0 @@ -From 58503fdef7614ef8ce8380e09d0a5e0c25541408 Mon Sep 17 00:00:00 2001 -From: Sasha Levin -Date: Thu, 29 Feb 2024 23:46:36 -0800 -Subject: perf record: Delete session after stopping sideband thread - -From: Ian Rogers - -[ Upstream commit 88ce0106a1f603bf360cb397e8fe293f8298fabb ] - -The session has a header in it which contains a perf env with -bpf_progs. The bpf_progs are accessed by the sideband thread and so -the sideband thread must be stopped before the session is deleted, to -avoid a use after free. This error was detected by AddressSanitizer -in the following: - - ==2054673==ERROR: AddressSanitizer: heap-use-after-free on address 0x61d000161e00 at pc 0x55769289de54 bp 0x7f9df36d4ab0 sp 0x7f9df36d4aa8 - READ of size 8 at 0x61d000161e00 thread T1 - #0 0x55769289de53 in __perf_env__insert_bpf_prog_info util/env.c:42 - #1 0x55769289dbb1 in perf_env__insert_bpf_prog_info util/env.c:29 - #2 0x557692bbae29 in perf_env__add_bpf_info util/bpf-event.c:483 - #3 0x557692bbb01a in bpf_event__sb_cb util/bpf-event.c:512 - #4 0x5576928b75f4 in perf_evlist__poll_thread util/sideband_evlist.c:68 - #5 0x7f9df96a63eb in start_thread nptl/pthread_create.c:444 - #6 0x7f9df9726a4b in clone3 ../sysdeps/unix/sysv/linux/x86_64/clone3.S:81 - - 0x61d000161e00 is located 384 bytes inside of 2136-byte region [0x61d000161c80,0x61d0001624d8) - freed by thread T0 here: - #0 0x7f9dfa6d7288 in __interceptor_free libsanitizer/asan/asan_malloc_linux.cpp:52 - #1 0x557692978d50 in perf_session__delete util/session.c:319 - #2 0x557692673959 in __cmd_record tools/perf/builtin-record.c:2884 - #3 0x55769267a9f0 in cmd_record tools/perf/builtin-record.c:4259 - #4 0x55769286710c in run_builtin tools/perf/perf.c:349 - #5 0x557692867678 in handle_internal_command tools/perf/perf.c:402 - #6 0x557692867a40 in run_argv tools/perf/perf.c:446 - #7 0x557692867fae in main tools/perf/perf.c:562 - #8 0x7f9df96456c9 in __libc_start_call_main ../sysdeps/nptl/libc_start_call_main.h:58 - -Fixes: 657ee5531903339b ("perf evlist: Introduce side band thread") -Signed-off-by: Ian Rogers -Cc: Adrian Hunter -Cc: Alexander Shishkin -Cc: Athira Rajeev -Cc: Christian Brauner -Cc: Disha Goel -Cc: Ingo Molnar -Cc: James Clark -Cc: Jiri Olsa -Cc: Kajol Jain -Cc: Kan Liang -Cc: K Prateek Nayak -Cc: Mark Rutland -Cc: Namhyung Kim -Cc: Peter Zijlstra -Cc: Song Liu -Cc: Tim Chen -Cc: Yicong Yang -Link: https://lore.kernel.org/r/20240301074639.2260708-1-irogers@google.com -Signed-off-by: Arnaldo Carvalho de Melo -Signed-off-by: Sasha Levin ---- - tools/perf/builtin-record.c | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/tools/perf/builtin-record.c b/tools/perf/builtin-record.c -index a7d9f00382d9f..44bd12aa0e062 100644 ---- a/tools/perf/builtin-record.c -+++ b/tools/perf/builtin-record.c -@@ -2063,10 +2063,10 @@ static int __cmd_record(struct record *rec, int argc, const char **argv) - close(done_fd); - #endif - zstd_fini(&session->zstd_data); -- perf_session__delete(session); -- - if (!opts->no_bpf_event) - evlist__stop_sb_thread(rec->sb_evlist); -+ -+ perf_session__delete(session); - return status; - } - --- -2.43.0 - diff --git a/queue-5.10/perf-report-avoid-segv-in-report__setup_sample_type.patch b/queue-5.10/perf-report-avoid-segv-in-report__setup_sample_type.patch deleted file mode 100644 index da3340be8ea..00000000000 --- a/queue-5.10/perf-report-avoid-segv-in-report__setup_sample_type.patch +++ /dev/null @@ -1,47 +0,0 @@ -From e31d1a015908f4ff68479cdf8f1a3e85e53365ea Mon Sep 17 00:00:00 2001 -From: Sasha Levin -Date: Tue, 7 May 2024 20:53:00 -0700 -Subject: perf report: Avoid SEGV in report__setup_sample_type() - -From: Ian Rogers - -[ Upstream commit 45b4f402a6b782352c4bafcff682bfb01da9ca05 ] - -In some cases evsel->name is lazily initialized in evsel__name(). If not -initialized passing NULL to strstr() leads to a SEGV. - -Fixes: ccb17caecfbd542f ("perf report: Set PERF_SAMPLE_DATA_SRC bit for Arm SPE event") -Signed-off-by: Ian Rogers -Cc: Adrian Hunter -Cc: Alexander Shishkin -Cc: Ingo Molnar -Cc: James Clark -Cc: Jiri Olsa -Cc: Kan Liang -Cc: Leo Yan -Cc: Mark Rutland -Cc: Namhyung Kim -Cc: Peter Zijlstra -Link: https://lore.kernel.org/r/20240508035301.1554434-4-irogers@google.com -Signed-off-by: Arnaldo Carvalho de Melo -Signed-off-by: Sasha Levin ---- - tools/perf/builtin-report.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/tools/perf/builtin-report.c b/tools/perf/builtin-report.c -index b55ee073c2f72..6283c2d10d27d 100644 ---- a/tools/perf/builtin-report.c -+++ b/tools/perf/builtin-report.c -@@ -401,7 +401,7 @@ static int report__setup_sample_type(struct report *rep) - * compatibility, set the bit if it's an old perf data file. - */ - evlist__for_each_entry(session->evlist, evsel) { -- if (strstr(evsel->name, "arm_spe") && -+ if (strstr(evsel__name(evsel), "arm_spe") && - !(sample_type & PERF_SAMPLE_DATA_SRC)) { - evsel->core.attr.sample_type |= PERF_SAMPLE_DATA_SRC; - sample_type |= PERF_SAMPLE_DATA_SRC; --- -2.43.0 - diff --git a/queue-5.10/perf-stat-don-t-display-metric-header-for-non-leader.patch b/queue-5.10/perf-stat-don-t-display-metric-header-for-non-leader.patch deleted file mode 100644 index 9bb30ba38bb..00000000000 --- a/queue-5.10/perf-stat-don-t-display-metric-header-for-non-leader.patch +++ /dev/null @@ -1,90 +0,0 @@ -From f177112505abf499d10c2c692409fbc6c06922ea Mon Sep 17 00:00:00 2001 -From: Sasha Levin -Date: Thu, 9 May 2024 22:13:09 -0700 -Subject: perf stat: Don't display metric header for non-leader uncore events - -From: Ian Rogers - -[ Upstream commit 193a9e30207f54777ff42d0d8be8389edc522277 ] - -On an Intel tigerlake laptop a metric like: - - { - "BriefDescription": "Test", - "MetricExpr": "imc_free_running@data_read@ + imc_free_running@data_write@", - "MetricGroup": "Test", - "MetricName": "Test", - "ScaleUnit": "6.103515625e-5MiB" - }, - -Will have 4 events: - - uncore_imc_free_running_0/data_read/ - uncore_imc_free_running_0/data_write/ - uncore_imc_free_running_1/data_read/ - uncore_imc_free_running_1/data_write/ - -If aggregration is disabled with metric-only 2 column headers are -needed: - - $ perf stat -M test --metric-only -A -a sleep 1 - - Performance counter stats for 'system wide': - - MiB Test MiB Test - CPU0 1821.0 1820.5 - -But when not, the counts aggregated in the metric leader and only 1 -column should be shown: - - $ perf stat -M test --metric-only -a sleep 1 - Performance counter stats for 'system wide': - - MiB Test - 5909.4 - - 1.001258915 seconds time elapsed - -Achieve this by skipping events that aren't metric leaders when -printing column headers and aggregation isn't disabled. - -The bug is long standing, the fixes tag is set to a refactor as that -is as far back as is reasonable to backport. - -Fixes: 088519f318be3a41 ("perf stat: Move the display functions to stat-display.c") -Signed-off-by: Ian Rogers -Cc: Adrian Hunter -Cc: Alexander Shishkin -Cc: Ingo Molnar -Cc: Jiri Olsa -Cc: Kaige Ye -Cc: Kan Liang -Cc: K Prateek Nayak -Cc: Mark Rutland -Cc: Namhyung Kim -Cc: Peter Zijlstra -Cc: Yicong Yang -Link: https://lore.kernel.org/r/20240510051309.2452468-1-irogers@google.com -Signed-off-by: Arnaldo Carvalho de Melo -Signed-off-by: Sasha Levin ---- - tools/perf/util/stat-display.c | 3 +++ - 1 file changed, 3 insertions(+) - -diff --git a/tools/perf/util/stat-display.c b/tools/perf/util/stat-display.c -index 971fd77bd3e61..8c2da9a3f953c 100644 ---- a/tools/perf/util/stat-display.c -+++ b/tools/perf/util/stat-display.c -@@ -939,6 +939,9 @@ static void print_metric_headers(struct perf_stat_config *config, - - /* Print metrics headers only */ - evlist__for_each_entry(evlist, counter) { -+ if (config->aggr_mode != AGGR_NONE && counter->metric_leader != counter) -+ continue; -+ - os.evsel = counter; - out.ctx = &os; - out.print_metric = print_metric_header; --- -2.43.0 - diff --git a/queue-5.10/perf-top-fix-tui-exit-screen-refresh-race-condition.patch b/queue-5.10/perf-top-fix-tui-exit-screen-refresh-race-condition.patch deleted file mode 100644 index 5731714aaf7..00000000000 --- a/queue-5.10/perf-top-fix-tui-exit-screen-refresh-race-condition.patch +++ /dev/null @@ -1,75 +0,0 @@ -From cf4c6c3a9f2737f0748968d7f630e2057752f495 Mon Sep 17 00:00:00 2001 -From: Sasha Levin -Date: Wed, 29 Dec 2021 16:55:19 +0800 -Subject: perf top: Fix TUI exit screen refresh race condition - -From: yaowenbin - -[ Upstream commit 64f18d2d043015b3f835ce4c9f3beb97cfd19b6e ] - -When the following command is executed several times, a coredump file is -generated. - - $ timeout -k 9 5 perf top -e task-clock - ******* - ******* - ******* - 0.01% [kernel] [k] __do_softirq - 0.01% libpthread-2.28.so [.] __pthread_mutex_lock - 0.01% [kernel] [k] __ll_sc_atomic64_sub_return - double free or corruption (!prev) perf top --sort comm,dso - timeout: the monitored command dumped core - -When we terminate "perf top" using sending signal method, -SLsmg_reset_smg() called. SLsmg_reset_smg() resets the SLsmg screen -management routines by freeing all memory allocated while it was active. - -However SLsmg_reinit_smg() maybe be called by another thread. - -SLsmg_reinit_smg() will free the same memory accessed by -SLsmg_reset_smg(), thus it results in a double free. - -SLsmg_reinit_smg() is called already protected by ui__lock, so we fix -the problem by adding pthread_mutex_trylock of ui__lock when calling -SLsmg_reset_smg(). - -Signed-off-by: Wenyu Liu -Tested-by: Arnaldo Carvalho de Melo -Cc: Alexander Shishkin -Cc: Jiri Olsa -Cc: Mark Rutland -Cc: Namhyung Kim -Cc: Peter Zijlstra -Cc: wuxu.wu@huawei.com -Link: http://lore.kernel.org/lkml/a91e3943-7ddc-f5c0-a7f5-360f073c20e6@huawei.com -Signed-off-by: Hewenliang -Signed-off-by: yaowenbin -Signed-off-by: Arnaldo Carvalho de Melo -Stable-dep-of: 769e6a1e15bd ("perf ui browser: Don't save pointer to stack memory") -Signed-off-by: Sasha Levin ---- - tools/perf/ui/tui/setup.c | 8 +++++--- - 1 file changed, 5 insertions(+), 3 deletions(-) - -diff --git a/tools/perf/ui/tui/setup.c b/tools/perf/ui/tui/setup.c -index e9bfe856a5dee..b1be59b4e2a4f 100644 ---- a/tools/perf/ui/tui/setup.c -+++ b/tools/perf/ui/tui/setup.c -@@ -170,9 +170,11 @@ void ui__exit(bool wait_for_ok) - "Press any key...", 0); - - SLtt_set_cursor_visibility(1); -- SLsmg_refresh(); -- SLsmg_reset_smg(); -+ if (!pthread_mutex_trylock(&ui__lock)) { -+ SLsmg_refresh(); -+ SLsmg_reset_smg(); -+ pthread_mutex_unlock(&ui__lock); -+ } - SLang_reset_tty(); -- - perf_error__unregister(&perf_tui_eops); - } --- -2.43.0 - diff --git a/queue-5.10/perf-ui-browser-avoid-segv-on-title.patch b/queue-5.10/perf-ui-browser-avoid-segv-on-title.patch deleted file mode 100644 index c1ad6c482cb..00000000000 --- a/queue-5.10/perf-ui-browser-avoid-segv-on-title.patch +++ /dev/null @@ -1,46 +0,0 @@ -From efa5a0eb2d3591944a8590ee00f1deda451ae6eb Mon Sep 17 00:00:00 2001 -From: Sasha Levin -Date: Tue, 7 May 2024 20:52:58 -0700 -Subject: perf ui browser: Avoid SEGV on title - -From: Ian Rogers - -[ Upstream commit 90f01afb0dfafbc9b094bb61e61a4ac297d9d0d2 ] - -If the title is NULL then it can lead to a SEGV. - -Fixes: 769e6a1e15bdbbaf ("perf ui browser: Don't save pointer to stack memory") -Signed-off-by: Ian Rogers -Cc: Adrian Hunter -Cc: Alexander Shishkin -Cc: Ingo Molnar -Cc: James Clark -Cc: Jiri Olsa -Cc: Kan Liang -Cc: Leo Yan -Cc: Mark Rutland -Cc: Namhyung Kim -Cc: Peter Zijlstra -Link: https://lore.kernel.org/r/20240508035301.1554434-2-irogers@google.com -Signed-off-by: Arnaldo Carvalho de Melo -Signed-off-by: Sasha Levin ---- - tools/perf/ui/browser.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/tools/perf/ui/browser.c b/tools/perf/ui/browser.c -index 6fa4f123d5ff7..b84b87b939573 100644 ---- a/tools/perf/ui/browser.c -+++ b/tools/perf/ui/browser.c -@@ -203,7 +203,7 @@ void ui_browser__refresh_dimensions(struct ui_browser *browser) - void ui_browser__handle_resize(struct ui_browser *browser) - { - ui__refresh_dimensions(false); -- ui_browser__show(browser, browser->title, ui_helpline__current); -+ ui_browser__show(browser, browser->title ?: "", ui_helpline__current); - ui_browser__refresh(browser); - } - --- -2.43.0 - diff --git a/queue-5.10/perf-ui-browser-don-t-save-pointer-to-stack-memory.patch b/queue-5.10/perf-ui-browser-don-t-save-pointer-to-stack-memory.patch deleted file mode 100644 index 7474cc1f9b3..00000000000 --- a/queue-5.10/perf-ui-browser-don-t-save-pointer-to-stack-memory.patch +++ /dev/null @@ -1,143 +0,0 @@ -From b26165fddc621219e8f039d3bf6df17c8e81c0e2 Mon Sep 17 00:00:00 2001 -From: Sasha Levin -Date: Tue, 7 May 2024 11:35:38 -0700 -Subject: perf ui browser: Don't save pointer to stack memory - -From: Ian Rogers - -[ Upstream commit 769e6a1e15bdbbaf2b0d2f37c24f2c53268bd21f ] - -ui_browser__show() is capturing the input title that is stack allocated -memory in hist_browser__run(). - -Avoid a use after return by strdup-ing the string. - -Committer notes: - -Further explanation from Ian Rogers: - -My command line using tui is: -$ sudo bash -c 'rm /tmp/asan.log*; export -ASAN_OPTIONS="log_path=/tmp/asan.log"; /tmp/perf/perf mem record -a -sleep 1; /tmp/perf/perf mem report' -I then go to the perf annotate view and quit. This triggers the asan -error (from the log file): -``` -==1254591==ERROR: AddressSanitizer: stack-use-after-return on address -0x7f2813331920 at pc 0x7f28180 -65991 bp 0x7fff0a21c750 sp 0x7fff0a21bf10 -READ of size 80 at 0x7f2813331920 thread T0 - #0 0x7f2818065990 in __interceptor_strlen -../../../../src/libsanitizer/sanitizer_common/sanitizer_common_interceptors.inc:461 - #1 0x7f2817698251 in SLsmg_write_wrapped_string -(/lib/x86_64-linux-gnu/libslang.so.2+0x98251) - #2 0x7f28176984b9 in SLsmg_write_nstring -(/lib/x86_64-linux-gnu/libslang.so.2+0x984b9) - #3 0x55c94045b365 in ui_browser__write_nstring ui/browser.c:60 - #4 0x55c94045c558 in __ui_browser__show_title ui/browser.c:266 - #5 0x55c94045c776 in ui_browser__show ui/browser.c:288 - #6 0x55c94045c06d in ui_browser__handle_resize ui/browser.c:206 - #7 0x55c94047979b in do_annotate ui/browsers/hists.c:2458 - #8 0x55c94047fb17 in evsel__hists_browse ui/browsers/hists.c:3412 - #9 0x55c940480a0c in perf_evsel_menu__run ui/browsers/hists.c:3527 - #10 0x55c940481108 in __evlist__tui_browse_hists ui/browsers/hists.c:3613 - #11 0x55c9404813f7 in evlist__tui_browse_hists ui/browsers/hists.c:3661 - #12 0x55c93ffa253f in report__browse_hists tools/perf/builtin-report.c:671 - #13 0x55c93ffa58ca in __cmd_report tools/perf/builtin-report.c:1141 - #14 0x55c93ffaf159 in cmd_report tools/perf/builtin-report.c:1805 - #15 0x55c94000c05c in report_events tools/perf/builtin-mem.c:374 - #16 0x55c94000d96d in cmd_mem tools/perf/builtin-mem.c:516 - #17 0x55c9400e44ee in run_builtin tools/perf/perf.c:350 - #18 0x55c9400e4a5a in handle_internal_command tools/perf/perf.c:403 - #19 0x55c9400e4e22 in run_argv tools/perf/perf.c:447 - #20 0x55c9400e53ad in main tools/perf/perf.c:561 - #21 0x7f28170456c9 in __libc_start_call_main -../sysdeps/nptl/libc_start_call_main.h:58 - #22 0x7f2817045784 in __libc_start_main_impl ../csu/libc-start.c:360 - #23 0x55c93ff544c0 in _start (/tmp/perf/perf+0x19a4c0) (BuildId: -84899b0e8c7d3a3eaa67b2eb35e3d8b2f8cd4c93) - -Address 0x7f2813331920 is located in stack of thread T0 at offset 32 in frame - #0 0x55c94046e85e in hist_browser__run ui/browsers/hists.c:746 - - This frame has 1 object(s): - [32, 192) 'title' (line 747) <== Memory access at offset 32 is -inside this variable -HINT: this may be a false positive if your program uses some custom -stack unwind mechanism, swapcontext or vfork -``` -hist_browser__run isn't on the stack so the asan error looks legit. -There's no clean init/exit on struct ui_browser so I may be trading a -use-after-return for a memory leak, but that seems look a good trade -anyway. - -Fixes: 05e8b0804ec4 ("perf ui browser: Stop using 'self'") -Signed-off-by: Ian Rogers -Cc: Adrian Hunter -Cc: Alexander Shishkin -Cc: Andi Kleen -Cc: Athira Rajeev -Cc: Ben Gainey -Cc: Ingo Molnar -Cc: James Clark -Cc: Jiri Olsa -Cc: Kajol Jain -Cc: Kan Liang -Cc: K Prateek Nayak -Cc: Li Dong -Cc: Mark Rutland -Cc: Namhyung Kim -Cc: Oliver Upton -Cc: Paran Lee -Cc: Peter Zijlstra -Cc: Ravi Bangoria -Cc: Sun Haiyong -Cc: Tim Chen -Cc: Yanteng Si -Cc: Yicong Yang -Link: https://lore.kernel.org/r/20240507183545.1236093-2-irogers@google.com -Signed-off-by: Arnaldo Carvalho de Melo -Signed-off-by: Sasha Levin ---- - tools/perf/ui/browser.c | 4 +++- - tools/perf/ui/browser.h | 2 +- - 2 files changed, 4 insertions(+), 2 deletions(-) - -diff --git a/tools/perf/ui/browser.c b/tools/perf/ui/browser.c -index 9dc808020e824..6fa4f123d5ff7 100644 ---- a/tools/perf/ui/browser.c -+++ b/tools/perf/ui/browser.c -@@ -287,7 +287,8 @@ int ui_browser__show(struct ui_browser *browser, const char *title, - mutex_lock(&ui__lock); - __ui_browser__show_title(browser, title); - -- browser->title = title; -+ free(browser->title); -+ browser->title = strdup(title); - zfree(&browser->helpline); - - va_start(ap, helpline); -@@ -304,6 +305,7 @@ void ui_browser__hide(struct ui_browser *browser) - mutex_lock(&ui__lock); - ui_helpline__pop(); - zfree(&browser->helpline); -+ zfree(&browser->title); - mutex_unlock(&ui__lock); - } - -diff --git a/tools/perf/ui/browser.h b/tools/perf/ui/browser.h -index 3678eb88f119c..815e6bf7ee531 100644 ---- a/tools/perf/ui/browser.h -+++ b/tools/perf/ui/browser.h -@@ -21,7 +21,7 @@ struct ui_browser { - u8 extra_title_lines; - int current_color; - void *priv; -- const char *title; -+ char *title; - char *helpline; - const char *no_samples_msg; - void (*refresh_dimensions)(struct ui_browser *browser); --- -2.43.0 - diff --git a/queue-5.10/perf-ui-update-use-of-pthread-mutex.patch b/queue-5.10/perf-ui-update-use-of-pthread-mutex.patch deleted file mode 100644 index e581ced6e46..00000000000 --- a/queue-5.10/perf-ui-update-use-of-pthread-mutex.patch +++ /dev/null @@ -1,382 +0,0 @@ -From 04eea64658853043f722950968b7688b3447aa86 Mon Sep 17 00:00:00 2001 -From: Sasha Levin -Date: Fri, 26 Aug 2022 09:42:33 -0700 -Subject: perf ui: Update use of pthread mutex -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -From: Ian Rogers - -[ Upstream commit 82aff6cc070417f26f9b02b26e63c17ff43b4044 ] - -Switch to the use of mutex wrappers that provide better error checking. - -Signed-off-by: Ian Rogers -Cc: Adrian Hunter -Cc: Alexander Shishkin -Cc: Alexandre Truong -Cc: Alexey Bayduraev -Cc: Andi Kleen -Cc: Andres Freund -Cc: Andrii Nakryiko -Cc: André Almeida -Cc: Athira Jajeev -Cc: Christophe JAILLET -Cc: Colin Ian King -Cc: Dario Petrillo -Cc: Darren Hart -Cc: Dave Marchevsky -Cc: Davidlohr Bueso -Cc: Fangrui Song -Cc: Hewenliang -Cc: Ingo Molnar -Cc: James Clark -Cc: Jason Wang -Cc: Jiri Olsa -Cc: Kajol Jain -Cc: Kim Phillips -Cc: Leo Yan -Cc: Mark Rutland -Cc: Martin Liška -Cc: Masami Hiramatsu -Cc: Nathan Chancellor -Cc: Nick Desaulniers -Cc: Pavithra Gurushankar -Cc: Peter Zijlstra -Cc: Quentin Monnet -Cc: Ravi Bangoria -Cc: Remi Bernon -Cc: Riccardo Mancini -Cc: Song Liu -Cc: Stephane Eranian -Cc: Thomas Gleixner -Cc: Thomas Richter -Cc: Tom Rix -Cc: Weiguo Li -Cc: Wenyu Liu -Cc: William Cohen -Cc: Zechuan Chen -Cc: bpf@vger.kernel.org -Cc: llvm@lists.linux.dev -Cc: yaowenbin -Link: https://lore.kernel.org/r/20220826164242.43412-10-irogers@google.com -Signed-off-by: Arnaldo Carvalho de Melo -Stable-dep-of: 769e6a1e15bd ("perf ui browser: Don't save pointer to stack memory") -Signed-off-by: Sasha Levin ---- - tools/perf/ui/browser.c | 20 ++++++++++---------- - tools/perf/ui/browsers/annotate.c | 2 +- - tools/perf/ui/setup.c | 5 +++-- - tools/perf/ui/tui/helpline.c | 5 ++--- - tools/perf/ui/tui/progress.c | 8 ++++---- - tools/perf/ui/tui/setup.c | 8 ++++---- - tools/perf/ui/tui/util.c | 18 +++++++++--------- - tools/perf/ui/ui.h | 4 ++-- - 8 files changed, 35 insertions(+), 35 deletions(-) - -diff --git a/tools/perf/ui/browser.c b/tools/perf/ui/browser.c -index 781afe42e90e0..9dc808020e824 100644 ---- a/tools/perf/ui/browser.c -+++ b/tools/perf/ui/browser.c -@@ -268,9 +268,9 @@ void __ui_browser__show_title(struct ui_browser *browser, const char *title) - - void ui_browser__show_title(struct ui_browser *browser, const char *title) - { -- pthread_mutex_lock(&ui__lock); -+ mutex_lock(&ui__lock); - __ui_browser__show_title(browser, title); -- pthread_mutex_unlock(&ui__lock); -+ mutex_unlock(&ui__lock); - } - - int ui_browser__show(struct ui_browser *browser, const char *title, -@@ -284,7 +284,7 @@ int ui_browser__show(struct ui_browser *browser, const char *title, - - browser->refresh_dimensions(browser); - -- pthread_mutex_lock(&ui__lock); -+ mutex_lock(&ui__lock); - __ui_browser__show_title(browser, title); - - browser->title = title; -@@ -295,16 +295,16 @@ int ui_browser__show(struct ui_browser *browser, const char *title, - va_end(ap); - if (err > 0) - ui_helpline__push(browser->helpline); -- pthread_mutex_unlock(&ui__lock); -+ mutex_unlock(&ui__lock); - return err ? 0 : -1; - } - - void ui_browser__hide(struct ui_browser *browser) - { -- pthread_mutex_lock(&ui__lock); -+ mutex_lock(&ui__lock); - ui_helpline__pop(); - zfree(&browser->helpline); -- pthread_mutex_unlock(&ui__lock); -+ mutex_unlock(&ui__lock); - } - - static void ui_browser__scrollbar_set(struct ui_browser *browser) -@@ -352,9 +352,9 @@ static int __ui_browser__refresh(struct ui_browser *browser) - - int ui_browser__refresh(struct ui_browser *browser) - { -- pthread_mutex_lock(&ui__lock); -+ mutex_lock(&ui__lock); - __ui_browser__refresh(browser); -- pthread_mutex_unlock(&ui__lock); -+ mutex_unlock(&ui__lock); - - return 0; - } -@@ -390,10 +390,10 @@ int ui_browser__run(struct ui_browser *browser, int delay_secs) - while (1) { - off_t offset; - -- pthread_mutex_lock(&ui__lock); -+ mutex_lock(&ui__lock); - err = __ui_browser__refresh(browser); - SLsmg_refresh(); -- pthread_mutex_unlock(&ui__lock); -+ mutex_unlock(&ui__lock); - if (err < 0) - break; - -diff --git a/tools/perf/ui/browsers/annotate.c b/tools/perf/ui/browsers/annotate.c -index bd77825fd5a15..7083dbb9a0af9 100644 ---- a/tools/perf/ui/browsers/annotate.c -+++ b/tools/perf/ui/browsers/annotate.c -@@ -8,11 +8,11 @@ - #include "../../util/hist.h" - #include "../../util/sort.h" - #include "../../util/map.h" -+#include "../../util/mutex.h" - #include "../../util/symbol.h" - #include "../../util/evsel.h" - #include "../../util/evlist.h" - #include --#include - #include - #include - #include -diff --git a/tools/perf/ui/setup.c b/tools/perf/ui/setup.c -index 700335cde6180..25ded88801a3d 100644 ---- a/tools/perf/ui/setup.c -+++ b/tools/perf/ui/setup.c -@@ -1,5 +1,4 @@ - // SPDX-License-Identifier: GPL-2.0 --#include - #include - #include - -@@ -8,7 +7,7 @@ - #include "../util/hist.h" - #include "ui.h" - --pthread_mutex_t ui__lock = PTHREAD_MUTEX_INITIALIZER; -+struct mutex ui__lock; - void *perf_gtk_handle; - int use_browser = -1; - -@@ -76,6 +75,7 @@ int stdio__config_color(const struct option *opt __maybe_unused, - - void setup_browser(bool fallback_to_pager) - { -+ mutex_init(&ui__lock); - if (use_browser < 2 && (!isatty(1) || dump_trace)) - use_browser = 0; - -@@ -118,4 +118,5 @@ void exit_browser(bool wait_for_ok) - default: - break; - } -+ mutex_destroy(&ui__lock); - } -diff --git a/tools/perf/ui/tui/helpline.c b/tools/perf/ui/tui/helpline.c -index 298d6af82fddd..db4952f5990bd 100644 ---- a/tools/perf/ui/tui/helpline.c -+++ b/tools/perf/ui/tui/helpline.c -@@ -2,7 +2,6 @@ - #include - #include - #include --#include - #include - #include - -@@ -33,7 +32,7 @@ static int tui_helpline__show(const char *format, va_list ap) - int ret; - static int backlog; - -- pthread_mutex_lock(&ui__lock); -+ mutex_lock(&ui__lock); - ret = vscnprintf(ui_helpline__last_msg + backlog, - sizeof(ui_helpline__last_msg) - backlog, format, ap); - backlog += ret; -@@ -45,7 +44,7 @@ static int tui_helpline__show(const char *format, va_list ap) - SLsmg_refresh(); - backlog = 0; - } -- pthread_mutex_unlock(&ui__lock); -+ mutex_unlock(&ui__lock); - - return ret; - } -diff --git a/tools/perf/ui/tui/progress.c b/tools/perf/ui/tui/progress.c -index 3d74af5a7ece6..71b6c8d9474fb 100644 ---- a/tools/perf/ui/tui/progress.c -+++ b/tools/perf/ui/tui/progress.c -@@ -45,7 +45,7 @@ static void tui_progress__update(struct ui_progress *p) - } - - ui__refresh_dimensions(false); -- pthread_mutex_lock(&ui__lock); -+ mutex_lock(&ui__lock); - y = SLtt_Screen_Rows / 2 - 2; - SLsmg_set_color(0); - SLsmg_draw_box(y, 0, 3, SLtt_Screen_Cols); -@@ -56,7 +56,7 @@ static void tui_progress__update(struct ui_progress *p) - bar = ((SLtt_Screen_Cols - 2) * p->curr) / p->total; - SLsmg_fill_region(y, 1, 1, bar, ' '); - SLsmg_refresh(); -- pthread_mutex_unlock(&ui__lock); -+ mutex_unlock(&ui__lock); - } - - static void tui_progress__finish(void) -@@ -67,12 +67,12 @@ static void tui_progress__finish(void) - return; - - ui__refresh_dimensions(false); -- pthread_mutex_lock(&ui__lock); -+ mutex_lock(&ui__lock); - y = SLtt_Screen_Rows / 2 - 2; - SLsmg_set_color(0); - SLsmg_fill_region(y, 0, 3, SLtt_Screen_Cols, ' '); - SLsmg_refresh(); -- pthread_mutex_unlock(&ui__lock); -+ mutex_unlock(&ui__lock); - } - - static struct ui_progress_ops tui_progress__ops = { -diff --git a/tools/perf/ui/tui/setup.c b/tools/perf/ui/tui/setup.c -index b1be59b4e2a4f..a3b8c397c24d5 100644 ---- a/tools/perf/ui/tui/setup.c -+++ b/tools/perf/ui/tui/setup.c -@@ -29,10 +29,10 @@ void ui__refresh_dimensions(bool force) - { - if (force || ui__need_resize) { - ui__need_resize = 0; -- pthread_mutex_lock(&ui__lock); -+ mutex_lock(&ui__lock); - SLtt_get_screen_size(); - SLsmg_reinit_smg(); -- pthread_mutex_unlock(&ui__lock); -+ mutex_unlock(&ui__lock); - } - } - -@@ -170,10 +170,10 @@ void ui__exit(bool wait_for_ok) - "Press any key...", 0); - - SLtt_set_cursor_visibility(1); -- if (!pthread_mutex_trylock(&ui__lock)) { -+ if (mutex_trylock(&ui__lock)) { - SLsmg_refresh(); - SLsmg_reset_smg(); -- pthread_mutex_unlock(&ui__lock); -+ mutex_unlock(&ui__lock); - } - SLang_reset_tty(); - perf_error__unregister(&perf_tui_eops); -diff --git a/tools/perf/ui/tui/util.c b/tools/perf/ui/tui/util.c -index 0f562e2cb1e88..3c5174854ac8b 100644 ---- a/tools/perf/ui/tui/util.c -+++ b/tools/perf/ui/tui/util.c -@@ -95,7 +95,7 @@ int ui_browser__input_window(const char *title, const char *text, char *input, - t = sep + 1; - } - -- pthread_mutex_lock(&ui__lock); -+ mutex_lock(&ui__lock); - - max_len += 2; - nr_lines += 8; -@@ -125,17 +125,17 @@ int ui_browser__input_window(const char *title, const char *text, char *input, - SLsmg_write_nstring((char *)exit_msg, max_len); - SLsmg_refresh(); - -- pthread_mutex_unlock(&ui__lock); -+ mutex_unlock(&ui__lock); - - x += 2; - len = 0; - key = ui__getch(delay_secs); - while (key != K_TIMER && key != K_ENTER && key != K_ESC) { -- pthread_mutex_lock(&ui__lock); -+ mutex_lock(&ui__lock); - - if (key == K_BKSPC) { - if (len == 0) { -- pthread_mutex_unlock(&ui__lock); -+ mutex_unlock(&ui__lock); - goto next_key; - } - SLsmg_gotorc(y, x + --len); -@@ -147,7 +147,7 @@ int ui_browser__input_window(const char *title, const char *text, char *input, - } - SLsmg_refresh(); - -- pthread_mutex_unlock(&ui__lock); -+ mutex_unlock(&ui__lock); - - /* XXX more graceful overflow handling needed */ - if (len == sizeof(buf) - 1) { -@@ -215,19 +215,19 @@ void __ui__info_window(const char *title, const char *text, const char *exit_msg - - void ui__info_window(const char *title, const char *text) - { -- pthread_mutex_lock(&ui__lock); -+ mutex_lock(&ui__lock); - __ui__info_window(title, text, NULL); - SLsmg_refresh(); -- pthread_mutex_unlock(&ui__lock); -+ mutex_unlock(&ui__lock); - } - - int ui__question_window(const char *title, const char *text, - const char *exit_msg, int delay_secs) - { -- pthread_mutex_lock(&ui__lock); -+ mutex_lock(&ui__lock); - __ui__info_window(title, text, exit_msg); - SLsmg_refresh(); -- pthread_mutex_unlock(&ui__lock); -+ mutex_unlock(&ui__lock); - return ui__getch(delay_secs); - } - -diff --git a/tools/perf/ui/ui.h b/tools/perf/ui/ui.h -index 9b6fdf06e1d2f..99f8d2fe9bc55 100644 ---- a/tools/perf/ui/ui.h -+++ b/tools/perf/ui/ui.h -@@ -2,11 +2,11 @@ - #ifndef _PERF_UI_H_ - #define _PERF_UI_H_ 1 - --#include -+#include "../util/mutex.h" - #include - #include - --extern pthread_mutex_t ui__lock; -+extern struct mutex ui__lock; - extern void *perf_gtk_handle; - - extern int use_browser; --- -2.43.0 - diff --git a/queue-5.10/series b/queue-5.10/series index 11347c39038..1c71237920a 100644 --- a/queue-5.10/series +++ b/queue-5.10/series @@ -131,13 +131,8 @@ net-qrtr-ns-fix-module-refcnt.patch netrom-fix-possible-dead-lock-in-nr_rt_ioctl.patch af_packet-do-not-call-packet_read_pending-from-tpack.patch sched-fair-allow-disabling-sched_balance_newidle-wit.patch -perf-evlist-use-the-right-prefix-for-struct-evlist-s.patch -perf-record-delete-session-after-stopping-sideband-t.patch -perf-probe-add-missing-libgen.h-header-needed-for-us.patch greybus-lights-check-return-of-get_channel_from_mode.patch f2fs-fix-to-wait-on-page-writeback-in-__clone_blkadd.patch -perf-annotate-add-demangle-and-demangle-kernel.patch -perf-annotate-get-rid-of-duplicate-group-option-item.patch soundwire-cadence-fix-invalid-pdi-offset.patch dmaengine-idma64-add-check-for-dma_set_max_seg_size.patch firmware-dmi-id-add-a-release-callback-function.patch @@ -166,26 +161,18 @@ fpga-region-use-standard-dev_release-for-class-drive.patch fpga-region-add-owner-module-and-take-its-refcount.patch microblaze-remove-gcc-flag-for-non-existing-early_pr.patch microblaze-remove-early-printk-call-from-cpuinfo-sta.patch -perf-intel-pt-fix-unassigned-instruction-op-discover.patch usb-gadget-u_audio-clear-uac-pointer-when-freed.patch stm-class-fix-a-double-free-in-stm_register_device.patch ppdev-remove-usage-of-the-deprecated-ida_simple_xx-a.patch ppdev-add-an-error-check-in-register_device.patch -perf-bench-internals-inject-build-id-fix-trap-divide.patch -perf-top-fix-tui-exit-screen-refresh-race-condition.patch -perf-ui-update-use-of-pthread-mutex.patch -perf-ui-browser-don-t-save-pointer-to-stack-memory.patch extcon-max8997-select-irq_domain-instead-of-dependin.patch pci-edr-align-edr_port_dpc_enable_dsm-with-pci-firmw.patch pci-edr-align-edr_port_locate_dsm-with-pci-firmware-.patch -perf-ui-browser-avoid-segv-on-title.patch -perf-report-avoid-segv-in-report__setup_sample_type.patch f2fs-compress-fix-to-cover-reserve-release-_compress.patch f2fs-fix-to-release-node-block-count-in-error-path-o.patch f2fs-compress-don-t-allow-unaligned-truncation-on-re.patch serial-sh-sci-protect-invalidating-rxdma-on-shutdown.patch libsubcmd-fix-parse-options-memory-leak.patch -perf-stat-don-t-display-metric-header-for-non-leader.patch s390-ipl-fix-incorrect-initialization-of-len-fields-.patch s390-ipl-fix-incorrect-initialization-of-nvme-dump-b.patch input-ims-pcu-fix-printf-string-overflow.patch diff --git a/queue-5.15/perf-annotate-get-rid-of-duplicate-group-option-item.patch b/queue-5.15/perf-annotate-get-rid-of-duplicate-group-option-item.patch deleted file mode 100644 index ada14125569..00000000000 --- a/queue-5.15/perf-annotate-get-rid-of-duplicate-group-option-item.patch +++ /dev/null @@ -1,48 +0,0 @@ -From 36146c4fe2ec67b97074a622589831af1a134c89 Mon Sep 17 00:00:00 2001 -From: Sasha Levin -Date: Fri, 22 Mar 2024 15:43:12 -0700 -Subject: perf annotate: Get rid of duplicate --group option item - -From: Namhyung Kim - -[ Upstream commit 374af9f1f06b5e991c810d2e4983d6f58df32136 ] - -The options array in cmd_annotate() has duplicate --group options. It -only needs one and let's get rid of the other. - - $ perf annotate -h 2>&1 | grep group - --group Show event group information together - --group Show event group information together - -Fixes: 7ebaf4890f63eb90 ("perf annotate: Support '--group' option") -Reviewed-by: Kan Liang -Signed-off-by: Namhyung Kim -Cc: Adrian Hunter -Cc: Ian Rogers -Cc: Ingo Molnar -Cc: Jin Yao -Cc: Jiri Olsa -Cc: Peter Zijlstra -Link: https://lore.kernel.org/r/20240322224313.423181-1-namhyung@kernel.org -Signed-off-by: Arnaldo Carvalho de Melo -Signed-off-by: Sasha Levin ---- - tools/perf/builtin-annotate.c | 2 -- - 1 file changed, 2 deletions(-) - -diff --git a/tools/perf/builtin-annotate.c b/tools/perf/builtin-annotate.c -index 05eb098cb0e3b..592d92092614e 100644 ---- a/tools/perf/builtin-annotate.c -+++ b/tools/perf/builtin-annotate.c -@@ -541,8 +541,6 @@ int cmd_annotate(int argc, const char **argv) - "Enable symbol demangling"), - OPT_BOOLEAN(0, "demangle-kernel", &symbol_conf.demangle_kernel, - "Enable kernel symbol demangling"), -- OPT_BOOLEAN(0, "group", &symbol_conf.event_group, -- "Show event group information together"), - OPT_BOOLEAN(0, "show-total-period", &symbol_conf.show_total_period, - "Show a column with the sum of periods"), - OPT_BOOLEAN('n', "show-nr-samples", &symbol_conf.show_nr_samples, --- -2.43.0 - diff --git a/queue-5.15/perf-bench-internals-inject-build-id-fix-trap-divide.patch b/queue-5.15/perf-bench-internals-inject-build-id-fix-trap-divide.patch deleted file mode 100644 index 2fd1a224e99..00000000000 --- a/queue-5.15/perf-bench-internals-inject-build-id-fix-trap-divide.patch +++ /dev/null @@ -1,55 +0,0 @@ -From f3871a32bc80a2c74afe7ccb3fecc92044a4084c Mon Sep 17 00:00:00 2001 -From: Sasha Levin -Date: Tue, 7 May 2024 14:50:26 +0800 -Subject: perf bench internals inject-build-id: Fix trap divide when collecting - just one DSO - -From: He Zhe - -[ Upstream commit d9180e23fbfa3875424d3a6b28b71b072862a52a ] - -'perf bench internals inject-build-id' suffers from the following error when -only one DSO is collected. - - # perf bench internals inject-build-id -v - Collected 1 DSOs - traps: internals-injec[2305] trap divide error - ip:557566ba6394 sp:7ffd4de97fe0 error:0 in perf[557566b2a000+23d000] - Build-id injection benchmark - Iteration #1 - Floating point exception - -This patch removes the unnecessary minus one from the divisor which also -corrects the randomization range. - -Signed-off-by: He Zhe -Fixes: 0bf02a0d80427f26 ("perf bench: Add build-id injection benchmark") -Cc: Adrian Hunter -Cc: Alexander Shishkin -Cc: Ian Rogers -Cc: Jiri Olsa -Cc: Mark Rutland -Cc: Namhyung Kim -Link: https://lore.kernel.org/r/20240507065026.2652929-1-zhe.he@windriver.com -Signed-off-by: Arnaldo Carvalho de Melo -Signed-off-by: Sasha Levin ---- - tools/perf/bench/inject-buildid.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/tools/perf/bench/inject-buildid.c b/tools/perf/bench/inject-buildid.c -index 17672790f1231..d1672be702f3b 100644 ---- a/tools/perf/bench/inject-buildid.c -+++ b/tools/perf/bench/inject-buildid.c -@@ -361,7 +361,7 @@ static int inject_build_id(struct bench_data *data, u64 *max_rss) - return -1; - - for (i = 0; i < nr_mmaps; i++) { -- int idx = rand() % (nr_dsos - 1); -+ int idx = rand() % nr_dsos; - struct bench_dso *dso = &dsos[idx]; - u64 timestamp = rand() % 1000000; - --- -2.43.0 - diff --git a/queue-5.15/perf-daemon-fix-file-leak-in-daemon_session__control.patch b/queue-5.15/perf-daemon-fix-file-leak-in-daemon_session__control.patch deleted file mode 100644 index f7ebf5a53ce..00000000000 --- a/queue-5.15/perf-daemon-fix-file-leak-in-daemon_session__control.patch +++ /dev/null @@ -1,59 +0,0 @@ -From 23cefd83b8a300f6cb8c90caea091def73cde8e9 Mon Sep 17 00:00:00 2001 -From: Sasha Levin -Date: Thu, 9 May 2024 17:34:24 -0700 -Subject: perf daemon: Fix file leak in daemon_session__control - -From: Samasth Norway Ananda - -[ Upstream commit 09541603462c399c7408d50295db99b4b8042eaa ] - -The open() function returns -1 on error. - -The 'control' and 'ack' file descriptors are both initialized with -open() and further validated with 'if' statement. - -'if (!control)' would evaluate to 'true' if returned value on error were -'0' but it is actually '-1'. - -Fixes: edcaa47958c7438b ("perf daemon: Add 'ping' command") -Signed-off-by: Samasth Norway Ananda -Cc: Adrian Hunter -Cc: Alexander Shishkin -Cc: Ian Rogers -Cc: Ingo Molnar -Cc: Jiri Olsa -Cc: Mark Rutland -Cc: Namhyung Kim -Cc: Peter Zijlstra -Link: https://lore.kernel.org/r/20240510003424.2016914-1-samasth.norway.ananda@oracle.com -Signed-off-by: Arnaldo Carvalho de Melo -Signed-off-by: Sasha Levin ---- - tools/perf/builtin-daemon.c | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/tools/perf/builtin-daemon.c b/tools/perf/builtin-daemon.c -index 61929f63a0474..361fbee36b35c 100644 ---- a/tools/perf/builtin-daemon.c -+++ b/tools/perf/builtin-daemon.c -@@ -523,7 +523,7 @@ static int daemon_session__control(struct daemon_session *session, - session->base, SESSION_CONTROL); - - control = open(control_path, O_WRONLY|O_NONBLOCK); -- if (!control) -+ if (control < 0) - return -1; - - if (do_ack) { -@@ -532,7 +532,7 @@ static int daemon_session__control(struct daemon_session *session, - session->base, SESSION_ACK); - - ack = open(ack_path, O_RDONLY, O_NONBLOCK); -- if (!ack) { -+ if (ack < 0) { - close(control); - return -1; - } --- -2.43.0 - diff --git a/queue-5.15/perf-docs-document-bpf-event-modifier.patch b/queue-5.15/perf-docs-document-bpf-event-modifier.patch deleted file mode 100644 index d77e5ffe670..00000000000 --- a/queue-5.15/perf-docs-document-bpf-event-modifier.patch +++ /dev/null @@ -1,48 +0,0 @@ -From 4f42f8715da7fc84dfd8a096258c13e15ce9f370 Mon Sep 17 00:00:00 2001 -From: Sasha Levin -Date: Tue, 16 Apr 2024 10:00:13 -0700 -Subject: perf docs: Document bpf event modifier - -From: Ian Rogers - -[ Upstream commit eb4d27cf9aef3e6c9bcaf8fa1a1cadc2433d847b ] - -Document that 'b' is used as a modifier to make an event use a BPF -counter. - -Fixes: 01bd8efcec444468 ("perf stat: Introduce ':b' modifier") -Signed-off-by: Ian Rogers -Cc: Adrian Hunter -Cc: Alexander Shishkin -Cc: Athira Rajeev -Cc: Ingo Molnar -Cc: Jiri Olsa -Cc: Kan Liang -Cc: Mark Rutland -Cc: Namhyung Kim -Cc: Peter Zijlstra -Cc: Ravi Bangoria -Cc: Song Liu -Cc: Thomas Richter -Link: https://lore.kernel.org/r/20240416170014.985191-1-irogers@google.com -Signed-off-by: Arnaldo Carvalho de Melo -Signed-off-by: Sasha Levin ---- - tools/perf/Documentation/perf-list.txt | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/tools/perf/Documentation/perf-list.txt b/tools/perf/Documentation/perf-list.txt -index 4c7db1da8fccc..a4881d32b318a 100644 ---- a/tools/perf/Documentation/perf-list.txt -+++ b/tools/perf/Documentation/perf-list.txt -@@ -59,6 +59,7 @@ counted. The following modifiers exist: - D - pin the event to the PMU - W - group is weak and will fallback to non-group if not schedulable, - e - group or event are exclusive and do not share the PMU -+ b - use BPF aggregration (see perf stat --bpf-counters) - - The 'p' modifier can be used for specifying how precise the instruction - address should be. The 'p' modifier can be specified multiple times: --- -2.43.0 - diff --git a/queue-5.15/perf-intel-pt-fix-unassigned-instruction-op-discover.patch b/queue-5.15/perf-intel-pt-fix-unassigned-instruction-op-discover.patch deleted file mode 100644 index b7bbeba0496..00000000000 --- a/queue-5.15/perf-intel-pt-fix-unassigned-instruction-op-discover.patch +++ /dev/null @@ -1,73 +0,0 @@ -From ecad851e518d9aa4eeb34a3f676c8d3f2123117d Mon Sep 17 00:00:00 2001 -From: Sasha Levin -Date: Tue, 26 Mar 2024 10:32:23 +0200 -Subject: perf intel-pt: Fix unassigned instruction op (discovered by - MemorySanitizer) - -From: Adrian Hunter - -[ Upstream commit e101a05f79fd4ee3e89d2f3fb716493c33a33708 ] - -MemorySanitizer discovered instances where the instruction op value was -not assigned.: - - WARNING: MemorySanitizer: use-of-uninitialized-value - #0 0x5581c00a76b3 in intel_pt_sample_flags tools/perf/util/intel-pt.c:1527:17 - Uninitialized value was stored to memory at - #0 0x5581c005ddf8 in intel_pt_walk_insn tools/perf/util/intel-pt-decoder/intel-pt-decoder.c:1256:25 - -The op value is used to set branch flags for branch instructions -encountered when walking the code, so fix by setting op to -INTEL_PT_OP_OTHER in other cases. - -Fixes: 4c761d805bb2d2ea ("perf intel-pt: Fix intel_pt_fup_event() assumptions about setting state type") -Reported-by: Ian Rogers -Signed-off-by: Adrian Hunter -Tested-by: Ian Rogers -Cc: Jiri Olsa -Cc: Namhyung Kim -Closes: https://lore.kernel.org/linux-perf-users/20240320162619.1272015-1-irogers@google.com/ -Link: https://lore.kernel.org/r/20240326083223.10883-1-adrian.hunter@intel.com -Signed-off-by: Arnaldo Carvalho de Melo -Signed-off-by: Sasha Levin ---- - tools/perf/util/intel-pt-decoder/intel-pt-decoder.c | 2 ++ - tools/perf/util/intel-pt.c | 2 ++ - 2 files changed, 4 insertions(+) - -diff --git a/tools/perf/util/intel-pt-decoder/intel-pt-decoder.c b/tools/perf/util/intel-pt-decoder/intel-pt-decoder.c -index b9f94f198a3eb..3530551b82819 100644 ---- a/tools/perf/util/intel-pt-decoder/intel-pt-decoder.c -+++ b/tools/perf/util/intel-pt-decoder/intel-pt-decoder.c -@@ -1215,6 +1215,8 @@ static bool intel_pt_fup_event(struct intel_pt_decoder *decoder) - bool ret = false; - - decoder->state.type &= ~INTEL_PT_BRANCH; -+ decoder->state.insn_op = INTEL_PT_OP_OTHER; -+ decoder->state.insn_len = 0; - - if (decoder->set_fup_tx_flags) { - decoder->set_fup_tx_flags = false; -diff --git a/tools/perf/util/intel-pt.c b/tools/perf/util/intel-pt.c -index 805bad9364e94..b00776c65c186 100644 ---- a/tools/perf/util/intel-pt.c -+++ b/tools/perf/util/intel-pt.c -@@ -721,6 +721,7 @@ static int intel_pt_walk_next_insn(struct intel_pt_insn *intel_pt_insn, - bool nr; - - intel_pt_insn->length = 0; -+ intel_pt_insn->op = INTEL_PT_OP_OTHER; - - if (to_ip && *ip == to_ip) - goto out_no_cache; -@@ -816,6 +817,7 @@ static int intel_pt_walk_next_insn(struct intel_pt_insn *intel_pt_insn, - - if (to_ip && *ip == to_ip) { - intel_pt_insn->length = 0; -+ intel_pt_insn->op = INTEL_PT_OP_OTHER; - goto out_no_cache; - } - --- -2.43.0 - diff --git a/queue-5.15/perf-probe-add-missing-libgen.h-header-needed-for-us.patch b/queue-5.15/perf-probe-add-missing-libgen.h-header-needed-for-us.patch deleted file mode 100644 index e98617bf537..00000000000 --- a/queue-5.15/perf-probe-add-missing-libgen.h-header-needed-for-us.patch +++ /dev/null @@ -1,53 +0,0 @@ -From 0269c1e4bbe438579b7eb484f9d66187f902a5e3 Mon Sep 17 00:00:00 2001 -From: Sasha Levin -Date: Thu, 21 Mar 2024 11:13:30 -0300 -Subject: perf probe: Add missing libgen.h header needed for using basename() - -From: Arnaldo Carvalho de Melo - -[ Upstream commit 581037151910126a7934e369e4b6ac70eda9a703 ] - -This prototype is obtained indirectly, by luck, from some other header -in probe-event.c in most systems, but recently exploded on alpine:edge: - - 8 13.39 alpine:edge : FAIL gcc version 13.2.1 20240309 (Alpine 13.2.1_git20240309) - util/probe-event.c: In function 'convert_exec_to_group': - util/probe-event.c:225:16: error: implicit declaration of function 'basename' [-Werror=implicit-function-declaration] - 225 | ptr1 = basename(exec_copy); - | ^~~~~~~~ - util/probe-event.c:225:14: error: assignment to 'char *' from 'int' makes pointer from integer without a cast [-Werror=int-conversion] - 225 | ptr1 = basename(exec_copy); - | ^ - cc1: all warnings being treated as errors - make[3]: *** [/git/perf-6.8.0/tools/build/Makefile.build:158: util] Error 2 - -Fix it by adding the libgen.h header where basename() is prototyped. - -Fixes: fb7345bbf7fad9bf ("perf probe: Support basic dwarf-based operations on uprobe events") -Cc: Masami Hiramatsu -Cc: Adrian Hunter -Cc: Ian Rogers -Cc: Jiri Olsa -Cc: Namhyung Kim -Link: https://lore.kernel.org/lkml/ -Signed-off-by: Arnaldo Carvalho de Melo -Signed-off-by: Sasha Levin ---- - tools/perf/util/probe-event.c | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/tools/perf/util/probe-event.c b/tools/perf/util/probe-event.c -index 68844c48f688a..454a7e2325d87 100644 ---- a/tools/perf/util/probe-event.c -+++ b/tools/perf/util/probe-event.c -@@ -11,6 +11,7 @@ - #include - #include - #include -+#include - #include - #include - #include --- -2.43.0 - diff --git a/queue-5.15/perf-record-delete-session-after-stopping-sideband-t.patch b/queue-5.15/perf-record-delete-session-after-stopping-sideband-t.patch deleted file mode 100644 index 48f1cd28a4e..00000000000 --- a/queue-5.15/perf-record-delete-session-after-stopping-sideband-t.patch +++ /dev/null @@ -1,83 +0,0 @@ -From 15a3e7e34157f54d4266ae16435f000c33bb5a4d Mon Sep 17 00:00:00 2001 -From: Sasha Levin -Date: Thu, 29 Feb 2024 23:46:36 -0800 -Subject: perf record: Delete session after stopping sideband thread - -From: Ian Rogers - -[ Upstream commit 88ce0106a1f603bf360cb397e8fe293f8298fabb ] - -The session has a header in it which contains a perf env with -bpf_progs. The bpf_progs are accessed by the sideband thread and so -the sideband thread must be stopped before the session is deleted, to -avoid a use after free. This error was detected by AddressSanitizer -in the following: - - ==2054673==ERROR: AddressSanitizer: heap-use-after-free on address 0x61d000161e00 at pc 0x55769289de54 bp 0x7f9df36d4ab0 sp 0x7f9df36d4aa8 - READ of size 8 at 0x61d000161e00 thread T1 - #0 0x55769289de53 in __perf_env__insert_bpf_prog_info util/env.c:42 - #1 0x55769289dbb1 in perf_env__insert_bpf_prog_info util/env.c:29 - #2 0x557692bbae29 in perf_env__add_bpf_info util/bpf-event.c:483 - #3 0x557692bbb01a in bpf_event__sb_cb util/bpf-event.c:512 - #4 0x5576928b75f4 in perf_evlist__poll_thread util/sideband_evlist.c:68 - #5 0x7f9df96a63eb in start_thread nptl/pthread_create.c:444 - #6 0x7f9df9726a4b in clone3 ../sysdeps/unix/sysv/linux/x86_64/clone3.S:81 - - 0x61d000161e00 is located 384 bytes inside of 2136-byte region [0x61d000161c80,0x61d0001624d8) - freed by thread T0 here: - #0 0x7f9dfa6d7288 in __interceptor_free libsanitizer/asan/asan_malloc_linux.cpp:52 - #1 0x557692978d50 in perf_session__delete util/session.c:319 - #2 0x557692673959 in __cmd_record tools/perf/builtin-record.c:2884 - #3 0x55769267a9f0 in cmd_record tools/perf/builtin-record.c:4259 - #4 0x55769286710c in run_builtin tools/perf/perf.c:349 - #5 0x557692867678 in handle_internal_command tools/perf/perf.c:402 - #6 0x557692867a40 in run_argv tools/perf/perf.c:446 - #7 0x557692867fae in main tools/perf/perf.c:562 - #8 0x7f9df96456c9 in __libc_start_call_main ../sysdeps/nptl/libc_start_call_main.h:58 - -Fixes: 657ee5531903339b ("perf evlist: Introduce side band thread") -Signed-off-by: Ian Rogers -Cc: Adrian Hunter -Cc: Alexander Shishkin -Cc: Athira Rajeev -Cc: Christian Brauner -Cc: Disha Goel -Cc: Ingo Molnar -Cc: James Clark -Cc: Jiri Olsa -Cc: Kajol Jain -Cc: Kan Liang -Cc: K Prateek Nayak -Cc: Mark Rutland -Cc: Namhyung Kim -Cc: Peter Zijlstra -Cc: Song Liu -Cc: Tim Chen -Cc: Yicong Yang -Link: https://lore.kernel.org/r/20240301074639.2260708-1-irogers@google.com -Signed-off-by: Arnaldo Carvalho de Melo -Signed-off-by: Sasha Levin ---- - tools/perf/builtin-record.c | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/tools/perf/builtin-record.c b/tools/perf/builtin-record.c -index b92c26f6aa1d7..95ea3a9867c58 100644 ---- a/tools/perf/builtin-record.c -+++ b/tools/perf/builtin-record.c -@@ -2075,10 +2075,10 @@ static int __cmd_record(struct record *rec, int argc, const char **argv) - close(done_fd); - #endif - zstd_fini(&session->zstd_data); -- perf_session__delete(session); -- - if (!opts->no_bpf_event) - evlist__stop_sb_thread(rec->sb_evlist); -+ -+ perf_session__delete(session); - return status; - } - --- -2.43.0 - diff --git a/queue-5.15/perf-report-avoid-segv-in-report__setup_sample_type.patch b/queue-5.15/perf-report-avoid-segv-in-report__setup_sample_type.patch deleted file mode 100644 index 7039796e6f2..00000000000 --- a/queue-5.15/perf-report-avoid-segv-in-report__setup_sample_type.patch +++ /dev/null @@ -1,47 +0,0 @@ -From 15897057f237580ce882273caa03c498a22d1efe Mon Sep 17 00:00:00 2001 -From: Sasha Levin -Date: Tue, 7 May 2024 20:53:00 -0700 -Subject: perf report: Avoid SEGV in report__setup_sample_type() - -From: Ian Rogers - -[ Upstream commit 45b4f402a6b782352c4bafcff682bfb01da9ca05 ] - -In some cases evsel->name is lazily initialized in evsel__name(). If not -initialized passing NULL to strstr() leads to a SEGV. - -Fixes: ccb17caecfbd542f ("perf report: Set PERF_SAMPLE_DATA_SRC bit for Arm SPE event") -Signed-off-by: Ian Rogers -Cc: Adrian Hunter -Cc: Alexander Shishkin -Cc: Ingo Molnar -Cc: James Clark -Cc: Jiri Olsa -Cc: Kan Liang -Cc: Leo Yan -Cc: Mark Rutland -Cc: Namhyung Kim -Cc: Peter Zijlstra -Link: https://lore.kernel.org/r/20240508035301.1554434-4-irogers@google.com -Signed-off-by: Arnaldo Carvalho de Melo -Signed-off-by: Sasha Levin ---- - tools/perf/builtin-report.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/tools/perf/builtin-report.c b/tools/perf/builtin-report.c -index 6583ad9cc7deb..35bf3b01d9cc7 100644 ---- a/tools/perf/builtin-report.c -+++ b/tools/perf/builtin-report.c -@@ -410,7 +410,7 @@ static int report__setup_sample_type(struct report *rep) - * compatibility, set the bit if it's an old perf data file. - */ - evlist__for_each_entry(session->evlist, evsel) { -- if (strstr(evsel->name, "arm_spe") && -+ if (strstr(evsel__name(evsel), "arm_spe") && - !(sample_type & PERF_SAMPLE_DATA_SRC)) { - evsel->core.attr.sample_type |= PERF_SAMPLE_DATA_SRC; - sample_type |= PERF_SAMPLE_DATA_SRC; --- -2.43.0 - diff --git a/queue-5.15/perf-stat-don-t-display-metric-header-for-non-leader.patch b/queue-5.15/perf-stat-don-t-display-metric-header-for-non-leader.patch deleted file mode 100644 index 4b63896506f..00000000000 --- a/queue-5.15/perf-stat-don-t-display-metric-header-for-non-leader.patch +++ /dev/null @@ -1,90 +0,0 @@ -From ffe4bafb4030031521db5d98e0de427226d65800 Mon Sep 17 00:00:00 2001 -From: Sasha Levin -Date: Thu, 9 May 2024 22:13:09 -0700 -Subject: perf stat: Don't display metric header for non-leader uncore events - -From: Ian Rogers - -[ Upstream commit 193a9e30207f54777ff42d0d8be8389edc522277 ] - -On an Intel tigerlake laptop a metric like: - - { - "BriefDescription": "Test", - "MetricExpr": "imc_free_running@data_read@ + imc_free_running@data_write@", - "MetricGroup": "Test", - "MetricName": "Test", - "ScaleUnit": "6.103515625e-5MiB" - }, - -Will have 4 events: - - uncore_imc_free_running_0/data_read/ - uncore_imc_free_running_0/data_write/ - uncore_imc_free_running_1/data_read/ - uncore_imc_free_running_1/data_write/ - -If aggregration is disabled with metric-only 2 column headers are -needed: - - $ perf stat -M test --metric-only -A -a sleep 1 - - Performance counter stats for 'system wide': - - MiB Test MiB Test - CPU0 1821.0 1820.5 - -But when not, the counts aggregated in the metric leader and only 1 -column should be shown: - - $ perf stat -M test --metric-only -a sleep 1 - Performance counter stats for 'system wide': - - MiB Test - 5909.4 - - 1.001258915 seconds time elapsed - -Achieve this by skipping events that aren't metric leaders when -printing column headers and aggregation isn't disabled. - -The bug is long standing, the fixes tag is set to a refactor as that -is as far back as is reasonable to backport. - -Fixes: 088519f318be3a41 ("perf stat: Move the display functions to stat-display.c") -Signed-off-by: Ian Rogers -Cc: Adrian Hunter -Cc: Alexander Shishkin -Cc: Ingo Molnar -Cc: Jiri Olsa -Cc: Kaige Ye -Cc: Kan Liang -Cc: K Prateek Nayak -Cc: Mark Rutland -Cc: Namhyung Kim -Cc: Peter Zijlstra -Cc: Yicong Yang -Link: https://lore.kernel.org/r/20240510051309.2452468-1-irogers@google.com -Signed-off-by: Arnaldo Carvalho de Melo -Signed-off-by: Sasha Levin ---- - tools/perf/util/stat-display.c | 3 +++ - 1 file changed, 3 insertions(+) - -diff --git a/tools/perf/util/stat-display.c b/tools/perf/util/stat-display.c -index 5ed20e1e09aef..79384e8326c65 100644 ---- a/tools/perf/util/stat-display.c -+++ b/tools/perf/util/stat-display.c -@@ -1000,6 +1000,9 @@ static void print_metric_headers(struct perf_stat_config *config, - - /* Print metrics headers only */ - evlist__for_each_entry(evlist, counter) { -+ if (config->aggr_mode != AGGR_NONE && counter->metric_leader != counter) -+ continue; -+ - os.evsel = counter; - out.ctx = &os; - out.print_metric = print_metric_header; --- -2.43.0 - diff --git a/queue-5.15/perf-top-fix-tui-exit-screen-refresh-race-condition.patch b/queue-5.15/perf-top-fix-tui-exit-screen-refresh-race-condition.patch deleted file mode 100644 index d8733f2d230..00000000000 --- a/queue-5.15/perf-top-fix-tui-exit-screen-refresh-race-condition.patch +++ /dev/null @@ -1,75 +0,0 @@ -From a905d6053ba71300556fbc81850d9d50abbc0bea Mon Sep 17 00:00:00 2001 -From: Sasha Levin -Date: Wed, 29 Dec 2021 16:55:19 +0800 -Subject: perf top: Fix TUI exit screen refresh race condition - -From: yaowenbin - -[ Upstream commit 64f18d2d043015b3f835ce4c9f3beb97cfd19b6e ] - -When the following command is executed several times, a coredump file is -generated. - - $ timeout -k 9 5 perf top -e task-clock - ******* - ******* - ******* - 0.01% [kernel] [k] __do_softirq - 0.01% libpthread-2.28.so [.] __pthread_mutex_lock - 0.01% [kernel] [k] __ll_sc_atomic64_sub_return - double free or corruption (!prev) perf top --sort comm,dso - timeout: the monitored command dumped core - -When we terminate "perf top" using sending signal method, -SLsmg_reset_smg() called. SLsmg_reset_smg() resets the SLsmg screen -management routines by freeing all memory allocated while it was active. - -However SLsmg_reinit_smg() maybe be called by another thread. - -SLsmg_reinit_smg() will free the same memory accessed by -SLsmg_reset_smg(), thus it results in a double free. - -SLsmg_reinit_smg() is called already protected by ui__lock, so we fix -the problem by adding pthread_mutex_trylock of ui__lock when calling -SLsmg_reset_smg(). - -Signed-off-by: Wenyu Liu -Tested-by: Arnaldo Carvalho de Melo -Cc: Alexander Shishkin -Cc: Jiri Olsa -Cc: Mark Rutland -Cc: Namhyung Kim -Cc: Peter Zijlstra -Cc: wuxu.wu@huawei.com -Link: http://lore.kernel.org/lkml/a91e3943-7ddc-f5c0-a7f5-360f073c20e6@huawei.com -Signed-off-by: Hewenliang -Signed-off-by: yaowenbin -Signed-off-by: Arnaldo Carvalho de Melo -Stable-dep-of: 769e6a1e15bd ("perf ui browser: Don't save pointer to stack memory") -Signed-off-by: Sasha Levin ---- - tools/perf/ui/tui/setup.c | 8 +++++--- - 1 file changed, 5 insertions(+), 3 deletions(-) - -diff --git a/tools/perf/ui/tui/setup.c b/tools/perf/ui/tui/setup.c -index e9bfe856a5dee..b1be59b4e2a4f 100644 ---- a/tools/perf/ui/tui/setup.c -+++ b/tools/perf/ui/tui/setup.c -@@ -170,9 +170,11 @@ void ui__exit(bool wait_for_ok) - "Press any key...", 0); - - SLtt_set_cursor_visibility(1); -- SLsmg_refresh(); -- SLsmg_reset_smg(); -+ if (!pthread_mutex_trylock(&ui__lock)) { -+ SLsmg_refresh(); -+ SLsmg_reset_smg(); -+ pthread_mutex_unlock(&ui__lock); -+ } - SLang_reset_tty(); -- - perf_error__unregister(&perf_tui_eops); - } --- -2.43.0 - diff --git a/queue-5.15/perf-ui-browser-avoid-segv-on-title.patch b/queue-5.15/perf-ui-browser-avoid-segv-on-title.patch deleted file mode 100644 index 9e725411c4f..00000000000 --- a/queue-5.15/perf-ui-browser-avoid-segv-on-title.patch +++ /dev/null @@ -1,46 +0,0 @@ -From c7b044007100f3cde867dc2ba44d46060431a69d Mon Sep 17 00:00:00 2001 -From: Sasha Levin -Date: Tue, 7 May 2024 20:52:58 -0700 -Subject: perf ui browser: Avoid SEGV on title - -From: Ian Rogers - -[ Upstream commit 90f01afb0dfafbc9b094bb61e61a4ac297d9d0d2 ] - -If the title is NULL then it can lead to a SEGV. - -Fixes: 769e6a1e15bdbbaf ("perf ui browser: Don't save pointer to stack memory") -Signed-off-by: Ian Rogers -Cc: Adrian Hunter -Cc: Alexander Shishkin -Cc: Ingo Molnar -Cc: James Clark -Cc: Jiri Olsa -Cc: Kan Liang -Cc: Leo Yan -Cc: Mark Rutland -Cc: Namhyung Kim -Cc: Peter Zijlstra -Link: https://lore.kernel.org/r/20240508035301.1554434-2-irogers@google.com -Signed-off-by: Arnaldo Carvalho de Melo -Signed-off-by: Sasha Levin ---- - tools/perf/ui/browser.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/tools/perf/ui/browser.c b/tools/perf/ui/browser.c -index d09b4cbec6e06..5d6f4f25c33d0 100644 ---- a/tools/perf/ui/browser.c -+++ b/tools/perf/ui/browser.c -@@ -203,7 +203,7 @@ void ui_browser__refresh_dimensions(struct ui_browser *browser) - void ui_browser__handle_resize(struct ui_browser *browser) - { - ui__refresh_dimensions(false); -- ui_browser__show(browser, browser->title, ui_helpline__current); -+ ui_browser__show(browser, browser->title ?: "", ui_helpline__current); - ui_browser__refresh(browser); - } - --- -2.43.0 - diff --git a/queue-5.15/perf-ui-browser-don-t-save-pointer-to-stack-memory.patch b/queue-5.15/perf-ui-browser-don-t-save-pointer-to-stack-memory.patch deleted file mode 100644 index 2b8ed075e5f..00000000000 --- a/queue-5.15/perf-ui-browser-don-t-save-pointer-to-stack-memory.patch +++ /dev/null @@ -1,143 +0,0 @@ -From 3abee371def089c74b8b5c582dcdb541c8fcef3a Mon Sep 17 00:00:00 2001 -From: Sasha Levin -Date: Tue, 7 May 2024 11:35:38 -0700 -Subject: perf ui browser: Don't save pointer to stack memory - -From: Ian Rogers - -[ Upstream commit 769e6a1e15bdbbaf2b0d2f37c24f2c53268bd21f ] - -ui_browser__show() is capturing the input title that is stack allocated -memory in hist_browser__run(). - -Avoid a use after return by strdup-ing the string. - -Committer notes: - -Further explanation from Ian Rogers: - -My command line using tui is: -$ sudo bash -c 'rm /tmp/asan.log*; export -ASAN_OPTIONS="log_path=/tmp/asan.log"; /tmp/perf/perf mem record -a -sleep 1; /tmp/perf/perf mem report' -I then go to the perf annotate view and quit. This triggers the asan -error (from the log file): -``` -==1254591==ERROR: AddressSanitizer: stack-use-after-return on address -0x7f2813331920 at pc 0x7f28180 -65991 bp 0x7fff0a21c750 sp 0x7fff0a21bf10 -READ of size 80 at 0x7f2813331920 thread T0 - #0 0x7f2818065990 in __interceptor_strlen -../../../../src/libsanitizer/sanitizer_common/sanitizer_common_interceptors.inc:461 - #1 0x7f2817698251 in SLsmg_write_wrapped_string -(/lib/x86_64-linux-gnu/libslang.so.2+0x98251) - #2 0x7f28176984b9 in SLsmg_write_nstring -(/lib/x86_64-linux-gnu/libslang.so.2+0x984b9) - #3 0x55c94045b365 in ui_browser__write_nstring ui/browser.c:60 - #4 0x55c94045c558 in __ui_browser__show_title ui/browser.c:266 - #5 0x55c94045c776 in ui_browser__show ui/browser.c:288 - #6 0x55c94045c06d in ui_browser__handle_resize ui/browser.c:206 - #7 0x55c94047979b in do_annotate ui/browsers/hists.c:2458 - #8 0x55c94047fb17 in evsel__hists_browse ui/browsers/hists.c:3412 - #9 0x55c940480a0c in perf_evsel_menu__run ui/browsers/hists.c:3527 - #10 0x55c940481108 in __evlist__tui_browse_hists ui/browsers/hists.c:3613 - #11 0x55c9404813f7 in evlist__tui_browse_hists ui/browsers/hists.c:3661 - #12 0x55c93ffa253f in report__browse_hists tools/perf/builtin-report.c:671 - #13 0x55c93ffa58ca in __cmd_report tools/perf/builtin-report.c:1141 - #14 0x55c93ffaf159 in cmd_report tools/perf/builtin-report.c:1805 - #15 0x55c94000c05c in report_events tools/perf/builtin-mem.c:374 - #16 0x55c94000d96d in cmd_mem tools/perf/builtin-mem.c:516 - #17 0x55c9400e44ee in run_builtin tools/perf/perf.c:350 - #18 0x55c9400e4a5a in handle_internal_command tools/perf/perf.c:403 - #19 0x55c9400e4e22 in run_argv tools/perf/perf.c:447 - #20 0x55c9400e53ad in main tools/perf/perf.c:561 - #21 0x7f28170456c9 in __libc_start_call_main -../sysdeps/nptl/libc_start_call_main.h:58 - #22 0x7f2817045784 in __libc_start_main_impl ../csu/libc-start.c:360 - #23 0x55c93ff544c0 in _start (/tmp/perf/perf+0x19a4c0) (BuildId: -84899b0e8c7d3a3eaa67b2eb35e3d8b2f8cd4c93) - -Address 0x7f2813331920 is located in stack of thread T0 at offset 32 in frame - #0 0x55c94046e85e in hist_browser__run ui/browsers/hists.c:746 - - This frame has 1 object(s): - [32, 192) 'title' (line 747) <== Memory access at offset 32 is -inside this variable -HINT: this may be a false positive if your program uses some custom -stack unwind mechanism, swapcontext or vfork -``` -hist_browser__run isn't on the stack so the asan error looks legit. -There's no clean init/exit on struct ui_browser so I may be trading a -use-after-return for a memory leak, but that seems look a good trade -anyway. - -Fixes: 05e8b0804ec4 ("perf ui browser: Stop using 'self'") -Signed-off-by: Ian Rogers -Cc: Adrian Hunter -Cc: Alexander Shishkin -Cc: Andi Kleen -Cc: Athira Rajeev -Cc: Ben Gainey -Cc: Ingo Molnar -Cc: James Clark -Cc: Jiri Olsa -Cc: Kajol Jain -Cc: Kan Liang -Cc: K Prateek Nayak -Cc: Li Dong -Cc: Mark Rutland -Cc: Namhyung Kim -Cc: Oliver Upton -Cc: Paran Lee -Cc: Peter Zijlstra -Cc: Ravi Bangoria -Cc: Sun Haiyong -Cc: Tim Chen -Cc: Yanteng Si -Cc: Yicong Yang -Link: https://lore.kernel.org/r/20240507183545.1236093-2-irogers@google.com -Signed-off-by: Arnaldo Carvalho de Melo -Signed-off-by: Sasha Levin ---- - tools/perf/ui/browser.c | 4 +++- - tools/perf/ui/browser.h | 2 +- - 2 files changed, 4 insertions(+), 2 deletions(-) - -diff --git a/tools/perf/ui/browser.c b/tools/perf/ui/browser.c -index 78fb01d6ad63f..d09b4cbec6e06 100644 ---- a/tools/perf/ui/browser.c -+++ b/tools/perf/ui/browser.c -@@ -287,7 +287,8 @@ int ui_browser__show(struct ui_browser *browser, const char *title, - mutex_lock(&ui__lock); - __ui_browser__show_title(browser, title); - -- browser->title = title; -+ free(browser->title); -+ browser->title = strdup(title); - zfree(&browser->helpline); - - va_start(ap, helpline); -@@ -304,6 +305,7 @@ void ui_browser__hide(struct ui_browser *browser) - mutex_lock(&ui__lock); - ui_helpline__pop(); - zfree(&browser->helpline); -+ zfree(&browser->title); - mutex_unlock(&ui__lock); - } - -diff --git a/tools/perf/ui/browser.h b/tools/perf/ui/browser.h -index 510ce45540501..6e98d5f8f71cc 100644 ---- a/tools/perf/ui/browser.h -+++ b/tools/perf/ui/browser.h -@@ -21,7 +21,7 @@ struct ui_browser { - u8 extra_title_lines; - int current_color; - void *priv; -- const char *title; -+ char *title; - char *helpline; - const char *no_samples_msg; - void (*refresh_dimensions)(struct ui_browser *browser); --- -2.43.0 - diff --git a/queue-5.15/perf-ui-update-use-of-pthread-mutex.patch b/queue-5.15/perf-ui-update-use-of-pthread-mutex.patch deleted file mode 100644 index 7983acfc335..00000000000 --- a/queue-5.15/perf-ui-update-use-of-pthread-mutex.patch +++ /dev/null @@ -1,382 +0,0 @@ -From 27af52a19803b179766447e4b79fe4e8b9f89091 Mon Sep 17 00:00:00 2001 -From: Sasha Levin -Date: Fri, 26 Aug 2022 09:42:33 -0700 -Subject: perf ui: Update use of pthread mutex -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -From: Ian Rogers - -[ Upstream commit 82aff6cc070417f26f9b02b26e63c17ff43b4044 ] - -Switch to the use of mutex wrappers that provide better error checking. - -Signed-off-by: Ian Rogers -Cc: Adrian Hunter -Cc: Alexander Shishkin -Cc: Alexandre Truong -Cc: Alexey Bayduraev -Cc: Andi Kleen -Cc: Andres Freund -Cc: Andrii Nakryiko -Cc: André Almeida -Cc: Athira Jajeev -Cc: Christophe JAILLET -Cc: Colin Ian King -Cc: Dario Petrillo -Cc: Darren Hart -Cc: Dave Marchevsky -Cc: Davidlohr Bueso -Cc: Fangrui Song -Cc: Hewenliang -Cc: Ingo Molnar -Cc: James Clark -Cc: Jason Wang -Cc: Jiri Olsa -Cc: Kajol Jain -Cc: Kim Phillips -Cc: Leo Yan -Cc: Mark Rutland -Cc: Martin Liška -Cc: Masami Hiramatsu -Cc: Nathan Chancellor -Cc: Nick Desaulniers -Cc: Pavithra Gurushankar -Cc: Peter Zijlstra -Cc: Quentin Monnet -Cc: Ravi Bangoria -Cc: Remi Bernon -Cc: Riccardo Mancini -Cc: Song Liu -Cc: Stephane Eranian -Cc: Thomas Gleixner -Cc: Thomas Richter -Cc: Tom Rix -Cc: Weiguo Li -Cc: Wenyu Liu -Cc: William Cohen -Cc: Zechuan Chen -Cc: bpf@vger.kernel.org -Cc: llvm@lists.linux.dev -Cc: yaowenbin -Link: https://lore.kernel.org/r/20220826164242.43412-10-irogers@google.com -Signed-off-by: Arnaldo Carvalho de Melo -Stable-dep-of: 769e6a1e15bd ("perf ui browser: Don't save pointer to stack memory") -Signed-off-by: Sasha Levin ---- - tools/perf/ui/browser.c | 20 ++++++++++---------- - tools/perf/ui/browsers/annotate.c | 2 +- - tools/perf/ui/setup.c | 5 +++-- - tools/perf/ui/tui/helpline.c | 5 ++--- - tools/perf/ui/tui/progress.c | 8 ++++---- - tools/perf/ui/tui/setup.c | 8 ++++---- - tools/perf/ui/tui/util.c | 18 +++++++++--------- - tools/perf/ui/ui.h | 4 ++-- - 8 files changed, 35 insertions(+), 35 deletions(-) - -diff --git a/tools/perf/ui/browser.c b/tools/perf/ui/browser.c -index fa5bd5c20e96b..78fb01d6ad63f 100644 ---- a/tools/perf/ui/browser.c -+++ b/tools/perf/ui/browser.c -@@ -268,9 +268,9 @@ void __ui_browser__show_title(struct ui_browser *browser, const char *title) - - void ui_browser__show_title(struct ui_browser *browser, const char *title) - { -- pthread_mutex_lock(&ui__lock); -+ mutex_lock(&ui__lock); - __ui_browser__show_title(browser, title); -- pthread_mutex_unlock(&ui__lock); -+ mutex_unlock(&ui__lock); - } - - int ui_browser__show(struct ui_browser *browser, const char *title, -@@ -284,7 +284,7 @@ int ui_browser__show(struct ui_browser *browser, const char *title, - - browser->refresh_dimensions(browser); - -- pthread_mutex_lock(&ui__lock); -+ mutex_lock(&ui__lock); - __ui_browser__show_title(browser, title); - - browser->title = title; -@@ -295,16 +295,16 @@ int ui_browser__show(struct ui_browser *browser, const char *title, - va_end(ap); - if (err > 0) - ui_helpline__push(browser->helpline); -- pthread_mutex_unlock(&ui__lock); -+ mutex_unlock(&ui__lock); - return err ? 0 : -1; - } - - void ui_browser__hide(struct ui_browser *browser) - { -- pthread_mutex_lock(&ui__lock); -+ mutex_lock(&ui__lock); - ui_helpline__pop(); - zfree(&browser->helpline); -- pthread_mutex_unlock(&ui__lock); -+ mutex_unlock(&ui__lock); - } - - static void ui_browser__scrollbar_set(struct ui_browser *browser) -@@ -352,9 +352,9 @@ static int __ui_browser__refresh(struct ui_browser *browser) - - int ui_browser__refresh(struct ui_browser *browser) - { -- pthread_mutex_lock(&ui__lock); -+ mutex_lock(&ui__lock); - __ui_browser__refresh(browser); -- pthread_mutex_unlock(&ui__lock); -+ mutex_unlock(&ui__lock); - - return 0; - } -@@ -390,10 +390,10 @@ int ui_browser__run(struct ui_browser *browser, int delay_secs) - while (1) { - off_t offset; - -- pthread_mutex_lock(&ui__lock); -+ mutex_lock(&ui__lock); - err = __ui_browser__refresh(browser); - SLsmg_refresh(); -- pthread_mutex_unlock(&ui__lock); -+ mutex_unlock(&ui__lock); - if (err < 0) - break; - -diff --git a/tools/perf/ui/browsers/annotate.c b/tools/perf/ui/browsers/annotate.c -index 44ba900828f6c..b8747e8dd9ea4 100644 ---- a/tools/perf/ui/browsers/annotate.c -+++ b/tools/perf/ui/browsers/annotate.c -@@ -8,11 +8,11 @@ - #include "../../util/hist.h" - #include "../../util/sort.h" - #include "../../util/map.h" -+#include "../../util/mutex.h" - #include "../../util/symbol.h" - #include "../../util/evsel.h" - #include "../../util/evlist.h" - #include --#include - #include - #include - #include -diff --git a/tools/perf/ui/setup.c b/tools/perf/ui/setup.c -index 700335cde6180..25ded88801a3d 100644 ---- a/tools/perf/ui/setup.c -+++ b/tools/perf/ui/setup.c -@@ -1,5 +1,4 @@ - // SPDX-License-Identifier: GPL-2.0 --#include - #include - #include - -@@ -8,7 +7,7 @@ - #include "../util/hist.h" - #include "ui.h" - --pthread_mutex_t ui__lock = PTHREAD_MUTEX_INITIALIZER; -+struct mutex ui__lock; - void *perf_gtk_handle; - int use_browser = -1; - -@@ -76,6 +75,7 @@ int stdio__config_color(const struct option *opt __maybe_unused, - - void setup_browser(bool fallback_to_pager) - { -+ mutex_init(&ui__lock); - if (use_browser < 2 && (!isatty(1) || dump_trace)) - use_browser = 0; - -@@ -118,4 +118,5 @@ void exit_browser(bool wait_for_ok) - default: - break; - } -+ mutex_destroy(&ui__lock); - } -diff --git a/tools/perf/ui/tui/helpline.c b/tools/perf/ui/tui/helpline.c -index 298d6af82fddd..db4952f5990bd 100644 ---- a/tools/perf/ui/tui/helpline.c -+++ b/tools/perf/ui/tui/helpline.c -@@ -2,7 +2,6 @@ - #include - #include - #include --#include - #include - #include - -@@ -33,7 +32,7 @@ static int tui_helpline__show(const char *format, va_list ap) - int ret; - static int backlog; - -- pthread_mutex_lock(&ui__lock); -+ mutex_lock(&ui__lock); - ret = vscnprintf(ui_helpline__last_msg + backlog, - sizeof(ui_helpline__last_msg) - backlog, format, ap); - backlog += ret; -@@ -45,7 +44,7 @@ static int tui_helpline__show(const char *format, va_list ap) - SLsmg_refresh(); - backlog = 0; - } -- pthread_mutex_unlock(&ui__lock); -+ mutex_unlock(&ui__lock); - - return ret; - } -diff --git a/tools/perf/ui/tui/progress.c b/tools/perf/ui/tui/progress.c -index 3d74af5a7ece6..71b6c8d9474fb 100644 ---- a/tools/perf/ui/tui/progress.c -+++ b/tools/perf/ui/tui/progress.c -@@ -45,7 +45,7 @@ static void tui_progress__update(struct ui_progress *p) - } - - ui__refresh_dimensions(false); -- pthread_mutex_lock(&ui__lock); -+ mutex_lock(&ui__lock); - y = SLtt_Screen_Rows / 2 - 2; - SLsmg_set_color(0); - SLsmg_draw_box(y, 0, 3, SLtt_Screen_Cols); -@@ -56,7 +56,7 @@ static void tui_progress__update(struct ui_progress *p) - bar = ((SLtt_Screen_Cols - 2) * p->curr) / p->total; - SLsmg_fill_region(y, 1, 1, bar, ' '); - SLsmg_refresh(); -- pthread_mutex_unlock(&ui__lock); -+ mutex_unlock(&ui__lock); - } - - static void tui_progress__finish(void) -@@ -67,12 +67,12 @@ static void tui_progress__finish(void) - return; - - ui__refresh_dimensions(false); -- pthread_mutex_lock(&ui__lock); -+ mutex_lock(&ui__lock); - y = SLtt_Screen_Rows / 2 - 2; - SLsmg_set_color(0); - SLsmg_fill_region(y, 0, 3, SLtt_Screen_Cols, ' '); - SLsmg_refresh(); -- pthread_mutex_unlock(&ui__lock); -+ mutex_unlock(&ui__lock); - } - - static struct ui_progress_ops tui_progress__ops = { -diff --git a/tools/perf/ui/tui/setup.c b/tools/perf/ui/tui/setup.c -index b1be59b4e2a4f..a3b8c397c24d5 100644 ---- a/tools/perf/ui/tui/setup.c -+++ b/tools/perf/ui/tui/setup.c -@@ -29,10 +29,10 @@ void ui__refresh_dimensions(bool force) - { - if (force || ui__need_resize) { - ui__need_resize = 0; -- pthread_mutex_lock(&ui__lock); -+ mutex_lock(&ui__lock); - SLtt_get_screen_size(); - SLsmg_reinit_smg(); -- pthread_mutex_unlock(&ui__lock); -+ mutex_unlock(&ui__lock); - } - } - -@@ -170,10 +170,10 @@ void ui__exit(bool wait_for_ok) - "Press any key...", 0); - - SLtt_set_cursor_visibility(1); -- if (!pthread_mutex_trylock(&ui__lock)) { -+ if (mutex_trylock(&ui__lock)) { - SLsmg_refresh(); - SLsmg_reset_smg(); -- pthread_mutex_unlock(&ui__lock); -+ mutex_unlock(&ui__lock); - } - SLang_reset_tty(); - perf_error__unregister(&perf_tui_eops); -diff --git a/tools/perf/ui/tui/util.c b/tools/perf/ui/tui/util.c -index 0f562e2cb1e88..3c5174854ac8b 100644 ---- a/tools/perf/ui/tui/util.c -+++ b/tools/perf/ui/tui/util.c -@@ -95,7 +95,7 @@ int ui_browser__input_window(const char *title, const char *text, char *input, - t = sep + 1; - } - -- pthread_mutex_lock(&ui__lock); -+ mutex_lock(&ui__lock); - - max_len += 2; - nr_lines += 8; -@@ -125,17 +125,17 @@ int ui_browser__input_window(const char *title, const char *text, char *input, - SLsmg_write_nstring((char *)exit_msg, max_len); - SLsmg_refresh(); - -- pthread_mutex_unlock(&ui__lock); -+ mutex_unlock(&ui__lock); - - x += 2; - len = 0; - key = ui__getch(delay_secs); - while (key != K_TIMER && key != K_ENTER && key != K_ESC) { -- pthread_mutex_lock(&ui__lock); -+ mutex_lock(&ui__lock); - - if (key == K_BKSPC) { - if (len == 0) { -- pthread_mutex_unlock(&ui__lock); -+ mutex_unlock(&ui__lock); - goto next_key; - } - SLsmg_gotorc(y, x + --len); -@@ -147,7 +147,7 @@ int ui_browser__input_window(const char *title, const char *text, char *input, - } - SLsmg_refresh(); - -- pthread_mutex_unlock(&ui__lock); -+ mutex_unlock(&ui__lock); - - /* XXX more graceful overflow handling needed */ - if (len == sizeof(buf) - 1) { -@@ -215,19 +215,19 @@ void __ui__info_window(const char *title, const char *text, const char *exit_msg - - void ui__info_window(const char *title, const char *text) - { -- pthread_mutex_lock(&ui__lock); -+ mutex_lock(&ui__lock); - __ui__info_window(title, text, NULL); - SLsmg_refresh(); -- pthread_mutex_unlock(&ui__lock); -+ mutex_unlock(&ui__lock); - } - - int ui__question_window(const char *title, const char *text, - const char *exit_msg, int delay_secs) - { -- pthread_mutex_lock(&ui__lock); -+ mutex_lock(&ui__lock); - __ui__info_window(title, text, exit_msg); - SLsmg_refresh(); -- pthread_mutex_unlock(&ui__lock); -+ mutex_unlock(&ui__lock); - return ui__getch(delay_secs); - } - -diff --git a/tools/perf/ui/ui.h b/tools/perf/ui/ui.h -index 9b6fdf06e1d2f..99f8d2fe9bc55 100644 ---- a/tools/perf/ui/ui.h -+++ b/tools/perf/ui/ui.h -@@ -2,11 +2,11 @@ - #ifndef _PERF_UI_H_ - #define _PERF_UI_H_ 1 - --#include -+#include "../util/mutex.h" - #include - #include - --extern pthread_mutex_t ui__lock; -+extern struct mutex ui__lock; - extern void *perf_gtk_handle; - - extern int use_browser; --- -2.43.0 - diff --git a/queue-5.15/series b/queue-5.15/series index e2c581095f9..f81d18d4e95 100644 --- a/queue-5.15/series +++ b/queue-5.15/series @@ -174,12 +174,9 @@ netrom-fix-possible-dead-lock-in-nr_rt_ioctl.patch af_packet-do-not-call-packet_read_pending-from-tpack.patch sched-fair-allow-disabling-sched_balance_newidle-wit.patch sched-core-fix-incorrect-initialization-of-the-burst.patch -perf-record-delete-session-after-stopping-sideband-t.patch -perf-probe-add-missing-libgen.h-header-needed-for-us.patch greybus-lights-check-return-of-get_channel_from_mode.patch f2fs-delete-f2fs_copy_page-and-replace-with-memcpy_p.patch f2fs-fix-to-wait-on-page-writeback-in-__clone_blkadd.patch -perf-annotate-get-rid-of-duplicate-group-option-item.patch soundwire-cadence-fix-invalid-pdi-offset.patch dmaengine-idma64-add-check-for-dma_set_max_seg_size.patch firmware-dmi-id-add-a-release-callback-function.patch @@ -199,7 +196,6 @@ f2fs-fix-typos-in-comments.patch f2fs-fix-to-relocate-check-condition-in-f2fs_falloca.patch f2fs-fix-to-check-pinfile-flag-in-f2fs_move_file_ran.patch coresight-etm4x-fix-unbalanced-pm_runtime_enable.patch -perf-docs-document-bpf-event-modifier.patch iio-pressure-dps310-support-negative-temperature-val.patch coresight-etm4x-do-not-hardcode-iomem-access-for-reg.patch coresight-etm4x-do-not-save-restore-data-trace-contr.patch @@ -211,7 +207,6 @@ fpga-region-use-standard-dev_release-for-class-drive.patch fpga-region-add-owner-module-and-take-its-refcount.patch microblaze-remove-gcc-flag-for-non-existing-early_pr.patch microblaze-remove-early-printk-call-from-cpuinfo-sta.patch -perf-intel-pt-fix-unassigned-instruction-op-discover.patch dt-bindings-pinctrl-mediatek-mt7622-fix-array-proper.patch watchdog-bd9576_wdt-switch-to-using-devm_fwnode_gpio.patch watchdog-bd9576-drop-always-running-property.patch @@ -219,22 +214,14 @@ usb-gadget-u_audio-clear-uac-pointer-when-freed.patch stm-class-fix-a-double-free-in-stm_register_device.patch ppdev-remove-usage-of-the-deprecated-ida_simple_xx-a.patch ppdev-add-an-error-check-in-register_device.patch -perf-bench-internals-inject-build-id-fix-trap-divide.patch -perf-top-fix-tui-exit-screen-refresh-race-condition.patch -perf-ui-update-use-of-pthread-mutex.patch -perf-ui-browser-don-t-save-pointer-to-stack-memory.patch extcon-max8997-select-irq_domain-instead-of-dependin.patch pci-edr-align-edr_port_dpc_enable_dsm-with-pci-firmw.patch pci-edr-align-edr_port_locate_dsm-with-pci-firmware-.patch -perf-ui-browser-avoid-segv-on-title.patch -perf-report-avoid-segv-in-report__setup_sample_type.patch f2fs-compress-fix-to-cover-reserve-release-_compress.patch f2fs-fix-to-release-node-block-count-in-error-path-o.patch f2fs-compress-don-t-allow-unaligned-truncation-on-re.patch serial-sh-sci-protect-invalidating-rxdma-on-shutdown.patch libsubcmd-fix-parse-options-memory-leak.patch -perf-daemon-fix-file-leak-in-daemon_session__control.patch -perf-stat-don-t-display-metric-header-for-non-leader.patch s390-vdso-filter-out-mno-pic-data-is-text-relative-c.patch s390-vdso64-filter-out-munaligned-symbols-flag-for-v.patch s390-vdso-generate-unwind-information-for-c-modules.patch diff --git a/queue-5.4/perf-annotate-add-demangle-and-demangle-kernel.patch b/queue-5.4/perf-annotate-add-demangle-and-demangle-kernel.patch deleted file mode 100644 index 028261a0b12..00000000000 --- a/queue-5.4/perf-annotate-add-demangle-and-demangle-kernel.patch +++ /dev/null @@ -1,62 +0,0 @@ -From c5876d4dafd44d4332512ec0d912e1bb418942ef Mon Sep 17 00:00:00 2001 -From: Sasha Levin -Date: Tue, 30 Mar 2021 20:33:55 +0200 -Subject: perf annotate: Add --demangle and --demangle-kernel -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -From: Martin Liška - -[ Upstream commit 3406ac5347dbf64ab9f7b137ed25a18493f5ea2d ] - -'perf annotate' supports --symbol but it's impossible to filter a C++ -symbol. With --no-demangle one can filter easily by mangled function -name. - -Signed-off-by: Martin Liška -Link: http://lore.kernel.org/lkml/c3c7e959-9f7f-18e2-e795-f604275cbac3@suse.cz -Signed-off-by: Arnaldo Carvalho de Melo -Stable-dep-of: 374af9f1f06b ("perf annotate: Get rid of duplicate --group option item") -Signed-off-by: Sasha Levin ---- - tools/perf/Documentation/perf-annotate.txt | 7 +++++++ - tools/perf/builtin-annotate.c | 4 ++++ - 2 files changed, 11 insertions(+) - -diff --git a/tools/perf/Documentation/perf-annotate.txt b/tools/perf/Documentation/perf-annotate.txt -index e8c972f89357d..066ecfffbf4ed 100644 ---- a/tools/perf/Documentation/perf-annotate.txt -+++ b/tools/perf/Documentation/perf-annotate.txt -@@ -118,6 +118,13 @@ OPTIONS - --group:: - Show event group information together - -+--demangle:: -+ Demangle symbol names to human readable form. It's enabled by default, -+ disable with --no-demangle. -+ -+--demangle-kernel:: -+ Demangle kernel symbol names to human readable form (for C++ kernels). -+ - --percent-type:: - Set annotation percent type from following choices: - global-period, local-period, global-hits, local-hits -diff --git a/tools/perf/builtin-annotate.c b/tools/perf/builtin-annotate.c -index 8db8fc9bddef3..a6fea0be3a5d6 100644 ---- a/tools/perf/builtin-annotate.c -+++ b/tools/perf/builtin-annotate.c -@@ -537,6 +537,10 @@ int cmd_annotate(int argc, const char **argv) - "Specify disassembler style (e.g. -M intel for intel syntax)"), - OPT_STRING(0, "objdump", &annotate.opts.objdump_path, "path", - "objdump binary to use for disassembly and annotations"), -+ OPT_BOOLEAN(0, "demangle", &symbol_conf.demangle, -+ "Enable symbol demangling"), -+ OPT_BOOLEAN(0, "demangle-kernel", &symbol_conf.demangle_kernel, -+ "Enable kernel symbol demangling"), - OPT_BOOLEAN(0, "group", &symbol_conf.event_group, - "Show event group information together"), - OPT_BOOLEAN(0, "show-total-period", &symbol_conf.show_total_period, --- -2.43.0 - diff --git a/queue-5.4/perf-annotate-get-rid-of-duplicate-group-option-item.patch b/queue-5.4/perf-annotate-get-rid-of-duplicate-group-option-item.patch deleted file mode 100644 index 8e7630c7c12..00000000000 --- a/queue-5.4/perf-annotate-get-rid-of-duplicate-group-option-item.patch +++ /dev/null @@ -1,48 +0,0 @@ -From e5ba0402d484bf215c79f006dd2f5552c495c18a Mon Sep 17 00:00:00 2001 -From: Sasha Levin -Date: Fri, 22 Mar 2024 15:43:12 -0700 -Subject: perf annotate: Get rid of duplicate --group option item - -From: Namhyung Kim - -[ Upstream commit 374af9f1f06b5e991c810d2e4983d6f58df32136 ] - -The options array in cmd_annotate() has duplicate --group options. It -only needs one and let's get rid of the other. - - $ perf annotate -h 2>&1 | grep group - --group Show event group information together - --group Show event group information together - -Fixes: 7ebaf4890f63eb90 ("perf annotate: Support '--group' option") -Reviewed-by: Kan Liang -Signed-off-by: Namhyung Kim -Cc: Adrian Hunter -Cc: Ian Rogers -Cc: Ingo Molnar -Cc: Jin Yao -Cc: Jiri Olsa -Cc: Peter Zijlstra -Link: https://lore.kernel.org/r/20240322224313.423181-1-namhyung@kernel.org -Signed-off-by: Arnaldo Carvalho de Melo -Signed-off-by: Sasha Levin ---- - tools/perf/builtin-annotate.c | 2 -- - 1 file changed, 2 deletions(-) - -diff --git a/tools/perf/builtin-annotate.c b/tools/perf/builtin-annotate.c -index a6fea0be3a5d6..31ddb128b2841 100644 ---- a/tools/perf/builtin-annotate.c -+++ b/tools/perf/builtin-annotate.c -@@ -541,8 +541,6 @@ int cmd_annotate(int argc, const char **argv) - "Enable symbol demangling"), - OPT_BOOLEAN(0, "demangle-kernel", &symbol_conf.demangle_kernel, - "Enable kernel symbol demangling"), -- OPT_BOOLEAN(0, "group", &symbol_conf.event_group, -- "Show event group information together"), - OPT_BOOLEAN(0, "show-total-period", &symbol_conf.show_total_period, - "Show a column with the sum of periods"), - OPT_BOOLEAN('n', "show-nr-samples", &symbol_conf.show_nr_samples, --- -2.43.0 - diff --git a/queue-5.4/perf-probe-add-missing-libgen.h-header-needed-for-us.patch b/queue-5.4/perf-probe-add-missing-libgen.h-header-needed-for-us.patch deleted file mode 100644 index 0dadf544636..00000000000 --- a/queue-5.4/perf-probe-add-missing-libgen.h-header-needed-for-us.patch +++ /dev/null @@ -1,53 +0,0 @@ -From 638d1bdf52bbf63b312788adb16ced6f285d0ec7 Mon Sep 17 00:00:00 2001 -From: Sasha Levin -Date: Thu, 21 Mar 2024 11:13:30 -0300 -Subject: perf probe: Add missing libgen.h header needed for using basename() - -From: Arnaldo Carvalho de Melo - -[ Upstream commit 581037151910126a7934e369e4b6ac70eda9a703 ] - -This prototype is obtained indirectly, by luck, from some other header -in probe-event.c in most systems, but recently exploded on alpine:edge: - - 8 13.39 alpine:edge : FAIL gcc version 13.2.1 20240309 (Alpine 13.2.1_git20240309) - util/probe-event.c: In function 'convert_exec_to_group': - util/probe-event.c:225:16: error: implicit declaration of function 'basename' [-Werror=implicit-function-declaration] - 225 | ptr1 = basename(exec_copy); - | ^~~~~~~~ - util/probe-event.c:225:14: error: assignment to 'char *' from 'int' makes pointer from integer without a cast [-Werror=int-conversion] - 225 | ptr1 = basename(exec_copy); - | ^ - cc1: all warnings being treated as errors - make[3]: *** [/git/perf-6.8.0/tools/build/Makefile.build:158: util] Error 2 - -Fix it by adding the libgen.h header where basename() is prototyped. - -Fixes: fb7345bbf7fad9bf ("perf probe: Support basic dwarf-based operations on uprobe events") -Cc: Masami Hiramatsu -Cc: Adrian Hunter -Cc: Ian Rogers -Cc: Jiri Olsa -Cc: Namhyung Kim -Link: https://lore.kernel.org/lkml/ -Signed-off-by: Arnaldo Carvalho de Melo -Signed-off-by: Sasha Levin ---- - tools/perf/util/probe-event.c | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/tools/perf/util/probe-event.c b/tools/perf/util/probe-event.c -index 67b7d2af1755d..1fe1c3ac2e4c9 100644 ---- a/tools/perf/util/probe-event.c -+++ b/tools/perf/util/probe-event.c -@@ -11,6 +11,7 @@ - #include - #include - #include -+#include - #include - #include - #include --- -2.43.0 - diff --git a/queue-5.4/perf-stat-don-t-display-metric-header-for-non-leader.patch b/queue-5.4/perf-stat-don-t-display-metric-header-for-non-leader.patch deleted file mode 100644 index 6cc36e0107c..00000000000 --- a/queue-5.4/perf-stat-don-t-display-metric-header-for-non-leader.patch +++ /dev/null @@ -1,90 +0,0 @@ -From 6039024cb460ee472fc91472af31293a2a2f92b4 Mon Sep 17 00:00:00 2001 -From: Sasha Levin -Date: Thu, 9 May 2024 22:13:09 -0700 -Subject: perf stat: Don't display metric header for non-leader uncore events - -From: Ian Rogers - -[ Upstream commit 193a9e30207f54777ff42d0d8be8389edc522277 ] - -On an Intel tigerlake laptop a metric like: - - { - "BriefDescription": "Test", - "MetricExpr": "imc_free_running@data_read@ + imc_free_running@data_write@", - "MetricGroup": "Test", - "MetricName": "Test", - "ScaleUnit": "6.103515625e-5MiB" - }, - -Will have 4 events: - - uncore_imc_free_running_0/data_read/ - uncore_imc_free_running_0/data_write/ - uncore_imc_free_running_1/data_read/ - uncore_imc_free_running_1/data_write/ - -If aggregration is disabled with metric-only 2 column headers are -needed: - - $ perf stat -M test --metric-only -A -a sleep 1 - - Performance counter stats for 'system wide': - - MiB Test MiB Test - CPU0 1821.0 1820.5 - -But when not, the counts aggregated in the metric leader and only 1 -column should be shown: - - $ perf stat -M test --metric-only -a sleep 1 - Performance counter stats for 'system wide': - - MiB Test - 5909.4 - - 1.001258915 seconds time elapsed - -Achieve this by skipping events that aren't metric leaders when -printing column headers and aggregation isn't disabled. - -The bug is long standing, the fixes tag is set to a refactor as that -is as far back as is reasonable to backport. - -Fixes: 088519f318be3a41 ("perf stat: Move the display functions to stat-display.c") -Signed-off-by: Ian Rogers -Cc: Adrian Hunter -Cc: Alexander Shishkin -Cc: Ingo Molnar -Cc: Jiri Olsa -Cc: Kaige Ye -Cc: Kan Liang -Cc: K Prateek Nayak -Cc: Mark Rutland -Cc: Namhyung Kim -Cc: Peter Zijlstra -Cc: Yicong Yang -Link: https://lore.kernel.org/r/20240510051309.2452468-1-irogers@google.com -Signed-off-by: Arnaldo Carvalho de Melo -Signed-off-by: Sasha Levin ---- - tools/perf/util/stat-display.c | 3 +++ - 1 file changed, 3 insertions(+) - -diff --git a/tools/perf/util/stat-display.c b/tools/perf/util/stat-display.c -index 70612ec583f35..7ea2bddd75d51 100644 ---- a/tools/perf/util/stat-display.c -+++ b/tools/perf/util/stat-display.c -@@ -931,6 +931,9 @@ static void print_metric_headers(struct perf_stat_config *config, - - /* Print metrics headers only */ - evlist__for_each_entry(evlist, counter) { -+ if (config->aggr_mode != AGGR_NONE && counter->metric_leader != counter) -+ continue; -+ - os.evsel = counter; - out.ctx = &os; - out.print_metric = print_metric_header; --- -2.43.0 - diff --git a/queue-5.4/perf-top-fix-tui-exit-screen-refresh-race-condition.patch b/queue-5.4/perf-top-fix-tui-exit-screen-refresh-race-condition.patch deleted file mode 100644 index 890388c1d7c..00000000000 --- a/queue-5.4/perf-top-fix-tui-exit-screen-refresh-race-condition.patch +++ /dev/null @@ -1,75 +0,0 @@ -From 0f907d33ea61bf9c76ba7351f3ceaf5ab82d3923 Mon Sep 17 00:00:00 2001 -From: Sasha Levin -Date: Wed, 29 Dec 2021 16:55:19 +0800 -Subject: perf top: Fix TUI exit screen refresh race condition - -From: yaowenbin - -[ Upstream commit 64f18d2d043015b3f835ce4c9f3beb97cfd19b6e ] - -When the following command is executed several times, a coredump file is -generated. - - $ timeout -k 9 5 perf top -e task-clock - ******* - ******* - ******* - 0.01% [kernel] [k] __do_softirq - 0.01% libpthread-2.28.so [.] __pthread_mutex_lock - 0.01% [kernel] [k] __ll_sc_atomic64_sub_return - double free or corruption (!prev) perf top --sort comm,dso - timeout: the monitored command dumped core - -When we terminate "perf top" using sending signal method, -SLsmg_reset_smg() called. SLsmg_reset_smg() resets the SLsmg screen -management routines by freeing all memory allocated while it was active. - -However SLsmg_reinit_smg() maybe be called by another thread. - -SLsmg_reinit_smg() will free the same memory accessed by -SLsmg_reset_smg(), thus it results in a double free. - -SLsmg_reinit_smg() is called already protected by ui__lock, so we fix -the problem by adding pthread_mutex_trylock of ui__lock when calling -SLsmg_reset_smg(). - -Signed-off-by: Wenyu Liu -Tested-by: Arnaldo Carvalho de Melo -Cc: Alexander Shishkin -Cc: Jiri Olsa -Cc: Mark Rutland -Cc: Namhyung Kim -Cc: Peter Zijlstra -Cc: wuxu.wu@huawei.com -Link: http://lore.kernel.org/lkml/a91e3943-7ddc-f5c0-a7f5-360f073c20e6@huawei.com -Signed-off-by: Hewenliang -Signed-off-by: yaowenbin -Signed-off-by: Arnaldo Carvalho de Melo -Stable-dep-of: 769e6a1e15bd ("perf ui browser: Don't save pointer to stack memory") -Signed-off-by: Sasha Levin ---- - tools/perf/ui/tui/setup.c | 8 +++++--- - 1 file changed, 5 insertions(+), 3 deletions(-) - -diff --git a/tools/perf/ui/tui/setup.c b/tools/perf/ui/tui/setup.c -index e9bfe856a5dee..b1be59b4e2a4f 100644 ---- a/tools/perf/ui/tui/setup.c -+++ b/tools/perf/ui/tui/setup.c -@@ -170,9 +170,11 @@ void ui__exit(bool wait_for_ok) - "Press any key...", 0); - - SLtt_set_cursor_visibility(1); -- SLsmg_refresh(); -- SLsmg_reset_smg(); -+ if (!pthread_mutex_trylock(&ui__lock)) { -+ SLsmg_refresh(); -+ SLsmg_reset_smg(); -+ pthread_mutex_unlock(&ui__lock); -+ } - SLang_reset_tty(); -- - perf_error__unregister(&perf_tui_eops); - } --- -2.43.0 - diff --git a/queue-5.4/perf-ui-browser-avoid-segv-on-title.patch b/queue-5.4/perf-ui-browser-avoid-segv-on-title.patch deleted file mode 100644 index 579663039cd..00000000000 --- a/queue-5.4/perf-ui-browser-avoid-segv-on-title.patch +++ /dev/null @@ -1,46 +0,0 @@ -From 5a6b22440cdcbca71dc63053b17fac526bce1af4 Mon Sep 17 00:00:00 2001 -From: Sasha Levin -Date: Tue, 7 May 2024 20:52:58 -0700 -Subject: perf ui browser: Avoid SEGV on title - -From: Ian Rogers - -[ Upstream commit 90f01afb0dfafbc9b094bb61e61a4ac297d9d0d2 ] - -If the title is NULL then it can lead to a SEGV. - -Fixes: 769e6a1e15bdbbaf ("perf ui browser: Don't save pointer to stack memory") -Signed-off-by: Ian Rogers -Cc: Adrian Hunter -Cc: Alexander Shishkin -Cc: Ingo Molnar -Cc: James Clark -Cc: Jiri Olsa -Cc: Kan Liang -Cc: Leo Yan -Cc: Mark Rutland -Cc: Namhyung Kim -Cc: Peter Zijlstra -Link: https://lore.kernel.org/r/20240508035301.1554434-2-irogers@google.com -Signed-off-by: Arnaldo Carvalho de Melo -Signed-off-by: Sasha Levin ---- - tools/perf/ui/browser.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/tools/perf/ui/browser.c b/tools/perf/ui/browser.c -index 6fa4f123d5ff7..b84b87b939573 100644 ---- a/tools/perf/ui/browser.c -+++ b/tools/perf/ui/browser.c -@@ -203,7 +203,7 @@ void ui_browser__refresh_dimensions(struct ui_browser *browser) - void ui_browser__handle_resize(struct ui_browser *browser) - { - ui__refresh_dimensions(false); -- ui_browser__show(browser, browser->title, ui_helpline__current); -+ ui_browser__show(browser, browser->title ?: "", ui_helpline__current); - ui_browser__refresh(browser); - } - --- -2.43.0 - diff --git a/queue-5.4/perf-ui-browser-don-t-save-pointer-to-stack-memory.patch b/queue-5.4/perf-ui-browser-don-t-save-pointer-to-stack-memory.patch deleted file mode 100644 index 961e5e3d244..00000000000 --- a/queue-5.4/perf-ui-browser-don-t-save-pointer-to-stack-memory.patch +++ /dev/null @@ -1,143 +0,0 @@ -From 6738e4fc1c3a899b9648cf62ecad5dd48c4e1cd3 Mon Sep 17 00:00:00 2001 -From: Sasha Levin -Date: Tue, 7 May 2024 11:35:38 -0700 -Subject: perf ui browser: Don't save pointer to stack memory - -From: Ian Rogers - -[ Upstream commit 769e6a1e15bdbbaf2b0d2f37c24f2c53268bd21f ] - -ui_browser__show() is capturing the input title that is stack allocated -memory in hist_browser__run(). - -Avoid a use after return by strdup-ing the string. - -Committer notes: - -Further explanation from Ian Rogers: - -My command line using tui is: -$ sudo bash -c 'rm /tmp/asan.log*; export -ASAN_OPTIONS="log_path=/tmp/asan.log"; /tmp/perf/perf mem record -a -sleep 1; /tmp/perf/perf mem report' -I then go to the perf annotate view and quit. This triggers the asan -error (from the log file): -``` -==1254591==ERROR: AddressSanitizer: stack-use-after-return on address -0x7f2813331920 at pc 0x7f28180 -65991 bp 0x7fff0a21c750 sp 0x7fff0a21bf10 -READ of size 80 at 0x7f2813331920 thread T0 - #0 0x7f2818065990 in __interceptor_strlen -../../../../src/libsanitizer/sanitizer_common/sanitizer_common_interceptors.inc:461 - #1 0x7f2817698251 in SLsmg_write_wrapped_string -(/lib/x86_64-linux-gnu/libslang.so.2+0x98251) - #2 0x7f28176984b9 in SLsmg_write_nstring -(/lib/x86_64-linux-gnu/libslang.so.2+0x984b9) - #3 0x55c94045b365 in ui_browser__write_nstring ui/browser.c:60 - #4 0x55c94045c558 in __ui_browser__show_title ui/browser.c:266 - #5 0x55c94045c776 in ui_browser__show ui/browser.c:288 - #6 0x55c94045c06d in ui_browser__handle_resize ui/browser.c:206 - #7 0x55c94047979b in do_annotate ui/browsers/hists.c:2458 - #8 0x55c94047fb17 in evsel__hists_browse ui/browsers/hists.c:3412 - #9 0x55c940480a0c in perf_evsel_menu__run ui/browsers/hists.c:3527 - #10 0x55c940481108 in __evlist__tui_browse_hists ui/browsers/hists.c:3613 - #11 0x55c9404813f7 in evlist__tui_browse_hists ui/browsers/hists.c:3661 - #12 0x55c93ffa253f in report__browse_hists tools/perf/builtin-report.c:671 - #13 0x55c93ffa58ca in __cmd_report tools/perf/builtin-report.c:1141 - #14 0x55c93ffaf159 in cmd_report tools/perf/builtin-report.c:1805 - #15 0x55c94000c05c in report_events tools/perf/builtin-mem.c:374 - #16 0x55c94000d96d in cmd_mem tools/perf/builtin-mem.c:516 - #17 0x55c9400e44ee in run_builtin tools/perf/perf.c:350 - #18 0x55c9400e4a5a in handle_internal_command tools/perf/perf.c:403 - #19 0x55c9400e4e22 in run_argv tools/perf/perf.c:447 - #20 0x55c9400e53ad in main tools/perf/perf.c:561 - #21 0x7f28170456c9 in __libc_start_call_main -../sysdeps/nptl/libc_start_call_main.h:58 - #22 0x7f2817045784 in __libc_start_main_impl ../csu/libc-start.c:360 - #23 0x55c93ff544c0 in _start (/tmp/perf/perf+0x19a4c0) (BuildId: -84899b0e8c7d3a3eaa67b2eb35e3d8b2f8cd4c93) - -Address 0x7f2813331920 is located in stack of thread T0 at offset 32 in frame - #0 0x55c94046e85e in hist_browser__run ui/browsers/hists.c:746 - - This frame has 1 object(s): - [32, 192) 'title' (line 747) <== Memory access at offset 32 is -inside this variable -HINT: this may be a false positive if your program uses some custom -stack unwind mechanism, swapcontext or vfork -``` -hist_browser__run isn't on the stack so the asan error looks legit. -There's no clean init/exit on struct ui_browser so I may be trading a -use-after-return for a memory leak, but that seems look a good trade -anyway. - -Fixes: 05e8b0804ec4 ("perf ui browser: Stop using 'self'") -Signed-off-by: Ian Rogers -Cc: Adrian Hunter -Cc: Alexander Shishkin -Cc: Andi Kleen -Cc: Athira Rajeev -Cc: Ben Gainey -Cc: Ingo Molnar -Cc: James Clark -Cc: Jiri Olsa -Cc: Kajol Jain -Cc: Kan Liang -Cc: K Prateek Nayak -Cc: Li Dong -Cc: Mark Rutland -Cc: Namhyung Kim -Cc: Oliver Upton -Cc: Paran Lee -Cc: Peter Zijlstra -Cc: Ravi Bangoria -Cc: Sun Haiyong -Cc: Tim Chen -Cc: Yanteng Si -Cc: Yicong Yang -Link: https://lore.kernel.org/r/20240507183545.1236093-2-irogers@google.com -Signed-off-by: Arnaldo Carvalho de Melo -Signed-off-by: Sasha Levin ---- - tools/perf/ui/browser.c | 4 +++- - tools/perf/ui/browser.h | 2 +- - 2 files changed, 4 insertions(+), 2 deletions(-) - -diff --git a/tools/perf/ui/browser.c b/tools/perf/ui/browser.c -index 9dc808020e824..6fa4f123d5ff7 100644 ---- a/tools/perf/ui/browser.c -+++ b/tools/perf/ui/browser.c -@@ -287,7 +287,8 @@ int ui_browser__show(struct ui_browser *browser, const char *title, - mutex_lock(&ui__lock); - __ui_browser__show_title(browser, title); - -- browser->title = title; -+ free(browser->title); -+ browser->title = strdup(title); - zfree(&browser->helpline); - - va_start(ap, helpline); -@@ -304,6 +305,7 @@ void ui_browser__hide(struct ui_browser *browser) - mutex_lock(&ui__lock); - ui_helpline__pop(); - zfree(&browser->helpline); -+ zfree(&browser->title); - mutex_unlock(&ui__lock); - } - -diff --git a/tools/perf/ui/browser.h b/tools/perf/ui/browser.h -index 3678eb88f119c..815e6bf7ee531 100644 ---- a/tools/perf/ui/browser.h -+++ b/tools/perf/ui/browser.h -@@ -21,7 +21,7 @@ struct ui_browser { - u8 extra_title_lines; - int current_color; - void *priv; -- const char *title; -+ char *title; - char *helpline; - const char *no_samples_msg; - void (*refresh_dimensions)(struct ui_browser *browser); --- -2.43.0 - diff --git a/queue-5.4/perf-ui-update-use-of-pthread-mutex.patch b/queue-5.4/perf-ui-update-use-of-pthread-mutex.patch deleted file mode 100644 index 0909fa7c96a..00000000000 --- a/queue-5.4/perf-ui-update-use-of-pthread-mutex.patch +++ /dev/null @@ -1,382 +0,0 @@ -From 76094a3a77d89c224d3de716cb86f54f595c6025 Mon Sep 17 00:00:00 2001 -From: Sasha Levin -Date: Fri, 26 Aug 2022 09:42:33 -0700 -Subject: perf ui: Update use of pthread mutex -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -From: Ian Rogers - -[ Upstream commit 82aff6cc070417f26f9b02b26e63c17ff43b4044 ] - -Switch to the use of mutex wrappers that provide better error checking. - -Signed-off-by: Ian Rogers -Cc: Adrian Hunter -Cc: Alexander Shishkin -Cc: Alexandre Truong -Cc: Alexey Bayduraev -Cc: Andi Kleen -Cc: Andres Freund -Cc: Andrii Nakryiko -Cc: André Almeida -Cc: Athira Jajeev -Cc: Christophe JAILLET -Cc: Colin Ian King -Cc: Dario Petrillo -Cc: Darren Hart -Cc: Dave Marchevsky -Cc: Davidlohr Bueso -Cc: Fangrui Song -Cc: Hewenliang -Cc: Ingo Molnar -Cc: James Clark -Cc: Jason Wang -Cc: Jiri Olsa -Cc: Kajol Jain -Cc: Kim Phillips -Cc: Leo Yan -Cc: Mark Rutland -Cc: Martin Liška -Cc: Masami Hiramatsu -Cc: Nathan Chancellor -Cc: Nick Desaulniers -Cc: Pavithra Gurushankar -Cc: Peter Zijlstra -Cc: Quentin Monnet -Cc: Ravi Bangoria -Cc: Remi Bernon -Cc: Riccardo Mancini -Cc: Song Liu -Cc: Stephane Eranian -Cc: Thomas Gleixner -Cc: Thomas Richter -Cc: Tom Rix -Cc: Weiguo Li -Cc: Wenyu Liu -Cc: William Cohen -Cc: Zechuan Chen -Cc: bpf@vger.kernel.org -Cc: llvm@lists.linux.dev -Cc: yaowenbin -Link: https://lore.kernel.org/r/20220826164242.43412-10-irogers@google.com -Signed-off-by: Arnaldo Carvalho de Melo -Stable-dep-of: 769e6a1e15bd ("perf ui browser: Don't save pointer to stack memory") -Signed-off-by: Sasha Levin ---- - tools/perf/ui/browser.c | 20 ++++++++++---------- - tools/perf/ui/browsers/annotate.c | 2 +- - tools/perf/ui/setup.c | 5 +++-- - tools/perf/ui/tui/helpline.c | 5 ++--- - tools/perf/ui/tui/progress.c | 8 ++++---- - tools/perf/ui/tui/setup.c | 8 ++++---- - tools/perf/ui/tui/util.c | 18 +++++++++--------- - tools/perf/ui/ui.h | 4 ++-- - 8 files changed, 35 insertions(+), 35 deletions(-) - -diff --git a/tools/perf/ui/browser.c b/tools/perf/ui/browser.c -index 781afe42e90e0..9dc808020e824 100644 ---- a/tools/perf/ui/browser.c -+++ b/tools/perf/ui/browser.c -@@ -268,9 +268,9 @@ void __ui_browser__show_title(struct ui_browser *browser, const char *title) - - void ui_browser__show_title(struct ui_browser *browser, const char *title) - { -- pthread_mutex_lock(&ui__lock); -+ mutex_lock(&ui__lock); - __ui_browser__show_title(browser, title); -- pthread_mutex_unlock(&ui__lock); -+ mutex_unlock(&ui__lock); - } - - int ui_browser__show(struct ui_browser *browser, const char *title, -@@ -284,7 +284,7 @@ int ui_browser__show(struct ui_browser *browser, const char *title, - - browser->refresh_dimensions(browser); - -- pthread_mutex_lock(&ui__lock); -+ mutex_lock(&ui__lock); - __ui_browser__show_title(browser, title); - - browser->title = title; -@@ -295,16 +295,16 @@ int ui_browser__show(struct ui_browser *browser, const char *title, - va_end(ap); - if (err > 0) - ui_helpline__push(browser->helpline); -- pthread_mutex_unlock(&ui__lock); -+ mutex_unlock(&ui__lock); - return err ? 0 : -1; - } - - void ui_browser__hide(struct ui_browser *browser) - { -- pthread_mutex_lock(&ui__lock); -+ mutex_lock(&ui__lock); - ui_helpline__pop(); - zfree(&browser->helpline); -- pthread_mutex_unlock(&ui__lock); -+ mutex_unlock(&ui__lock); - } - - static void ui_browser__scrollbar_set(struct ui_browser *browser) -@@ -352,9 +352,9 @@ static int __ui_browser__refresh(struct ui_browser *browser) - - int ui_browser__refresh(struct ui_browser *browser) - { -- pthread_mutex_lock(&ui__lock); -+ mutex_lock(&ui__lock); - __ui_browser__refresh(browser); -- pthread_mutex_unlock(&ui__lock); -+ mutex_unlock(&ui__lock); - - return 0; - } -@@ -390,10 +390,10 @@ int ui_browser__run(struct ui_browser *browser, int delay_secs) - while (1) { - off_t offset; - -- pthread_mutex_lock(&ui__lock); -+ mutex_lock(&ui__lock); - err = __ui_browser__refresh(browser); - SLsmg_refresh(); -- pthread_mutex_unlock(&ui__lock); -+ mutex_unlock(&ui__lock); - if (err < 0) - break; - -diff --git a/tools/perf/ui/browsers/annotate.c b/tools/perf/ui/browsers/annotate.c -index 82207db8f97c5..d4c27ebb4b848 100644 ---- a/tools/perf/ui/browsers/annotate.c -+++ b/tools/perf/ui/browsers/annotate.c -@@ -8,11 +8,11 @@ - #include "../../util/hist.h" - #include "../../util/sort.h" - #include "../../util/map.h" -+#include "../../util/mutex.h" - #include "../../util/symbol.h" - #include "../../util/evsel.h" - #include "../../util/evlist.h" - #include --#include - #include - #include - #include -diff --git a/tools/perf/ui/setup.c b/tools/perf/ui/setup.c -index 700335cde6180..25ded88801a3d 100644 ---- a/tools/perf/ui/setup.c -+++ b/tools/perf/ui/setup.c -@@ -1,5 +1,4 @@ - // SPDX-License-Identifier: GPL-2.0 --#include - #include - #include - -@@ -8,7 +7,7 @@ - #include "../util/hist.h" - #include "ui.h" - --pthread_mutex_t ui__lock = PTHREAD_MUTEX_INITIALIZER; -+struct mutex ui__lock; - void *perf_gtk_handle; - int use_browser = -1; - -@@ -76,6 +75,7 @@ int stdio__config_color(const struct option *opt __maybe_unused, - - void setup_browser(bool fallback_to_pager) - { -+ mutex_init(&ui__lock); - if (use_browser < 2 && (!isatty(1) || dump_trace)) - use_browser = 0; - -@@ -118,4 +118,5 @@ void exit_browser(bool wait_for_ok) - default: - break; - } -+ mutex_destroy(&ui__lock); - } -diff --git a/tools/perf/ui/tui/helpline.c b/tools/perf/ui/tui/helpline.c -index 298d6af82fddd..db4952f5990bd 100644 ---- a/tools/perf/ui/tui/helpline.c -+++ b/tools/perf/ui/tui/helpline.c -@@ -2,7 +2,6 @@ - #include - #include - #include --#include - #include - #include - -@@ -33,7 +32,7 @@ static int tui_helpline__show(const char *format, va_list ap) - int ret; - static int backlog; - -- pthread_mutex_lock(&ui__lock); -+ mutex_lock(&ui__lock); - ret = vscnprintf(ui_helpline__last_msg + backlog, - sizeof(ui_helpline__last_msg) - backlog, format, ap); - backlog += ret; -@@ -45,7 +44,7 @@ static int tui_helpline__show(const char *format, va_list ap) - SLsmg_refresh(); - backlog = 0; - } -- pthread_mutex_unlock(&ui__lock); -+ mutex_unlock(&ui__lock); - - return ret; - } -diff --git a/tools/perf/ui/tui/progress.c b/tools/perf/ui/tui/progress.c -index 3d74af5a7ece6..71b6c8d9474fb 100644 ---- a/tools/perf/ui/tui/progress.c -+++ b/tools/perf/ui/tui/progress.c -@@ -45,7 +45,7 @@ static void tui_progress__update(struct ui_progress *p) - } - - ui__refresh_dimensions(false); -- pthread_mutex_lock(&ui__lock); -+ mutex_lock(&ui__lock); - y = SLtt_Screen_Rows / 2 - 2; - SLsmg_set_color(0); - SLsmg_draw_box(y, 0, 3, SLtt_Screen_Cols); -@@ -56,7 +56,7 @@ static void tui_progress__update(struct ui_progress *p) - bar = ((SLtt_Screen_Cols - 2) * p->curr) / p->total; - SLsmg_fill_region(y, 1, 1, bar, ' '); - SLsmg_refresh(); -- pthread_mutex_unlock(&ui__lock); -+ mutex_unlock(&ui__lock); - } - - static void tui_progress__finish(void) -@@ -67,12 +67,12 @@ static void tui_progress__finish(void) - return; - - ui__refresh_dimensions(false); -- pthread_mutex_lock(&ui__lock); -+ mutex_lock(&ui__lock); - y = SLtt_Screen_Rows / 2 - 2; - SLsmg_set_color(0); - SLsmg_fill_region(y, 0, 3, SLtt_Screen_Cols, ' '); - SLsmg_refresh(); -- pthread_mutex_unlock(&ui__lock); -+ mutex_unlock(&ui__lock); - } - - static struct ui_progress_ops tui_progress__ops = { -diff --git a/tools/perf/ui/tui/setup.c b/tools/perf/ui/tui/setup.c -index b1be59b4e2a4f..a3b8c397c24d5 100644 ---- a/tools/perf/ui/tui/setup.c -+++ b/tools/perf/ui/tui/setup.c -@@ -29,10 +29,10 @@ void ui__refresh_dimensions(bool force) - { - if (force || ui__need_resize) { - ui__need_resize = 0; -- pthread_mutex_lock(&ui__lock); -+ mutex_lock(&ui__lock); - SLtt_get_screen_size(); - SLsmg_reinit_smg(); -- pthread_mutex_unlock(&ui__lock); -+ mutex_unlock(&ui__lock); - } - } - -@@ -170,10 +170,10 @@ void ui__exit(bool wait_for_ok) - "Press any key...", 0); - - SLtt_set_cursor_visibility(1); -- if (!pthread_mutex_trylock(&ui__lock)) { -+ if (mutex_trylock(&ui__lock)) { - SLsmg_refresh(); - SLsmg_reset_smg(); -- pthread_mutex_unlock(&ui__lock); -+ mutex_unlock(&ui__lock); - } - SLang_reset_tty(); - perf_error__unregister(&perf_tui_eops); -diff --git a/tools/perf/ui/tui/util.c b/tools/perf/ui/tui/util.c -index b98dd0e31dc1a..8f8d00c2c1b82 100644 ---- a/tools/perf/ui/tui/util.c -+++ b/tools/perf/ui/tui/util.c -@@ -91,7 +91,7 @@ int ui_browser__input_window(const char *title, const char *text, char *input, - t = sep + 1; - } - -- pthread_mutex_lock(&ui__lock); -+ mutex_lock(&ui__lock); - - max_len += 2; - nr_lines += 8; -@@ -121,17 +121,17 @@ int ui_browser__input_window(const char *title, const char *text, char *input, - SLsmg_write_nstring((char *)exit_msg, max_len); - SLsmg_refresh(); - -- pthread_mutex_unlock(&ui__lock); -+ mutex_unlock(&ui__lock); - - x += 2; - len = 0; - key = ui__getch(delay_secs); - while (key != K_TIMER && key != K_ENTER && key != K_ESC) { -- pthread_mutex_lock(&ui__lock); -+ mutex_lock(&ui__lock); - - if (key == K_BKSPC) { - if (len == 0) { -- pthread_mutex_unlock(&ui__lock); -+ mutex_unlock(&ui__lock); - goto next_key; - } - SLsmg_gotorc(y, x + --len); -@@ -143,7 +143,7 @@ int ui_browser__input_window(const char *title, const char *text, char *input, - } - SLsmg_refresh(); - -- pthread_mutex_unlock(&ui__lock); -+ mutex_unlock(&ui__lock); - - /* XXX more graceful overflow handling needed */ - if (len == sizeof(buf) - 1) { -@@ -211,19 +211,19 @@ void __ui__info_window(const char *title, const char *text, const char *exit_msg - - void ui__info_window(const char *title, const char *text) - { -- pthread_mutex_lock(&ui__lock); -+ mutex_lock(&ui__lock); - __ui__info_window(title, text, NULL); - SLsmg_refresh(); -- pthread_mutex_unlock(&ui__lock); -+ mutex_unlock(&ui__lock); - } - - int ui__question_window(const char *title, const char *text, - const char *exit_msg, int delay_secs) - { -- pthread_mutex_lock(&ui__lock); -+ mutex_lock(&ui__lock); - __ui__info_window(title, text, exit_msg); - SLsmg_refresh(); -- pthread_mutex_unlock(&ui__lock); -+ mutex_unlock(&ui__lock); - return ui__getch(delay_secs); - } - -diff --git a/tools/perf/ui/ui.h b/tools/perf/ui/ui.h -index 9b6fdf06e1d2f..99f8d2fe9bc55 100644 ---- a/tools/perf/ui/ui.h -+++ b/tools/perf/ui/ui.h -@@ -2,11 +2,11 @@ - #ifndef _PERF_UI_H_ - #define _PERF_UI_H_ 1 - --#include -+#include "../util/mutex.h" - #include - #include - --extern pthread_mutex_t ui__lock; -+extern struct mutex ui__lock; - extern void *perf_gtk_handle; - - extern int use_browser; --- -2.43.0 - diff --git a/queue-5.4/series b/queue-5.4/series index d0f8b7ced60..c6628555587 100644 --- a/queue-5.4/series +++ b/queue-5.4/series @@ -90,10 +90,7 @@ netrom-fix-possible-dead-lock-in-nr_rt_ioctl.patch af_packet-do-not-call-packet_read_pending-from-tpack.patch sched-topology-don-t-set-sd_balance_wake-on-cpuset-d.patch sched-fair-allow-disabling-sched_balance_newidle-wit.patch -perf-probe-add-missing-libgen.h-header-needed-for-us.patch greybus-lights-check-return-of-get_channel_from_mode.patch -perf-annotate-add-demangle-and-demangle-kernel.patch -perf-annotate-get-rid-of-duplicate-group-option-item.patch soundwire-cadence-intel-simplify-pdi-port-mapping.patch soundwire-intel-don-t-filter-out-pdi0-1.patch soundwire-cadence_master-improve-pdi-allocation.patch @@ -111,15 +108,10 @@ usb-gadget-u_audio-clear-uac-pointer-when-freed.patch stm-class-fix-a-double-free-in-stm_register_device.patch ppdev-remove-usage-of-the-deprecated-ida_simple_xx-a.patch ppdev-add-an-error-check-in-register_device.patch -perf-top-fix-tui-exit-screen-refresh-race-condition.patch -perf-ui-update-use-of-pthread-mutex.patch -perf-ui-browser-don-t-save-pointer-to-stack-memory.patch extcon-max8997-select-irq_domain-instead-of-dependin.patch -perf-ui-browser-avoid-segv-on-title.patch f2fs-fix-to-release-node-block-count-in-error-path-o.patch serial-sh-sci-protect-invalidating-rxdma-on-shutdown.patch libsubcmd-fix-parse-options-memory-leak.patch -perf-stat-don-t-display-metric-header-for-non-leader.patch input-ims-pcu-fix-printf-string-overflow.patch input-pm8xxx-vibrator-correct-vib_max_levels-calcula.patch drm-msm-dpu-always-flush-the-slave-intf-on-the-ctl.patch -- 2.47.3