From: Greg Kroah-Hartman Date: Tue, 18 Feb 2025 09:31:44 +0000 (+0100) Subject: drop some perf patches X-Git-Tag: v6.1.129~71 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=edec88c5ebfb22a198beaa2a97501096962a03fb;p=thirdparty%2Fkernel%2Fstable-queue.git drop some perf patches --- diff --git a/queue-5.10/perf-machine-don-t-ignore-_etext-when-not-a-text-sym.patch b/queue-5.10/perf-machine-don-t-ignore-_etext-when-not-a-text-sym.patch deleted file mode 100644 index 0dbd73e5db..0000000000 --- a/queue-5.10/perf-machine-don-t-ignore-_etext-when-not-a-text-sym.patch +++ /dev/null @@ -1,68 +0,0 @@ -From 8876def9bc05bf6db1aa72b1c1f3115544ce6ae6 Mon Sep 17 00:00:00 2001 -From: Sasha Levin -Date: Wed, 8 Jan 2025 10:15:24 +0100 -Subject: perf machine: Don't ignore _etext when not a text symbol - -From: Christophe Leroy - -[ Upstream commit 7a93786c306296f15e728b1dbd949a319e4e3d19 ] - -Depending on how vmlinux.lds is written, _etext might be the very first -data symbol instead of the very last text symbol. - -Don't require it to be a text symbol, accept any symbol type. - -Comitter notes: - -See the first Link for further discussion, but it all boils down to -this: - - --- - # grep -e _stext -e _etext -e _edata /proc/kallsyms - c0000000 T _stext - c08b8000 D _etext - - So there is no _edata and _etext is not text - - $ ppc-linux-objdump -x vmlinux | grep -e _stext -e _etext -e _edata - c0000000 g .head.text 00000000 _stext - c08b8000 g .rodata 00000000 _etext - c1378000 g .sbss 00000000 _edata - --- - -Fixes: ed9adb2035b5be58 ("perf machine: Read also the end of the kernel") -Signed-off-by: Christophe Leroy -Cc: Adrian Hunter -Cc: Alexander Shishkin -Cc: Ian Rogers -Cc: Ingo Molnar -Cc: Jiri Olsa -Cc: Kan Liang -Cc: linuxppc-dev@lists.ozlabs.org -Cc: Mark Rutland -Cc: Namhyung Kim -Cc: Peter Zijlstra -Cc: Song Liu -Link: https://lore.kernel.org/r/b3ee1994d95257cb7f2de037c5030ba7d1bed404.1736327613.git.christophe.leroy@csgroup.eu -Signed-off-by: Arnaldo Carvalho de Melo -Signed-off-by: Sasha Levin ---- - tools/perf/util/machine.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/tools/perf/util/machine.c b/tools/perf/util/machine.c -index d8d64cd63b1dc..4ae2d28f13ebe 100644 ---- a/tools/perf/util/machine.c -+++ b/tools/perf/util/machine.c -@@ -1039,7 +1039,7 @@ static int machine__get_running_kernel_start(struct machine *machine, - - err = kallsyms__get_symbol_start(filename, "_edata", &addr); - if (err) -- err = kallsyms__get_function_start(filename, "_etext", &addr); -+ err = kallsyms__get_symbol_start(filename, "_etext", &addr); - if (!err) - *end = addr; - --- -2.39.5 - diff --git a/queue-5.10/perf-machine-include-data-symbols-in-the-kernel-map.patch b/queue-5.10/perf-machine-include-data-symbols-in-the-kernel-map.patch deleted file mode 100644 index e341797681..0000000000 --- a/queue-5.10/perf-machine-include-data-symbols-in-the-kernel-map.patch +++ /dev/null @@ -1,77 +0,0 @@ -From 850ab5f1c00d51542a86b35175bdf47a768aea98 Mon Sep 17 00:00:00 2001 -From: Sasha Levin -Date: Mon, 24 Jul 2023 17:19:29 -0700 -Subject: perf machine: Include data symbols in the kernel map - -From: Namhyung Kim - -[ Upstream commit 69a87a32f5cd8b262cb2195b045f96c63aede734 ] - -When 'perf record -d' is used, it needs data mmaps to symbolize global -data. But it missed to collect kernel data maps so it cannot symbolize -them. Instead of having a separate map, just increase the kernel map -size to include the data section. - -Probably we can have a separate kernel map for data, but the current -code assumes a single kernel map. So it'd require more changes in other -places and looks error-prone. I decided not to go that way for now. - -Also it seems the kernel module size already includes the data section. - -For example, my system has the following. - - $ grep -e _stext -e _etext -e _edata /proc/kallsyms - ffffffff99800000 T _stext - ffffffff9a601ac8 T _etext - ffffffff9b446a00 D _edata - -Size of the text section is (0x9a601ac8 - 0x99800000 = 0xe01ac8) and -size including data section is (0x9b446a00 - 0x99800000 = 0x1c46a00). - -Before: - $ perf record -d true - - $ perf report -D | grep MMAP | head -1 - 0 0 0x460 [0x60]: PERF_RECORD_MMAP -1/0: [0xffffffff99800000(0xe01ac8) @ 0xffffffff99800000]: x [kernel.kallsyms]_text - ^^^^^^^^ - here -After: - $ perf report -D | grep MMAP | head -1 - 0 0 0x460 [0x60]: PERF_RECORD_MMAP -1/0: [0xffffffff99800000(0x1c46a00) @ 0xffffffff99800000]: x [kernel.kallsyms]_text - ^^^^^^^^^ - -Instead of just replacing it to _edata, try _edata first and then fall -back to _etext just in case. - -Signed-off-by: Namhyung Kim -Acked-by: Adrian Hunter -Cc: Ian Rogers -Cc: Ingo Molnar -Cc: Jiri Olsa -Cc: Peter Zijlstra -Link: https://lore.kernel.org/r/20230725001929.368041-2-namhyung@kernel.org -Signed-off-by: Arnaldo Carvalho de Melo -Stable-dep-of: 7a93786c3062 ("perf machine: Don't ignore _etext when not a text symbol") -Signed-off-by: Sasha Levin ---- - tools/perf/util/machine.c | 4 +++- - 1 file changed, 3 insertions(+), 1 deletion(-) - -diff --git a/tools/perf/util/machine.c b/tools/perf/util/machine.c -index eec926c313b13..d8d64cd63b1dc 100644 ---- a/tools/perf/util/machine.c -+++ b/tools/perf/util/machine.c -@@ -1037,7 +1037,9 @@ static int machine__get_running_kernel_start(struct machine *machine, - - *start = addr; - -- err = kallsyms__get_function_start(filename, "_etext", &addr); -+ err = kallsyms__get_symbol_start(filename, "_edata", &addr); -+ if (err) -+ err = kallsyms__get_function_start(filename, "_etext", &addr); - if (!err) - *end = addr; - --- -2.39.5 - diff --git a/queue-5.10/series b/queue-5.10/series index 779cebf294..fb81684500 100644 --- a/queue-5.10/series +++ b/queue-5.10/series @@ -55,8 +55,6 @@ perf-bpf-fix-two-memory-leakages-when-calling-perf_e.patch ktest.pl-remove-unused-declarations-in-run_bisect_te.patch padata-fix-sysfs-store-callback-check.patch perf-top-don-t-complain-about-lack-of-vmlinux-when-n.patch -perf-machine-include-data-symbols-in-the-kernel-map.patch -perf-machine-don-t-ignore-_etext-when-not-a-text-sym.patch perf-report-fix-misleading-help-message-about-demang.patch bpf-send-signals-asynchronously-if-preemptible.patch padata-fix-uaf-in-padata_reorder.patch diff --git a/queue-5.15/perf-machine-don-t-ignore-_etext-when-not-a-text-sym.patch b/queue-5.15/perf-machine-don-t-ignore-_etext-when-not-a-text-sym.patch deleted file mode 100644 index 8074d72084..0000000000 --- a/queue-5.15/perf-machine-don-t-ignore-_etext-when-not-a-text-sym.patch +++ /dev/null @@ -1,68 +0,0 @@ -From dae45e485a8de2d006de4fdfdba3693ff7e0ac1c Mon Sep 17 00:00:00 2001 -From: Sasha Levin -Date: Wed, 8 Jan 2025 10:15:24 +0100 -Subject: perf machine: Don't ignore _etext when not a text symbol - -From: Christophe Leroy - -[ Upstream commit 7a93786c306296f15e728b1dbd949a319e4e3d19 ] - -Depending on how vmlinux.lds is written, _etext might be the very first -data symbol instead of the very last text symbol. - -Don't require it to be a text symbol, accept any symbol type. - -Comitter notes: - -See the first Link for further discussion, but it all boils down to -this: - - --- - # grep -e _stext -e _etext -e _edata /proc/kallsyms - c0000000 T _stext - c08b8000 D _etext - - So there is no _edata and _etext is not text - - $ ppc-linux-objdump -x vmlinux | grep -e _stext -e _etext -e _edata - c0000000 g .head.text 00000000 _stext - c08b8000 g .rodata 00000000 _etext - c1378000 g .sbss 00000000 _edata - --- - -Fixes: ed9adb2035b5be58 ("perf machine: Read also the end of the kernel") -Signed-off-by: Christophe Leroy -Cc: Adrian Hunter -Cc: Alexander Shishkin -Cc: Ian Rogers -Cc: Ingo Molnar -Cc: Jiri Olsa -Cc: Kan Liang -Cc: linuxppc-dev@lists.ozlabs.org -Cc: Mark Rutland -Cc: Namhyung Kim -Cc: Peter Zijlstra -Cc: Song Liu -Link: https://lore.kernel.org/r/b3ee1994d95257cb7f2de037c5030ba7d1bed404.1736327613.git.christophe.leroy@csgroup.eu -Signed-off-by: Arnaldo Carvalho de Melo -Signed-off-by: Sasha Levin ---- - tools/perf/util/machine.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/tools/perf/util/machine.c b/tools/perf/util/machine.c -index 697652b1fc03e..6c22a0a244896 100644 ---- a/tools/perf/util/machine.c -+++ b/tools/perf/util/machine.c -@@ -1068,7 +1068,7 @@ static int machine__get_running_kernel_start(struct machine *machine, - - err = kallsyms__get_symbol_start(filename, "_edata", &addr); - if (err) -- err = kallsyms__get_function_start(filename, "_etext", &addr); -+ err = kallsyms__get_symbol_start(filename, "_etext", &addr); - if (!err) - *end = addr; - --- -2.39.5 - diff --git a/queue-5.15/perf-machine-include-data-symbols-in-the-kernel-map.patch b/queue-5.15/perf-machine-include-data-symbols-in-the-kernel-map.patch deleted file mode 100644 index b89c7ae41d..0000000000 --- a/queue-5.15/perf-machine-include-data-symbols-in-the-kernel-map.patch +++ /dev/null @@ -1,77 +0,0 @@ -From 63d2dad959f6dd55de8e46291e26e73f8146daa6 Mon Sep 17 00:00:00 2001 -From: Sasha Levin -Date: Mon, 24 Jul 2023 17:19:29 -0700 -Subject: perf machine: Include data symbols in the kernel map - -From: Namhyung Kim - -[ Upstream commit 69a87a32f5cd8b262cb2195b045f96c63aede734 ] - -When 'perf record -d' is used, it needs data mmaps to symbolize global -data. But it missed to collect kernel data maps so it cannot symbolize -them. Instead of having a separate map, just increase the kernel map -size to include the data section. - -Probably we can have a separate kernel map for data, but the current -code assumes a single kernel map. So it'd require more changes in other -places and looks error-prone. I decided not to go that way for now. - -Also it seems the kernel module size already includes the data section. - -For example, my system has the following. - - $ grep -e _stext -e _etext -e _edata /proc/kallsyms - ffffffff99800000 T _stext - ffffffff9a601ac8 T _etext - ffffffff9b446a00 D _edata - -Size of the text section is (0x9a601ac8 - 0x99800000 = 0xe01ac8) and -size including data section is (0x9b446a00 - 0x99800000 = 0x1c46a00). - -Before: - $ perf record -d true - - $ perf report -D | grep MMAP | head -1 - 0 0 0x460 [0x60]: PERF_RECORD_MMAP -1/0: [0xffffffff99800000(0xe01ac8) @ 0xffffffff99800000]: x [kernel.kallsyms]_text - ^^^^^^^^ - here -After: - $ perf report -D | grep MMAP | head -1 - 0 0 0x460 [0x60]: PERF_RECORD_MMAP -1/0: [0xffffffff99800000(0x1c46a00) @ 0xffffffff99800000]: x [kernel.kallsyms]_text - ^^^^^^^^^ - -Instead of just replacing it to _edata, try _edata first and then fall -back to _etext just in case. - -Signed-off-by: Namhyung Kim -Acked-by: Adrian Hunter -Cc: Ian Rogers -Cc: Ingo Molnar -Cc: Jiri Olsa -Cc: Peter Zijlstra -Link: https://lore.kernel.org/r/20230725001929.368041-2-namhyung@kernel.org -Signed-off-by: Arnaldo Carvalho de Melo -Stable-dep-of: 7a93786c3062 ("perf machine: Don't ignore _etext when not a text symbol") -Signed-off-by: Sasha Levin ---- - tools/perf/util/machine.c | 4 +++- - 1 file changed, 3 insertions(+), 1 deletion(-) - -diff --git a/tools/perf/util/machine.c b/tools/perf/util/machine.c -index a0df9d24b2cb4..697652b1fc03e 100644 ---- a/tools/perf/util/machine.c -+++ b/tools/perf/util/machine.c -@@ -1066,7 +1066,9 @@ static int machine__get_running_kernel_start(struct machine *machine, - - *start = addr; - -- err = kallsyms__get_function_start(filename, "_etext", &addr); -+ err = kallsyms__get_symbol_start(filename, "_edata", &addr); -+ if (err) -+ err = kallsyms__get_function_start(filename, "_etext", &addr); - if (!err) - *end = addr; - --- -2.39.5 - diff --git a/queue-5.15/series b/queue-5.15/series index 83b90bbe34..e3b40b6e09 100644 --- a/queue-5.15/series +++ b/queue-5.15/series @@ -90,8 +90,6 @@ crypto-hisilicon-sec2-fix-for-aead-invalid-authsize.patch crypto-ixp4xx-fix-of-node-reference-leaks-in-init_ix.patch padata-fix-sysfs-store-callback-check.patch perf-top-don-t-complain-about-lack-of-vmlinux-when-n.patch -perf-machine-include-data-symbols-in-the-kernel-map.patch -perf-machine-don-t-ignore-_etext-when-not-a-text-sym.patch perf-report-fix-misleading-help-message-about-demang.patch bpf-send-signals-asynchronously-if-preemptible.patch padata-fix-uaf-in-padata_reorder.patch diff --git a/queue-5.4/perf-machine-don-t-ignore-_etext-when-not-a-text-sym.patch b/queue-5.4/perf-machine-don-t-ignore-_etext-when-not-a-text-sym.patch deleted file mode 100644 index 8793592295..0000000000 --- a/queue-5.4/perf-machine-don-t-ignore-_etext-when-not-a-text-sym.patch +++ /dev/null @@ -1,68 +0,0 @@ -From d731ccd4e854ada2366083734c02715de329bf3c Mon Sep 17 00:00:00 2001 -From: Sasha Levin -Date: Wed, 8 Jan 2025 10:15:24 +0100 -Subject: perf machine: Don't ignore _etext when not a text symbol - -From: Christophe Leroy - -[ Upstream commit 7a93786c306296f15e728b1dbd949a319e4e3d19 ] - -Depending on how vmlinux.lds is written, _etext might be the very first -data symbol instead of the very last text symbol. - -Don't require it to be a text symbol, accept any symbol type. - -Comitter notes: - -See the first Link for further discussion, but it all boils down to -this: - - --- - # grep -e _stext -e _etext -e _edata /proc/kallsyms - c0000000 T _stext - c08b8000 D _etext - - So there is no _edata and _etext is not text - - $ ppc-linux-objdump -x vmlinux | grep -e _stext -e _etext -e _edata - c0000000 g .head.text 00000000 _stext - c08b8000 g .rodata 00000000 _etext - c1378000 g .sbss 00000000 _edata - --- - -Fixes: ed9adb2035b5be58 ("perf machine: Read also the end of the kernel") -Signed-off-by: Christophe Leroy -Cc: Adrian Hunter -Cc: Alexander Shishkin -Cc: Ian Rogers -Cc: Ingo Molnar -Cc: Jiri Olsa -Cc: Kan Liang -Cc: linuxppc-dev@lists.ozlabs.org -Cc: Mark Rutland -Cc: Namhyung Kim -Cc: Peter Zijlstra -Cc: Song Liu -Link: https://lore.kernel.org/r/b3ee1994d95257cb7f2de037c5030ba7d1bed404.1736327613.git.christophe.leroy@csgroup.eu -Signed-off-by: Arnaldo Carvalho de Melo -Signed-off-by: Sasha Levin ---- - tools/perf/util/machine.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/tools/perf/util/machine.c b/tools/perf/util/machine.c -index e7f970681efce..f27fd5e1b6f3f 100644 ---- a/tools/perf/util/machine.c -+++ b/tools/perf/util/machine.c -@@ -952,7 +952,7 @@ static int machine__get_running_kernel_start(struct machine *machine, - - err = kallsyms__get_symbol_start(filename, "_edata", &addr); - if (err) -- err = kallsyms__get_function_start(filename, "_etext", &addr); -+ err = kallsyms__get_symbol_start(filename, "_etext", &addr); - if (!err) - *end = addr; - --- -2.39.5 - diff --git a/queue-5.4/perf-machine-include-data-symbols-in-the-kernel-map.patch b/queue-5.4/perf-machine-include-data-symbols-in-the-kernel-map.patch deleted file mode 100644 index 8015791ff4..0000000000 --- a/queue-5.4/perf-machine-include-data-symbols-in-the-kernel-map.patch +++ /dev/null @@ -1,77 +0,0 @@ -From d9b0d9f13d180a904a07c9bfea4ecad3ab4d7d12 Mon Sep 17 00:00:00 2001 -From: Sasha Levin -Date: Mon, 24 Jul 2023 17:19:29 -0700 -Subject: perf machine: Include data symbols in the kernel map - -From: Namhyung Kim - -[ Upstream commit 69a87a32f5cd8b262cb2195b045f96c63aede734 ] - -When 'perf record -d' is used, it needs data mmaps to symbolize global -data. But it missed to collect kernel data maps so it cannot symbolize -them. Instead of having a separate map, just increase the kernel map -size to include the data section. - -Probably we can have a separate kernel map for data, but the current -code assumes a single kernel map. So it'd require more changes in other -places and looks error-prone. I decided not to go that way for now. - -Also it seems the kernel module size already includes the data section. - -For example, my system has the following. - - $ grep -e _stext -e _etext -e _edata /proc/kallsyms - ffffffff99800000 T _stext - ffffffff9a601ac8 T _etext - ffffffff9b446a00 D _edata - -Size of the text section is (0x9a601ac8 - 0x99800000 = 0xe01ac8) and -size including data section is (0x9b446a00 - 0x99800000 = 0x1c46a00). - -Before: - $ perf record -d true - - $ perf report -D | grep MMAP | head -1 - 0 0 0x460 [0x60]: PERF_RECORD_MMAP -1/0: [0xffffffff99800000(0xe01ac8) @ 0xffffffff99800000]: x [kernel.kallsyms]_text - ^^^^^^^^ - here -After: - $ perf report -D | grep MMAP | head -1 - 0 0 0x460 [0x60]: PERF_RECORD_MMAP -1/0: [0xffffffff99800000(0x1c46a00) @ 0xffffffff99800000]: x [kernel.kallsyms]_text - ^^^^^^^^^ - -Instead of just replacing it to _edata, try _edata first and then fall -back to _etext just in case. - -Signed-off-by: Namhyung Kim -Acked-by: Adrian Hunter -Cc: Ian Rogers -Cc: Ingo Molnar -Cc: Jiri Olsa -Cc: Peter Zijlstra -Link: https://lore.kernel.org/r/20230725001929.368041-2-namhyung@kernel.org -Signed-off-by: Arnaldo Carvalho de Melo -Stable-dep-of: 7a93786c3062 ("perf machine: Don't ignore _etext when not a text symbol") -Signed-off-by: Sasha Levin ---- - tools/perf/util/machine.c | 4 +++- - 1 file changed, 3 insertions(+), 1 deletion(-) - -diff --git a/tools/perf/util/machine.c b/tools/perf/util/machine.c -index 8c3addc2e9e1e..e7f970681efce 100644 ---- a/tools/perf/util/machine.c -+++ b/tools/perf/util/machine.c -@@ -950,7 +950,9 @@ static int machine__get_running_kernel_start(struct machine *machine, - - *start = addr; - -- err = kallsyms__get_function_start(filename, "_etext", &addr); -+ err = kallsyms__get_symbol_start(filename, "_edata", &addr); -+ if (err) -+ err = kallsyms__get_function_start(filename, "_etext", &addr); - if (!err) - *end = addr; - --- -2.39.5 - diff --git a/queue-5.4/series b/queue-5.4/series index da63270670..0c248418cd 100644 --- a/queue-5.4/series +++ b/queue-5.4/series @@ -32,8 +32,6 @@ perf-header-fix-one-memory-leakage-in-process_bpf_pr.patch ktest.pl-remove-unused-declarations-in-run_bisect_te.patch padata-fix-sysfs-store-callback-check.patch perf-top-don-t-complain-about-lack-of-vmlinux-when-n.patch -perf-machine-include-data-symbols-in-the-kernel-map.patch -perf-machine-don-t-ignore-_etext-when-not-a-text-sym.patch perf-report-fix-misleading-help-message-about-demang.patch bpf-send-signals-asynchronously-if-preemptible.patch rdma-mlx4-avoid-false-error-about-access-to-uninitia.patch diff --git a/queue-6.1/perf-machine-don-t-ignore-_etext-when-not-a-text-sym.patch b/queue-6.1/perf-machine-don-t-ignore-_etext-when-not-a-text-sym.patch deleted file mode 100644 index a4ee9c72f0..0000000000 --- a/queue-6.1/perf-machine-don-t-ignore-_etext-when-not-a-text-sym.patch +++ /dev/null @@ -1,68 +0,0 @@ -From 88760f049944cf7bdfa95ac171d832fb95459a7d Mon Sep 17 00:00:00 2001 -From: Sasha Levin -Date: Wed, 8 Jan 2025 10:15:24 +0100 -Subject: perf machine: Don't ignore _etext when not a text symbol - -From: Christophe Leroy - -[ Upstream commit 7a93786c306296f15e728b1dbd949a319e4e3d19 ] - -Depending on how vmlinux.lds is written, _etext might be the very first -data symbol instead of the very last text symbol. - -Don't require it to be a text symbol, accept any symbol type. - -Comitter notes: - -See the first Link for further discussion, but it all boils down to -this: - - --- - # grep -e _stext -e _etext -e _edata /proc/kallsyms - c0000000 T _stext - c08b8000 D _etext - - So there is no _edata and _etext is not text - - $ ppc-linux-objdump -x vmlinux | grep -e _stext -e _etext -e _edata - c0000000 g .head.text 00000000 _stext - c08b8000 g .rodata 00000000 _etext - c1378000 g .sbss 00000000 _edata - --- - -Fixes: ed9adb2035b5be58 ("perf machine: Read also the end of the kernel") -Signed-off-by: Christophe Leroy -Cc: Adrian Hunter -Cc: Alexander Shishkin -Cc: Ian Rogers -Cc: Ingo Molnar -Cc: Jiri Olsa -Cc: Kan Liang -Cc: linuxppc-dev@lists.ozlabs.org -Cc: Mark Rutland -Cc: Namhyung Kim -Cc: Peter Zijlstra -Cc: Song Liu -Link: https://lore.kernel.org/r/b3ee1994d95257cb7f2de037c5030ba7d1bed404.1736327613.git.christophe.leroy@csgroup.eu -Signed-off-by: Arnaldo Carvalho de Melo -Signed-off-by: Sasha Levin ---- - tools/perf/util/machine.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/tools/perf/util/machine.c b/tools/perf/util/machine.c -index d8a2b80086e66..1b4a2f911a20e 100644 ---- a/tools/perf/util/machine.c -+++ b/tools/perf/util/machine.c -@@ -1173,7 +1173,7 @@ static int machine__get_running_kernel_start(struct machine *machine, - - err = kallsyms__get_symbol_start(filename, "_edata", &addr); - if (err) -- err = kallsyms__get_function_start(filename, "_etext", &addr); -+ err = kallsyms__get_symbol_start(filename, "_etext", &addr); - if (!err) - *end = addr; - --- -2.39.5 - diff --git a/queue-6.1/perf-machine-include-data-symbols-in-the-kernel-map.patch b/queue-6.1/perf-machine-include-data-symbols-in-the-kernel-map.patch deleted file mode 100644 index d5309222ba..0000000000 --- a/queue-6.1/perf-machine-include-data-symbols-in-the-kernel-map.patch +++ /dev/null @@ -1,77 +0,0 @@ -From cdad98c919c61ad1f50e7186a47c177def970d42 Mon Sep 17 00:00:00 2001 -From: Sasha Levin -Date: Mon, 24 Jul 2023 17:19:29 -0700 -Subject: perf machine: Include data symbols in the kernel map - -From: Namhyung Kim - -[ Upstream commit 69a87a32f5cd8b262cb2195b045f96c63aede734 ] - -When 'perf record -d' is used, it needs data mmaps to symbolize global -data. But it missed to collect kernel data maps so it cannot symbolize -them. Instead of having a separate map, just increase the kernel map -size to include the data section. - -Probably we can have a separate kernel map for data, but the current -code assumes a single kernel map. So it'd require more changes in other -places and looks error-prone. I decided not to go that way for now. - -Also it seems the kernel module size already includes the data section. - -For example, my system has the following. - - $ grep -e _stext -e _etext -e _edata /proc/kallsyms - ffffffff99800000 T _stext - ffffffff9a601ac8 T _etext - ffffffff9b446a00 D _edata - -Size of the text section is (0x9a601ac8 - 0x99800000 = 0xe01ac8) and -size including data section is (0x9b446a00 - 0x99800000 = 0x1c46a00). - -Before: - $ perf record -d true - - $ perf report -D | grep MMAP | head -1 - 0 0 0x460 [0x60]: PERF_RECORD_MMAP -1/0: [0xffffffff99800000(0xe01ac8) @ 0xffffffff99800000]: x [kernel.kallsyms]_text - ^^^^^^^^ - here -After: - $ perf report -D | grep MMAP | head -1 - 0 0 0x460 [0x60]: PERF_RECORD_MMAP -1/0: [0xffffffff99800000(0x1c46a00) @ 0xffffffff99800000]: x [kernel.kallsyms]_text - ^^^^^^^^^ - -Instead of just replacing it to _edata, try _edata first and then fall -back to _etext just in case. - -Signed-off-by: Namhyung Kim -Acked-by: Adrian Hunter -Cc: Ian Rogers -Cc: Ingo Molnar -Cc: Jiri Olsa -Cc: Peter Zijlstra -Link: https://lore.kernel.org/r/20230725001929.368041-2-namhyung@kernel.org -Signed-off-by: Arnaldo Carvalho de Melo -Stable-dep-of: 7a93786c3062 ("perf machine: Don't ignore _etext when not a text symbol") -Signed-off-by: Sasha Levin ---- - tools/perf/util/machine.c | 4 +++- - 1 file changed, 3 insertions(+), 1 deletion(-) - -diff --git a/tools/perf/util/machine.c b/tools/perf/util/machine.c -index 9cd52f50ea7ac..d8a2b80086e66 100644 ---- a/tools/perf/util/machine.c -+++ b/tools/perf/util/machine.c -@@ -1171,7 +1171,9 @@ static int machine__get_running_kernel_start(struct machine *machine, - - *start = addr; - -- err = kallsyms__get_function_start(filename, "_etext", &addr); -+ err = kallsyms__get_symbol_start(filename, "_edata", &addr); -+ if (err) -+ err = kallsyms__get_function_start(filename, "_etext", &addr); - if (!err) - *end = addr; - --- -2.39.5 - diff --git a/queue-6.1/series b/queue-6.1/series index 993f98ab77..910ab4177d 100644 --- a/queue-6.1/series +++ b/queue-6.1/series @@ -114,8 +114,6 @@ crypto-hisilicon-sec2-fix-for-aead-invalid-authsize.patch crypto-ixp4xx-fix-of-node-reference-leaks-in-init_ix.patch padata-fix-sysfs-store-callback-check.patch perf-top-don-t-complain-about-lack-of-vmlinux-when-n.patch -perf-machine-include-data-symbols-in-the-kernel-map.patch -perf-machine-don-t-ignore-_etext-when-not-a-text-sym.patch perf-namespaces-introduce-nsinfo__set_in_pidns.patch perf-namespaces-fixup-the-nsinfo__in_pidns-return-ty.patch asoc-intel-avs-fix-theoretical-infinite-loop.patch