Received: by 2002:a25:31c3:0:0:0:0:0 with SMTP id x186csp199724ybx; Thu, 31 Oct 2019 18:40:08 -0700 (PDT) X-Google-Smtp-Source: APXvYqwb2aGOI9xnt4aHePfC/F4u+YGJdmbaW2zgCXrxogWGQdUScv/eZK5O9Nq/nZuy2xeJ5lAb X-Received: by 2002:a17:906:6a8e:: with SMTP id p14mr7362175ejr.137.1572572408777; Thu, 31 Oct 2019 18:40:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1572572408; cv=none; d=google.com; s=arc-20160816; b=v+yIOSAnOyo1hPdLBUfGE97MyXq6W/98XF1OjKNiiiNC/oTTrNdNn3ddw2vXikbLeg SGxLbUKIXLV4yNnGAmUu36LObcSvgA2H3+CaEPHh5QZARLO/oCKLn6CCRWvBtjVEKf+Q mgXLQzLI3XM/aQ/Nr1g++6d4+mQxfQ7l9xCGDo7O0t0mXEd5COamRjU5CuLok9qHF01G YuD/oVGqo1EsA5GKehDOe7uQkwlE1jYWrAmeunV9JqsyhVgph/05WmF/sp6isIeQlluL ngai2yFaUcqTxwCoiNXf30L7uW78VQRWvjaGHs1bZVc73tkxlVhAELeHiu6tD2D8J39w eUHg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature:dkim-filter; bh=gq2ntcwWwPmJbX6KujZPFJEqb9x4csC/Cehv9Nngo0w=; b=CkfAAQBSMvXqb2yKbDbYS7OdNIhyH/ZaNiBnP7jtKb/csMBtrt+N6pDqe5S432OC6B Xlf94dKTZxUzgRB9k8k7f0qJxY13/BFdyacXisdJqRgVhOY9lYtJUQTt5jjSdrml+sTL 7cC1kdP+lG6KgFDKMNuXOcSm3axnt91KJ4LB4abnenY0MgcloVZR2fRunvAkvc4g8fUU r7kMCeZEY+CI0lKj0RTfhiNJzpKpHXXt53wb8DNnxRlkz4NpRfRL6dDIaUjOWcWiw1Il GOFeuao5avJ29HcVSh24YSvdx61a4HSJzELabEcwY5TXBz0wa6Yi8zzC4V8BB7/lVIKs 5QFQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=Bzq9d8FJ; 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 f19si5438414eda.435.2019.10.31.18.39.45; Thu, 31 Oct 2019 18:40:08 -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; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=Bzq9d8FJ; 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 S1728550AbfKABN4 (ORCPT + 99 others); Thu, 31 Oct 2019 21:13:56 -0400 Received: from conssluserg-05.nifty.com ([210.131.2.90]:38495 "EHLO conssluserg-05.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726772AbfKABNz (ORCPT ); Thu, 31 Oct 2019 21:13:55 -0400 Received: from mail-ua1-f46.google.com (mail-ua1-f46.google.com [209.85.222.46]) (authenticated) by conssluserg-05.nifty.com with ESMTP id xA11DmlE031721; Fri, 1 Nov 2019 10:13:49 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conssluserg-05.nifty.com xA11DmlE031721 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1572570829; bh=gq2ntcwWwPmJbX6KujZPFJEqb9x4csC/Cehv9Nngo0w=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=Bzq9d8FJodYz9vCF76NW7o+SZ/rPK0s7Th0OZWmA6N+1dAxUQJNuK52yFbN90VdQI uwVbIzRLJbdSy8oE9Hggm7lFTAxl8PEX7a+E1OGUjan7Sy7ROOzI1vDX3KVe3jSGMT f+wAPPDA4utqcaXdKya1zM8aYI9OGyNgzU5V0WCRYHY8aAqZJhQ3PEPsHpjC47vWvz niGHFm3AdBGfgvV0a3DmfQZa6Frnz7RzwLCf15jU9f8TipjC7jHmlEaTEt/rQbdmPb jQDH8jWeRym1XSfBcEunMaj+4d0Maot3Ryespos1dGFoFgGaktyocly3JDDun6yaox ymNSbd+pGr8Zg== X-Nifty-SrcIP: [209.85.222.46] Received: by mail-ua1-f46.google.com with SMTP id q16so2492376uao.1; Thu, 31 Oct 2019 18:13:48 -0700 (PDT) X-Gm-Message-State: APjAAAVd55hJpo4yYl0wJyUS2xtNMJcD6WPFuvOzUBn7IqmTWw2ro95A +8l2IYjI3uauoIpVXjdSxViXMmBUDeKOkXR3ySI= X-Received: by 2002:ab0:279a:: with SMTP id t26mr779257uap.40.1572570827659; Thu, 31 Oct 2019 18:13:47 -0700 (PDT) MIME-Version: 1.0 References: <20191003102915.28301-1-yamada.masahiro@socionext.com> <20191003102915.28301-4-yamada.masahiro@socionext.com> In-Reply-To: From: Masahiro Yamada Date: Fri, 1 Nov 2019 10:13:10 +0900 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH 4/4] modpost: do not set ->preloaded for symbols from Module.symvers To: Jeff Moyer Cc: Linux Kbuild mailing list , Sam Ravnborg , Michal Marek , Linux Kernel Mailing List , Dan Williams , linux-nvdimm Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Nov 1, 2019 at 1:51 AM Jeff Moyer wrote: > > Masahiro Yamada writes: > > > Now that there is no overwrap between symbols from ELF files and > > ones from Module.symvers. > > > > So, the 'exported twice' warning should be reported irrespective > > of where the symbol in question came from. Only the exceptional case > > is when __crc_ symbol appears before __ksymtab_. This > > typically occurs for EXPORT_SYMBOL in .S files. > > Hi, Masahiro, > > After apply this patch, I get the following modpost warnings when doing: > > $ make M=tools/tesing/nvdimm > ... > Building modules, stage 2. > MODPOST 12 modules > WARNING: tools/testing/nvdimm/libnvdimm: 'nvdimm_bus_lock' exported twice. Previous export was in drivers/nvdimm/libnvdimm.ko > WARNING: tools/testing/nvdimm/libnvdimm: 'nvdimm_bus_unlock' exported twice. Previous export was in drivers/nvdimm/libnvdimm.ko > WARNING: tools/testing/nvdimm/libnvdimm: 'is_nvdimm_bus_locked' exported twice. Previous export was in drivers/nvdimm/libnvdimm.ko > WARNING: tools/testing/nvdimm/libnvdimm: 'devm_nvdimm_memremap' exported twice. Previous export was in drivers/nvdimm/libnvdimm.ko > WARNING: tools/testing/nvdimm/libnvdimm: 'nd_fletcher64' exported twice. Previous export was in drivers/nvdimm/libnvdimm.ko > WARNING: tools/testing/nvdimm/libnvdimm: 'to_nd_desc' exported twice. Previous export was in drivers/nvdimm/libnvdimm.ko > WARNING: tools/testing/nvdimm/libnvdimm: 'to_nvdimm_bus_dev' exported twice. Previous export was in drivers/nvdimm/libnvdimm.ko > ... > > There are a lot of these warnings. :) These warnings are correct since drivers/nvdimm/Makefile and tools/testing/nvdimm/Kbuild compile the same files. > If I revert this patch, no > complaints. > > Cheers, > Jeff > > > > > > Signed-off-by: Masahiro Yamada > > --- > > > > scripts/mod/modpost.c | 1 - > > 1 file changed, 1 deletion(-) > > > > diff --git a/scripts/mod/modpost.c b/scripts/mod/modpost.c > > index 5234555cf550..6ca38d10efc5 100644 > > --- a/scripts/mod/modpost.c > > +++ b/scripts/mod/modpost.c > > @@ -2457,7 +2457,6 @@ static void read_dump(const char *fname, unsigned int kernel) > > s = sym_add_exported(symname, namespace, mod, > > export_no(export)); > > s->kernel = kernel; > > - s->preloaded = 1; > > s->is_static = 0; > > sym_update_crc(symname, mod, crc, export_no(export)); > > } > -- Best Regards Masahiro Yamada