+++ /dev/null
-From 8876def9bc05bf6db1aa72b1c1f3115544ce6ae6 Mon Sep 17 00:00:00 2001
-From: Sasha Levin <sashal@kernel.org>
-Date: Wed, 8 Jan 2025 10:15:24 +0100
-Subject: perf machine: Don't ignore _etext when not a text symbol
-
-From: Christophe Leroy <christophe.leroy@csgroup.eu>
-
-[ 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 <christophe.leroy@csgroup.eu>
-Cc: Adrian Hunter <adrian.hunter@intel.com>
-Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
-Cc: Ian Rogers <irogers@google.com>
-Cc: Ingo Molnar <mingo@redhat.com>
-Cc: Jiri Olsa <jolsa@kernel.org>
-Cc: Kan Liang <kan.liang@linux.intel.com>
-Cc: linuxppc-dev@lists.ozlabs.org
-Cc: Mark Rutland <mark.rutland@arm.com>
-Cc: Namhyung Kim <namhyung@kernel.org>
-Cc: Peter Zijlstra <peterz@infradead.org>
-Cc: Song Liu <songliubraving@fb.com>
-Link: https://lore.kernel.org/r/b3ee1994d95257cb7f2de037c5030ba7d1bed404.1736327613.git.christophe.leroy@csgroup.eu
-Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
-Signed-off-by: Sasha Levin <sashal@kernel.org>
----
- 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
-
+++ /dev/null
-From 850ab5f1c00d51542a86b35175bdf47a768aea98 Mon Sep 17 00:00:00 2001
-From: Sasha Levin <sashal@kernel.org>
-Date: Mon, 24 Jul 2023 17:19:29 -0700
-Subject: perf machine: Include data symbols in the kernel map
-
-From: Namhyung Kim <namhyung@kernel.org>
-
-[ 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 <namhyung@kernel.org>
-Acked-by: Adrian Hunter <adrian.hunter@intel.com>
-Cc: Ian Rogers <irogers@google.com>
-Cc: Ingo Molnar <mingo@kernel.org>
-Cc: Jiri Olsa <jolsa@kernel.org>
-Cc: Peter Zijlstra <peterz@infradead.org>
-Link: https://lore.kernel.org/r/20230725001929.368041-2-namhyung@kernel.org
-Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
-Stable-dep-of: 7a93786c3062 ("perf machine: Don't ignore _etext when not a text symbol")
-Signed-off-by: Sasha Levin <sashal@kernel.org>
----
- 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
-
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
+++ /dev/null
-From dae45e485a8de2d006de4fdfdba3693ff7e0ac1c Mon Sep 17 00:00:00 2001
-From: Sasha Levin <sashal@kernel.org>
-Date: Wed, 8 Jan 2025 10:15:24 +0100
-Subject: perf machine: Don't ignore _etext when not a text symbol
-
-From: Christophe Leroy <christophe.leroy@csgroup.eu>
-
-[ 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 <christophe.leroy@csgroup.eu>
-Cc: Adrian Hunter <adrian.hunter@intel.com>
-Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
-Cc: Ian Rogers <irogers@google.com>
-Cc: Ingo Molnar <mingo@redhat.com>
-Cc: Jiri Olsa <jolsa@kernel.org>
-Cc: Kan Liang <kan.liang@linux.intel.com>
-Cc: linuxppc-dev@lists.ozlabs.org
-Cc: Mark Rutland <mark.rutland@arm.com>
-Cc: Namhyung Kim <namhyung@kernel.org>
-Cc: Peter Zijlstra <peterz@infradead.org>
-Cc: Song Liu <songliubraving@fb.com>
-Link: https://lore.kernel.org/r/b3ee1994d95257cb7f2de037c5030ba7d1bed404.1736327613.git.christophe.leroy@csgroup.eu
-Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
-Signed-off-by: Sasha Levin <sashal@kernel.org>
----
- 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
-
+++ /dev/null
-From 63d2dad959f6dd55de8e46291e26e73f8146daa6 Mon Sep 17 00:00:00 2001
-From: Sasha Levin <sashal@kernel.org>
-Date: Mon, 24 Jul 2023 17:19:29 -0700
-Subject: perf machine: Include data symbols in the kernel map
-
-From: Namhyung Kim <namhyung@kernel.org>
-
-[ 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 <namhyung@kernel.org>
-Acked-by: Adrian Hunter <adrian.hunter@intel.com>
-Cc: Ian Rogers <irogers@google.com>
-Cc: Ingo Molnar <mingo@kernel.org>
-Cc: Jiri Olsa <jolsa@kernel.org>
-Cc: Peter Zijlstra <peterz@infradead.org>
-Link: https://lore.kernel.org/r/20230725001929.368041-2-namhyung@kernel.org
-Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
-Stable-dep-of: 7a93786c3062 ("perf machine: Don't ignore _etext when not a text symbol")
-Signed-off-by: Sasha Levin <sashal@kernel.org>
----
- 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
-
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
+++ /dev/null
-From d731ccd4e854ada2366083734c02715de329bf3c Mon Sep 17 00:00:00 2001
-From: Sasha Levin <sashal@kernel.org>
-Date: Wed, 8 Jan 2025 10:15:24 +0100
-Subject: perf machine: Don't ignore _etext when not a text symbol
-
-From: Christophe Leroy <christophe.leroy@csgroup.eu>
-
-[ 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 <christophe.leroy@csgroup.eu>
-Cc: Adrian Hunter <adrian.hunter@intel.com>
-Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
-Cc: Ian Rogers <irogers@google.com>
-Cc: Ingo Molnar <mingo@redhat.com>
-Cc: Jiri Olsa <jolsa@kernel.org>
-Cc: Kan Liang <kan.liang@linux.intel.com>
-Cc: linuxppc-dev@lists.ozlabs.org
-Cc: Mark Rutland <mark.rutland@arm.com>
-Cc: Namhyung Kim <namhyung@kernel.org>
-Cc: Peter Zijlstra <peterz@infradead.org>
-Cc: Song Liu <songliubraving@fb.com>
-Link: https://lore.kernel.org/r/b3ee1994d95257cb7f2de037c5030ba7d1bed404.1736327613.git.christophe.leroy@csgroup.eu
-Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
-Signed-off-by: Sasha Levin <sashal@kernel.org>
----
- 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
-
+++ /dev/null
-From d9b0d9f13d180a904a07c9bfea4ecad3ab4d7d12 Mon Sep 17 00:00:00 2001
-From: Sasha Levin <sashal@kernel.org>
-Date: Mon, 24 Jul 2023 17:19:29 -0700
-Subject: perf machine: Include data symbols in the kernel map
-
-From: Namhyung Kim <namhyung@kernel.org>
-
-[ 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 <namhyung@kernel.org>
-Acked-by: Adrian Hunter <adrian.hunter@intel.com>
-Cc: Ian Rogers <irogers@google.com>
-Cc: Ingo Molnar <mingo@kernel.org>
-Cc: Jiri Olsa <jolsa@kernel.org>
-Cc: Peter Zijlstra <peterz@infradead.org>
-Link: https://lore.kernel.org/r/20230725001929.368041-2-namhyung@kernel.org
-Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
-Stable-dep-of: 7a93786c3062 ("perf machine: Don't ignore _etext when not a text symbol")
-Signed-off-by: Sasha Levin <sashal@kernel.org>
----
- 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
-
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
+++ /dev/null
-From 88760f049944cf7bdfa95ac171d832fb95459a7d Mon Sep 17 00:00:00 2001
-From: Sasha Levin <sashal@kernel.org>
-Date: Wed, 8 Jan 2025 10:15:24 +0100
-Subject: perf machine: Don't ignore _etext when not a text symbol
-
-From: Christophe Leroy <christophe.leroy@csgroup.eu>
-
-[ 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 <christophe.leroy@csgroup.eu>
-Cc: Adrian Hunter <adrian.hunter@intel.com>
-Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
-Cc: Ian Rogers <irogers@google.com>
-Cc: Ingo Molnar <mingo@redhat.com>
-Cc: Jiri Olsa <jolsa@kernel.org>
-Cc: Kan Liang <kan.liang@linux.intel.com>
-Cc: linuxppc-dev@lists.ozlabs.org
-Cc: Mark Rutland <mark.rutland@arm.com>
-Cc: Namhyung Kim <namhyung@kernel.org>
-Cc: Peter Zijlstra <peterz@infradead.org>
-Cc: Song Liu <songliubraving@fb.com>
-Link: https://lore.kernel.org/r/b3ee1994d95257cb7f2de037c5030ba7d1bed404.1736327613.git.christophe.leroy@csgroup.eu
-Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
-Signed-off-by: Sasha Levin <sashal@kernel.org>
----
- 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
-
+++ /dev/null
-From cdad98c919c61ad1f50e7186a47c177def970d42 Mon Sep 17 00:00:00 2001
-From: Sasha Levin <sashal@kernel.org>
-Date: Mon, 24 Jul 2023 17:19:29 -0700
-Subject: perf machine: Include data symbols in the kernel map
-
-From: Namhyung Kim <namhyung@kernel.org>
-
-[ 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 <namhyung@kernel.org>
-Acked-by: Adrian Hunter <adrian.hunter@intel.com>
-Cc: Ian Rogers <irogers@google.com>
-Cc: Ingo Molnar <mingo@kernel.org>
-Cc: Jiri Olsa <jolsa@kernel.org>
-Cc: Peter Zijlstra <peterz@infradead.org>
-Link: https://lore.kernel.org/r/20230725001929.368041-2-namhyung@kernel.org
-Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
-Stable-dep-of: 7a93786c3062 ("perf machine: Don't ignore _etext when not a text symbol")
-Signed-off-by: Sasha Levin <sashal@kernel.org>
----
- 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
-
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