From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752733AbeAES3M (ORCPT + 1 other); Fri, 5 Jan 2018 13:29:12 -0500 Received: from mga02.intel.com ([134.134.136.20]:7567 "EHLO mga02.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752314AbeAES3J (ORCPT ); Fri, 5 Jan 2018 13:29:09 -0500 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.46,319,1511856000"; d="scan'208";a="17072210" From: Andi Kleen To: dwmw@amazon.co.uk Cc: linux-kernel@vger.kernel.org, torvalds@linux-foundation.org, tim.c.chen@linux.intel.com, tglx@linutronix.de, Andi Kleen Subject: [PATCH] retpoline/modpost: Quieten MODVERSION retpoline build Date: Fri, 5 Jan 2018 10:28:59 -0800 Message-Id: <20180105182859.20458-1-andi@firstfloor.org> X-Mailer: git-send-email 2.14.3 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Return-Path: From: Andi Kleen The internal retpoline thunks used by the compiler contain a dot. They have to be exported, but modversions cannot handle them it because they don't have a prototype due to the C incompatible name (and it doesn't support asm("...")) This leads to lots of warnings from modpost with a retpoline build with MODVERSIONS enabled. The actual symbols load fine, they just don't get versioned. That's not a problem here because we don't expect them to change ever. Quieten the respective warning messages in modpost for any symbols containing a dot. Signed-off-by: Andi Kleen --- scripts/mod/modpost.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/scripts/mod/modpost.c b/scripts/mod/modpost.c index 6510536c06df..7a06d2032ecf 100644 --- a/scripts/mod/modpost.c +++ b/scripts/mod/modpost.c @@ -693,7 +693,9 @@ static void handle_modversions(struct module *mod, struct elf_info *info, #endif if (is_crc) { const char *e = is_vmlinux(mod->name) ?"":".ko"; - warn("EXPORT symbol \"%s\" [%s%s] version generation failed, symbol will not be versioned.\n", symname + strlen(CRC_PFX), mod->name, e); + const char *name = symname + strlen(CRC_PFX); + if (!strchr(name, '.')) + warn("EXPORT symbol \"%s\" [%s%s] version generation failed, symbol will not be versioned.\n", name, mod->name, e); } mod->unres = alloc_symbol(symname, ELF_ST_BIND(sym->st_info) == STB_WEAK, @@ -2220,7 +2222,7 @@ static int add_versions(struct buffer *b, struct module *mod) for (s = mod->unres; s; s = s->next) { if (!s->module) continue; - if (!s->crc_valid) { + if (!s->crc_valid && !strchr(s->name, '.')) { warn("\"%s\" [%s.ko] has no CRC!\n", s->name, mod->name); continue; -- 2.14.3