]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blame - releases/4.9.132/perf-probe-powerpc-ignore-sys-symbols-irrespective-of-endianness.patch
Linux 4.14.95
[thirdparty/kernel/stable-queue.git] / releases / 4.9.132 / perf-probe-powerpc-ignore-sys-symbols-irrespective-of-endianness.patch
CommitLineData
80347ec8
GKH
1From foo@baz Mon Oct 8 18:01:43 CEST 2018
2From: Sandipan Das <sandipan@linux.ibm.com>
3Date: Tue, 28 Aug 2018 14:38:48 +0530
4Subject: perf probe powerpc: Ignore SyS symbols irrespective of endianness
5
6From: Sandipan Das <sandipan@linux.ibm.com>
7
8[ Upstream commit fa694160cca6dbba17c57dc7efec5f93feaf8795 ]
9
10This makes sure that the SyS symbols are ignored for any powerpc system,
11not just the big endian ones.
12
13Reported-by: Naveen N. Rao <naveen.n.rao@linux.vnet.ibm.com>
14Signed-off-by: Sandipan Das <sandipan@linux.ibm.com>
15Reviewed-by: Kamalesh Babulal <kamalesh@linux.vnet.ibm.com>
16Acked-by: Naveen N. Rao <naveen.n.rao@linux.vnet.ibm.com>
17Cc: Jiri Olsa <jolsa@redhat.com>
18Cc: Ravi Bangoria <ravi.bangoria@linux.ibm.com>
19Fixes: fb6d59423115 ("perf probe ppc: Use the right prefix when ignoring SyS symbols on ppc")
20Link: http://lkml.kernel.org/r/20180828090848.1914-1-sandipan@linux.ibm.com
21Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
22Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
23Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
24---
25 tools/perf/arch/powerpc/util/sym-handling.c | 4 +++-
26 1 file changed, 3 insertions(+), 1 deletion(-)
27
28--- a/tools/perf/arch/powerpc/util/sym-handling.c
29+++ b/tools/perf/arch/powerpc/util/sym-handling.c
30@@ -21,15 +21,16 @@ bool elf__needs_adjust_symbols(GElf_Ehdr
31
32 #endif
33
34-#if !defined(_CALL_ELF) || _CALL_ELF != 2
35 int arch__choose_best_symbol(struct symbol *syma,
36 struct symbol *symb __maybe_unused)
37 {
38 char *sym = syma->name;
39
40+#if !defined(_CALL_ELF) || _CALL_ELF != 2
41 /* Skip over any initial dot */
42 if (*sym == '.')
43 sym++;
44+#endif
45
46 /* Avoid "SyS" kernel syscall aliases */
47 if (strlen(sym) >= 3 && !strncmp(sym, "SyS", 3))
48@@ -40,6 +41,7 @@ int arch__choose_best_symbol(struct symb
49 return SYMBOL_A;
50 }
51
52+#if !defined(_CALL_ELF) || _CALL_ELF != 2
53 /* Allow matching against dot variants */
54 int arch__compare_symbol_names(const char *namea, const char *nameb)
55 {