Received: by 10.192.165.148 with SMTP id m20csp4776291imm; Tue, 24 Apr 2018 08:14:28 -0700 (PDT) X-Google-Smtp-Source: AB8JxZr3ZaGEIJAhn1IFCjDSTt4QdH036AjmsjvV8Y0L4Z0X4/3/59M/yRDK994eAMAVkTwIsZhs X-Received: by 2002:a17:902:d886:: with SMTP id b6-v6mr2184975plz.278.1524582868578; Tue, 24 Apr 2018 08:14:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524582868; cv=none; d=google.com; s=arc-20160816; b=UVWTYjRfNnL02/NEHY+wpCdw36y8xs55C8jl3RGSbu6Rep0dbqQ5T8Y+yel7Zu+RER 2dp8QyMlZ5DXadly+RslnyuKHFdlRPWW7E4VyefVptyl+vYMceE/lMgjqObYvCoR3gvL TJa91ulnlm6z/WceqjFhRTj7E6bN2pntzCV3+1Oj6PZKpVBsZJVeR2CPVT+QEigro8ff okWs3ZBZ5MPwV7PUaVAv+jj+6x53efL+610i4grPEFV3MU4M4M4Kz0rzLnVLBBG1ykTr AAziugzFFRaypGR4cEPCCGfmLKNwBU44NvcaKR6hoNaLFmUMei0GowMeJEgnC2Yv6XOV U+rA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :organization:references:in-reply-to:message-id:subject:cc:to:from :date:arc-authentication-results; bh=aKDqHlGxXXbtEMpBJQPBUVPe1VV9P4Yf4Gpc4qRm7Ig=; b=PNBPxRYCuk9NYgn/60rFie0hugrkyrXCNdaFh/6BP9R9GvdGrI7UTe2kpTSVRTBPp2 XcouLx0/jSxip0f0et0DhS6bfR4FNO591F6caAgcXD60MLXxHxkVuYT356/ecO0wG172 zPY6cTMaD8vV9wWa8/MoK4JQysVChN4li0+pBf4VrMtsttjdbOycT1iQ+RtBfm6Ugdgy OxwhjgPLL+4E8hNT1YLenQtG8jKkSCkIU81BAn5xZpXcD3ld1XLOO4QfKRH3B6u8p7pu 80znfT0w41F9mxyxOf1lXpjmjqHwrqtE+tqLV1VMkF30aAOonX8XKGNXdSNEYFes9RTn mSig== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k5si9804216pgo.673.2018.04.24.08.14.10; Tue, 24 Apr 2018 08:14:28 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750997AbeDXPNF (ORCPT + 99 others); Tue, 24 Apr 2018 11:13:05 -0400 Received: from usa-sjc-mx-foss1.foss.arm.com ([217.140.101.70]:55032 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750756AbeDXPNE (ORCPT ); Tue, 24 Apr 2018 11:13:04 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 2715180D; Tue, 24 Apr 2018 08:13:04 -0700 (PDT) Received: from dupont (usa-sjc-mx-foss1.foss.arm.com [217.140.101.70]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 69CFE3F25D; Tue, 24 Apr 2018 08:13:03 -0700 (PDT) Date: Tue, 24 Apr 2018 10:13:02 -0500 From: Kim Phillips To: Ard Biesheuvel Cc: Catalin Marinas , linux-arm-kernel@lists.infradead.org, Namhyung Kim , Will Deacon , Arnaldo Carvalho de Melo , Jiri Olsa , Ingo Molnar , Peter Zijlstra , Jiri Olsa , LKML , kernel-team@lge.com, Michal Marek Subject: [PATCH] arm64/kernel: rename module_emit_adrp_veneer->module_emit_veneer_for_adrp Message-Id: <20180424101302.922f38032a32ee2034ccfc05@arm.com> In-Reply-To: References: <20180416042240.21528-1-namhyung@kernel.org> <20180416092345.GA23274@krava> <20180416135125.GA23802@kernel.org> <20180416110730.1dd12801e43be66ea5d0cc48@arm.com> <20180416165800.GD3202@kernel.org> <20180416122407.0d90863b69fed80166384850@arm.com> <20180416174811.1aca9106364effe435f363c8@arm.com> <20180417022726.GA31947@sejong> <20180418193759.b63912fe5e5b8a9023ec80a8@arm.com> <20180419025424.GC13370@sejong> <20180419183313.db3e3a105191a7f30b7650b2@arm.com> <20180423164317.5a47f3dd9842d533413a1d4b@arm.com> <20180424075003.48ab0015efc0892832343546@arm.com> Organization: Arm X-Mailer: Sylpheed 3.5.1 (GTK+ 2.24.31; x86_64-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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_veneer_for_adrp, module_emit_veneer_for_adrp. Now the test passes. Fixes: a257e02579e ("arm64/kernel: don't ban ADRP to work around Cortex-A53 erratum #843419") Cc: Ard Biesheuvel Cc: Will Deacon Cc: Catalin Marinas Cc: Michal Marek Signed-off-by: Kim Phillips --- 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