Received: by 2002:a25:31c3:0:0:0:0:0 with SMTP id x186csp1390960ybx; Thu, 31 Oct 2019 09:54:48 -0700 (PDT) X-Google-Smtp-Source: APXvYqwa7PmAr7XF+ZUz8Pxd4r8UrzkcxYnDP0gtbMTosDqxvYbMtzAS7Us9DVIlLC2d/m0ewk8T X-Received: by 2002:a17:906:3ec8:: with SMTP id d8mr5232399ejj.40.1572540888671; Thu, 31 Oct 2019 09:54:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1572540888; cv=none; d=google.com; s=arc-20160816; b=MJeP+V6fG7u2VBZZ4HtxtNPgm+2HekEQKN9I/dAG2F2r3PMnBDYRfa+ljNXclRcjwJ knrEhB9YCrkPTVhvqxjuwlpC59tWOzp3DroZulCcVEpbpzOlGRp5iHh5FZgCJU7o+614 pGhAALDQWoDKqxFiXiv9DjUoKd5uYSGiyDxtFmpKSyUvkJEeSVBCS1hRW+95NCc8cENe 9hKlh/g7WB/8d1y4qMw8XF9qkMSrTpozLRUPWkPd1IS1knxP3YQO054bZ4jXp4T2i2eI N+wr7ketR+9JKSyHsyZU1LCUKsLcUao6gV6Ij0RyQVSmpaGdLgRtZiI3YEVEeAcTPH6n eYBQ== 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 :user-agent:message-id:in-reply-to:date:references:subject:cc:to :from:dkim-signature; bh=Eg9oWuOPqo1L+W4rD3h5PNuEgEsQhGB7UKbPvjWbL1s=; b=srdd9dgl+W8b6HYD3eqAHBlEqWSqvJP141kIqDq/Jrp6rJugRO0moVeez/OE8sfvr5 hxpWuYERu5yPPGTcVFAPSmFTnMxRXUftlEJxiFDH78RCcG4NEO0Ws6vN/BHf6n6IKD/o aoo9uULgeFvoAR3QZDGkpDtwPzSdb6MBtHEsVije1jm7APywd+W9MF3T3VAsM2Ekp5M7 wg7hiE/lq11xm2o7Ml80REgaIaKeR+YvKv7qAc1zBJS2q3sjc65PZd605Hgf1G0A3ZTI lx1jpKTNTVkASZ6IAxPHdBw4I4wrgpztvlV99+/I0Q+oKE6qL8WeWmj78uLOEwxHX3Zs U9/w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=P8+lQfeQ; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z33si4607452edb.183.2019.10.31.09.54.25; Thu, 31 Oct 2019 09:54:48 -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=@redhat.com header.s=mimecast20190719 header.b=P8+lQfeQ; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728657AbfJaQvy (ORCPT + 99 others); Thu, 31 Oct 2019 12:51:54 -0400 Received: from us-smtp-1.mimecast.com ([205.139.110.61]:24138 "EHLO us-smtp-delivery-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727715AbfJaQvy (ORCPT ); Thu, 31 Oct 2019 12:51:54 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1572540712; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Eg9oWuOPqo1L+W4rD3h5PNuEgEsQhGB7UKbPvjWbL1s=; b=P8+lQfeQ7cTDv/q1DrVF0wUF6/IfvVHW50Y5/VFOmJIEb2cotuHiAj4a7ui2btFO46Kxxp FOmss1EgPGaR8achhbIOrpQWVlj1H3zx4VA6koMchycJ7F96Z4PAcaZCmQ/kxK1ZnSGWIt k6RfhhwaaTTy2D6806CVlsG4d9dwd+Q= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-24-SFOVO5HhMI-DJYYvgzKgZA-1; Thu, 31 Oct 2019 12:51:49 -0400 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 5AD8D107ACC0; Thu, 31 Oct 2019 16:51:47 +0000 (UTC) Received: from segfault.boston.devel.redhat.com (segfault.boston.devel.redhat.com [10.19.60.26]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 3AC541001B07; Thu, 31 Oct 2019 16:51:46 +0000 (UTC) From: Jeff Moyer To: Masahiro Yamada Cc: linux-kbuild@vger.kernel.org, Sam Ravnborg , Michal Marek , linux-kernel@vger.kernel.org, dan.j.williams@intel.com, linux-nvdimm@lists.01.org Subject: Re: [PATCH 4/4] modpost: do not set ->preloaded for symbols from Module.symvers References: <20191003102915.28301-1-yamada.masahiro@socionext.com> <20191003102915.28301-4-yamada.masahiro@socionext.com> X-PGP-KeyID: 1F78E1B4 X-PGP-CertKey: F6FE 280D 8293 F72C 65FD 5A58 1FF8 A7CA 1F78 E1B4 Date: Thu, 31 Oct 2019 12:51:45 -0400 In-Reply-To: <20191003102915.28301-4-yamada.masahiro@socionext.com> (Masahiro Yamada's message of "Thu, 3 Oct 2019 19:29:15 +0900") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-MC-Unique: SFOVO5HhMI-DJYYvgzKgZA-1 X-Mimecast-Spam-Score: 0 Content-Type: text/plain; charset=WINDOWS-1252 Content-Transfer-Encoding: quoted-printable Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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=3Dtools/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 tw= ice. Previous export was in drivers/nvdimm/libnvdimm.ko WARNING: tools/testing/nvdimm/libnvdimm: 'devm_nvdimm_memremap' exported tw= ice. Previous export was in drivers/nvdimm/libnvdimm.ko WARNING: tools/testing/nvdimm/libnvdimm: 'nd_fletcher64' exported twice. Pr= evious export was in drivers/nvdimm/libnvdimm.ko WARNING: tools/testing/nvdimm/libnvdimm: 'to_nd_desc' exported twice. Previ= ous 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. :) 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 i= nt kernel) > =09=09s =3D sym_add_exported(symname, namespace, mod, > =09=09=09=09 export_no(export)); > =09=09s->kernel =3D kernel; > -=09=09s->preloaded =3D 1; > =09=09s->is_static =3D 0; > =09=09sym_update_crc(symname, mod, crc, export_no(export)); > =09}