linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Kim Phillips <kim.phillips@arm.com>
To: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: Catalin Marinas <catalin.marinas@arm.com>,
	linux-arm-kernel <linux-arm-kernel@lists.infradead.org>,
	Namhyung Kim <namhyung@kernel.org>,
	Will Deacon <will.deacon@arm.com>,
	Arnaldo Carvalho de Melo <acme@kernel.org>,
	Jiri Olsa <jolsa@redhat.com>, Ingo Molnar <mingo@kernel.org>,
	Peter Zijlstra <a.p.zijlstra@chello.nl>,
	Jiri Olsa <jolsa@kernel.org>, LKML <linux-kernel@vger.kernel.org>,
	kernel-team@lge.com, Michal Marek <mmarek@suse.cz>
Subject: [PATCH v2] arm64/kernel: rename module_emit_adrp_veneer->module_emit_veneer_for_adrp
Date: Tue, 24 Apr 2018 10:39:43 -0500	[thread overview]
Message-ID: <20180424103943.453d3449bbe2b35b86cc3443@arm.com> (raw)
In-Reply-To: <CAKv+Gu_LJB1Zkg26kCcAUs6eAcZFpX4LUnWuEhjo8OA=83fz+A@mail.gmail.com>

Commit a257e02579e ("arm64/kernel: don't ban ADRP to work around
Cortex-A53 erratum #843419") introduced a function whose name ends with
"_veneer".

This clashes with commit bd8b22d2888e ("Kbuild: kallsyms: ignore veneers
emitted by the ARM linker"), which removes symbols ending in "_veneer"
from kallsyms.

The problem was manifested as 'perf test -vvvvv vmlinux' failed,
correctly claiming the symbol 'module_emit_adrp_veneer' was present in
vmlinux, but not in kallsyms.

...
    ERR : 0xffff00000809aa58: module_emit_adrp_veneer not on kallsyms
...
    test child finished with -1
    ---- end ----
    vmlinux symtab matches kallsyms: FAILED!

Fix the problem by renaming module_emit_adrp_veneer to 
module_emit_veneer_for_adrp.  Now the test passes.

Fixes: a257e02579e ("arm64/kernel: don't ban ADRP to work around Cortex-A53 erratum #843419")
Acked-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: Will Deacon <will.deacon@arm.com>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Michal Marek <mmarek@suse.cz>
Signed-off-by: Kim Phillips <kim.phillips@arm.com>
---
v2: fixed naming and wording of last sentence in commit text.

 arch/arm64/include/asm/module.h | 2 +-
 arch/arm64/kernel/module-plts.c | 2 +-
 arch/arm64/kernel/module.c      | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/arch/arm64/include/asm/module.h b/arch/arm64/include/asm/module.h
index b6dbbe3123a9..97d0ef12e2ff 100644
--- a/arch/arm64/include/asm/module.h
+++ b/arch/arm64/include/asm/module.h
@@ -39,7 +39,7 @@ struct mod_arch_specific {
 u64 module_emit_plt_entry(struct module *mod, void *loc, const Elf64_Rela *rela,
 			  Elf64_Sym *sym);
 
-u64 module_emit_adrp_veneer(struct module *mod, void *loc, u64 val);
+u64 module_emit_veneer_for_adrp(struct module *mod, void *loc, u64 val);
 
 #ifdef CONFIG_RANDOMIZE_BASE
 extern u64 module_alloc_base;
diff --git a/arch/arm64/kernel/module-plts.c b/arch/arm64/kernel/module-plts.c
index fa3637284a3d..f0690c2ca3e0 100644
--- a/arch/arm64/kernel/module-plts.c
+++ b/arch/arm64/kernel/module-plts.c
@@ -43,7 +43,7 @@ u64 module_emit_plt_entry(struct module *mod, void *loc, const Elf64_Rela *rela,
 }
 
 #ifdef CONFIG_ARM64_ERRATUM_843419
-u64 module_emit_adrp_veneer(struct module *mod, void *loc, u64 val)
+u64 module_emit_veneer_for_adrp(struct module *mod, void *loc, u64 val)
 {
 	struct mod_plt_sec *pltsec = !in_init(mod, loc) ? &mod->arch.core :
 							  &mod->arch.init;
diff --git a/arch/arm64/kernel/module.c b/arch/arm64/kernel/module.c
index 719fde8dcc19..155fd91e78f4 100644
--- a/arch/arm64/kernel/module.c
+++ b/arch/arm64/kernel/module.c
@@ -215,7 +215,7 @@ static int reloc_insn_adrp(struct module *mod, __le32 *place, u64 val)
 		insn &= ~BIT(31);
 	} else {
 		/* out of range for ADR -> emit a veneer */
-		val = module_emit_adrp_veneer(mod, place, val & ~0xfff);
+		val = module_emit_veneer_for_adrp(mod, place, val & ~0xfff);
 		if (!val)
 			return -ENOEXEC;
 		insn = aarch64_insn_gen_branch_imm((u64)place, val,
-- 
2.17.0

      reply	other threads:[~2018-04-24 15:39 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-04-16  4:22 [PATCH] perf tools: set kernel end address properly Namhyung Kim
2018-04-16  9:23 ` Jiri Olsa
2018-04-16 13:51   ` Arnaldo Carvalho de Melo
2018-04-16 16:07     ` Kim Phillips
2018-04-16 16:58       ` Arnaldo Carvalho de Melo
2018-04-16 17:24         ` Kim Phillips
2018-04-16 22:48           ` Kim Phillips
2018-04-17  2:27             ` Namhyung Kim
2018-04-19  0:37               ` Kim Phillips
2018-04-19  2:37                 ` Namhyung Kim
2018-04-19 23:20                   ` Kim Phillips
2018-04-19 23:59                     ` Namhyung Kim
2018-04-20 23:23                       ` Kim Phillips
2018-04-23 13:52                         ` Arnaldo Carvalho de Melo
2018-04-23 14:56                           ` Kim Phillips
2018-04-26  5:51                       ` [tip:perf/urgent] perf machine: Set main " tip-bot for Namhyung Kim
2018-04-19  2:54                 ` [PATCH] perf tools: set " Namhyung Kim
2018-04-19 23:33                   ` Kim Phillips
2018-04-20  0:11                     ` Namhyung Kim
2018-04-20  8:10                     ` Ard Biesheuvel
2018-04-23 21:43                       ` Kim Phillips
2018-04-24  6:13                         ` Ard Biesheuvel
2018-04-24 12:50                           ` Kim Phillips
2018-04-24 13:07                             ` Ard Biesheuvel
2018-04-24 15:13                               ` [PATCH] arm64/kernel: rename module_emit_adrp_veneer->module_emit_veneer_for_adrp Kim Phillips
2018-04-24 15:15                                 ` Ard Biesheuvel
2018-04-24 15:39                                   ` Kim Phillips [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180424103943.453d3449bbe2b35b86cc3443@arm.com \
    --to=kim.phillips@arm.com \
    --cc=a.p.zijlstra@chello.nl \
    --cc=acme@kernel.org \
    --cc=ard.biesheuvel@linaro.org \
    --cc=catalin.marinas@arm.com \
    --cc=jolsa@kernel.org \
    --cc=jolsa@redhat.com \
    --cc=kernel-team@lge.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=mmarek@suse.cz \
    --cc=namhyung@kernel.org \
    --cc=will.deacon@arm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).