From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.0 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id A7A27C2BA19 for ; Mon, 13 Apr 2020 08:40:39 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 7499B20732 for ; Mon, 13 Apr 2020 08:40:38 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="eCtLcSYl"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=kernel.org header.i=@kernel.org header.b="VjxlR7Le" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 7499B20732 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=+Fs2ee3oLqs/KHRtHuUAVLJvE2qEKoQWyM5KU3BvJss=; b=eCtLcSYltFLaC3 gBjt4UEmNA90wSTyV+uUbWexLUHK/h0QyKTa/F69QUAZGOUoCoB8KqsHSvdyuc7FyQkcdAfn9oo8g rjkzP8YwBjfVKZ1LysONxd0Yqc8V6sYoMIqlmUYbhNiO9CPAHup7Eiv+XQinfO6Dv/BN/dn+k1EQ/ yb/lMGIqKYWIPP0P0l9bqdqu1HLkTvKjgRKUpjS7o9QVTyozLXfap9eKpOKJUb5P0F+X192jU7Js6 s7eSZ2yCyQpVBqnHgvXSjarlliT1azyia2wmRPyPqvHLtK2bwWXbLjqZmsxA3dFsThkNwpEnxd0y3 rr0Ebs+RhqXcICMPddJw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jNudv-0002Xv-K3; Mon, 13 Apr 2020 08:40:35 +0000 Received: from mail.kernel.org ([198.145.29.99]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jNudr-0002XB-Qc; Mon, 13 Apr 2020 08:40:33 +0000 Received: from localhost (unknown [213.57.247.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 45242206E9; Mon, 13 Apr 2020 08:40:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1586767231; bh=lec+XLa+bZRy13OGfwXSfzBA273C7nl3khRkobB7PMo=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=VjxlR7LeuduygCW8N3O7d8WuwuxRBDc5jWaVykBTvmghy8pyNm+q6KygLOUUbgPu/ acACnfoqmgLIw2OqRBNn6GQ0NRrqLnH7NQvCCVw28dEaE9DtDPJuI6Xm/5Z9vexavL qfJ0DaAoxaW0KkjHuiLGRJUCtAzyM/frxuUheBLE= Date: Mon, 13 Apr 2020 11:40:26 +0300 From: Leon Romanovsky To: Borislav Petkov Subject: Re: [PATCH] net/3com/3c515: Fix MODULE_ARCH_VERMAGIC redefinition Message-ID: <20200413084026.GH334007@unreal> References: <20200413045555.GE334007@unreal> <20200412.220739.516022706077351913.davem@davemloft.net> <20200413052637.GG334007@unreal> <20200412.223604.1160930629964379276.davem@davemloft.net> <20200413080452.GA3772@zn.tnic> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20200413080452.GA3772@zn.tnic> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200413_014031_900721_F64EF71C X-CRM114-Status: GOOD ( 23.70 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: thor.thayer@linux.intel.com, heiko@sntech.de, irusskikh@marvell.com, andreas@gaisler.com, chris.snook@gmail.com, dave@thedillows.org, jes@trained-monkey.org, iyappan@os.amperecomputing.com, quan@os.amperecomputing.com, linux-acenic@sunsite.dk, andy@greyhouse.net, akiyano@amazon.com, linux-rockchip@lists.infradead.org, wens@csie.org, LinoSanfilippo@gmx.de, vfalico@gmail.com, kuba@kernel.org, thomas.lendacky@amd.com, jcliburn@gmail.com, j.vosburgh@gmail.com, keyur@os.amperecomputing.com, mripard@kernel.org, pcnet32@frontier.com, nios2-dev@lists.rocketboards.org, linux-arm-kernel@lists.infradead.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, ionut@badula.org, netanel@amazon.com, mark.einon@gmail.com, David Miller Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Mon, Apr 13, 2020 at 10:04:52AM +0200, Borislav Petkov wrote: > On Sun, Apr 12, 2020 at 10:36:04PM -0700, David Miller wrote: > > From: Leon Romanovsky > > Date: Mon, 13 Apr 2020 08:26:37 +0300 > > > > > How do you want us to handle it? Boris resend, me to send, you to fix? > > > > Anyone other than me can do it ;-) > > Ok, here's what I'm thinking: that vermagic.h is normally automatically > included in the *mod.c as part of the module creation, see add_header() > in modpost.c. > > So then perhaps drivers should not use it directly due to the current > inclusion order: > > linux/module.h includes asm/module.h and that arch-specific header > defines MODULE_VERMAGIC* for the respective arch. > > linux/vermagic.h defines all those fallbacks for those MODULE_VERMAGIC* > things and if the inclusion order is swapped - we get the redefinition > warning. > > Yesterday I tried the below - basically get rid of all the remaining > includers of linux/vermagic.h but two are left: > > drivers/net/ethernet/hisilicon/hns3/hns3_enet.c:18:#include > drivers/net/ethernet/netronome/nfp/nfp_main.c:17:#include > > because both use VERMAGIC_STRING directly. > > So, > > * one could either allow that and sort the inclusion order so that, for > example, asm/module.h includes linux/vermagic.h and thus the fallbacks > are there present. > > or > > * remove all uses of VERMAGIC_STRING from the drivers, add a header > guard which prevents people from using it directly and leave > VERMAGIC_STRING only to the internal module machinery in the kernel. > > Judging by how only a handful of old drivers are even using that, > perhaps not too far fetched. > > In any case, this needs a maintainer decision. > > Leon, if you wanna do it whatever you guys end up agreeing on, just go > ahead and submit the patches - it's not like I don't have anything else > on the TODO :-) Just add a Reported-by: me and that should be enough. I broke it so I should fix and will send a patch today/tomorrow. Thanks > > If you're busy too, lemme know and I'll put it on my todo then. > > Thx. > > diff --git a/drivers/net/bonding/bonding_priv.h b/drivers/net/bonding/bonding_priv.h > index 45b77bc8c7b3..48cdf3a49a7d 100644 > --- a/drivers/net/bonding/bonding_priv.h > +++ b/drivers/net/bonding/bonding_priv.h > @@ -14,7 +14,7 @@ > > #ifndef _BONDING_PRIV_H > #define _BONDING_PRIV_H > -#include > +#include > > #define DRV_NAME "bonding" > #define DRV_DESCRIPTION "Ethernet Channel Bonding Driver" > diff --git a/drivers/net/ethernet/3com/3c509.c b/drivers/net/ethernet/3com/3c509.c > index b762176a1406..139d0120f511 100644 > --- a/drivers/net/ethernet/3com/3c509.c > +++ b/drivers/net/ethernet/3com/3c509.c > @@ -85,7 +85,6 @@ > #include > #include > #include > -#include > > #include > #include > diff --git a/drivers/net/ethernet/3com/3c515.c b/drivers/net/ethernet/3com/3c515.c > index 90312fcd6319..47b4215bb93b 100644 > --- a/drivers/net/ethernet/3com/3c515.c > +++ b/drivers/net/ethernet/3com/3c515.c > @@ -22,7 +22,6 @@ > > */ > > -#include > #define DRV_NAME "3c515" > > #define CORKSCREW 1 > diff --git a/drivers/net/ethernet/adaptec/starfire.c b/drivers/net/ethernet/adaptec/starfire.c > index 2db42211329f..a64191fc2af9 100644 > --- a/drivers/net/ethernet/adaptec/starfire.c > +++ b/drivers/net/ethernet/adaptec/starfire.c > @@ -45,7 +45,6 @@ > #include /* Processor type for cache alignment. */ > #include > #include > -#include > > /* > * The current frame processor firmware fails to checksum a fragment > diff --git a/drivers/net/ethernet/pensando/ionic/ionic_main.c b/drivers/net/ethernet/pensando/ionic/ionic_main.c > index 588c62e9add7..3ed150512091 100644 > --- a/drivers/net/ethernet/pensando/ionic/ionic_main.c > +++ b/drivers/net/ethernet/pensando/ionic/ionic_main.c > @@ -6,7 +6,7 @@ > #include > #include > #include > -#include > +#include > > #include "ionic.h" > #include "ionic_bus.h" > diff --git a/drivers/power/supply/test_power.c b/drivers/power/supply/test_power.c > index 65c23ef6408d..b3c05ff05783 100644 > --- a/drivers/power/supply/test_power.c > +++ b/drivers/power/supply/test_power.c > @@ -16,7 +16,7 @@ > #include > #include > #include > -#include > +#include > > enum test_power_id { > TEST_AC, > diff --git a/net/ethtool/ioctl.c b/net/ethtool/ioctl.c > index 89d0b1827aaf..adab97e500cf 100644 > --- a/net/ethtool/ioctl.c > +++ b/net/ethtool/ioctl.c > @@ -17,7 +17,6 @@ > #include > #include > #include > -#include > #include > #include > #include > @@ -29,6 +28,8 @@ > #include > #include > > +#include > + > #include "common.h" > > /* > > > -- > Regards/Gruss, > Boris. > > https://people.kernel.org/tglx/notes-about-netiquette _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel