From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp-outbound-1.vmware.com (smtp-outbound-1.vmware.com [208.91.2.12]) by dpdk.org (Postfix) with ESMTP id 51E9B7E71 for ; Wed, 8 Oct 2014 23:27:29 +0200 (CEST) Received: from sc9-mailhost2.vmware.com (sc9-mailhost2.vmware.com [10.113.161.72]) by smtp-outbound-1.vmware.com (Postfix) with ESMTP id 8B7B02BAEA; Wed, 8 Oct 2014 14:34:41 -0700 (PDT) Received: from EX13-CAS-002.vmware.com (EX13-CAS-002.vmware.com [10.113.191.52]) by sc9-mailhost2.vmware.com (Postfix) with ESMTP id 832C4900FD; Wed, 8 Oct 2014 14:34:41 -0700 (PDT) Received: from EX13-MBX-010.vmware.com (10.113.191.30) by EX13-MBX-013.vmware.com (10.113.191.33) with Microsoft SMTP Server (TLS) id 15.0.775.38; Wed, 8 Oct 2014 14:34:41 -0700 Received: from EX13-MBX-010.vmware.com ([fe80::c937:743c:749c:829b]) by EX13-MBX-010.vmware.com ([fe80::c937:743c:749c:829b%15]) with mapi id 15.00.0775.031; Wed, 8 Oct 2014 14:34:41 -0700 From: "Michael Hu (NSBU)" To: "Neil Horman ," , Sergio Gonzalez Monroy Thread-Topic: [dpdk-dev] section mismatch warnings Thread-Index: AQHP4ZU5oXzyT0BiDU6TEmgflMt5J5wlTrGAgAFtdwA= Date: Wed, 8 Oct 2014 21:34:40 +0000 Message-ID: References: <20141007164635.GC27719@hmsreliant.think-freely.org> In-Reply-To: <20141007164635.GC27719@hmsreliant.think-freely.org> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.113.160.246] Content-Type: text/plain; charset="us-ascii" Content-ID: <860A81B96A1E5241BE5CBC56323ADA41@pa-exch1.vmware.com> Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Cc: "dev@dpdk.org" Subject: Re: [dpdk-dev] section mismatch warnings X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Oct 2014 21:27:30 -0000 Thanks Neil and Sergio for your info. The mismatch warning did not show up with normal kernel but in the kernel with PAX grsecurity patches as PaX team enhanced writeable function pointer detection in patches out in this link. http://en.wikibooks.org/wiki/Grsecurity/Configuring_and_Installing_grsecuri ty#Compilation_Differences --- the extra section mismatches are due to my Pax changes, i explicitly added detection for writeable function pointers which are potential exploit targets, just to know how many of them there are. we've been eliminating some of them already but this work will never finish. as for what they are in general, a mismatch means an unwanted reference from one section to another. say, accessing init code or data from normal code/data is not good since init sections are freed up on boot, so any reference to them must not exist from permanent sections. --- To reproduce, you just need to patch any supported kernel with grsecurity patches then compile dpdk with it. https://grsecurity.net/download.php Thanks, Michael=20 On 10/7/14 9:46 AM, "Neil Horman" wrote: >On Mon, Oct 06, 2014 at 06:42:04PM +0000, Michael Hu (NSBU) wrote: >> Hi Everyone, >>=20 >> When we enable kernel config CONFIG_DEBUG_SECTION_MISMATCH=3Dy and >>compile DPDK 1.7 with 3.14.17 kernel + gcc 4.8.2, we got lots of >>warnings like these. >> Do we have plan to fix them? If so, please advise on which version. >>Thanks. >>=20 >Seems erroneous. These errors come from referencing symbols between >incompatible sections (e.g. A static function reading a variable that is >in an >__initdata section). But theres nothing like that going on in any of >these >symbols referenced below (and the kernel version shouldn't matter, as >this is >all dpdk internal). It could be old objects in your build from a DPDK >version >where the symbols were in different sections. Do a make clean; git clean >-f -d >Then reconfigure and rebuild. I expect your issue will go away. > >Neil > >>=20 >>=20 >> =3D=3D Build lib/librte_eal/linuxapp/kni >> cut: /proc/version_signature: No such file or directory >> LD =20 >>/git/Pktgen-DPDK/dpdk/build/build/lib/librte_eal/linuxapp/igb_uio/built-i >>n.o >> CC [M] =20 >>/git/Pktgen-DPDK/dpdk/build/build/lib/librte_eal/linuxapp/igb_uio/igb_uio >>.o >> Building modules, stage 2. >> MODPOST 1 modules >> WARNING:=20 >>/git/Pktgen-DPDK/dpdk/build/build/lib/librte_eal/linuxapp/igb_uio/igb_uio >>.o(.data+0x20): Section mismatch in reference from the variable >>igbuio_pci_driver to the function .text:igbuio_pci_probe() >>=20 >> WARNING:=20 >>/git/Pktgen-DPDK/dpdk/build/build/lib/librte_eal/linuxapp/igb_uio/igb_uio >>.o(.data+0x28): Section mismatch in reference from the variable >>igbuio_pci_driver to the function .text:igbuio_pci_remove() >>=20 >> WARNING:=20 >>/git/Pktgen-DPDK/dpdk/build/build/lib/librte_eal/linuxapp/igb_uio/igb_uio >>.o(.data+0x130): Section mismatch in reference from the variable >>dev_attr_max_vfs to the function .text:show_max_vfs() >>=20 >> WARNING:=20 >>/git/Pktgen-DPDK/dpdk/build/build/lib/librte_eal/linuxapp/igb_uio/igb_uio >>.o(.data+0x138): Section mismatch in reference from the variable >>dev_attr_max_vfs to the function .text:store_max_vfs() >>=20 >> CC =20 >>/git/Pktgen-DPDK/dpdk/build/build/lib/librte_eal/linuxapp/igb_uio/igb_uio >>.mod.o >> LD [M] =20 >>/git/Pktgen-DPDK/dpdk/build/build/lib/librte_eal/linuxapp/igb_uio/igb_uio >>.ko >> INSTALL-MODULE igb_uio.ko >>=20 >> LD =20 >>/git/Pktgen-DPDK/dpdk/build/build/lib/librte_eal/linuxapp/kni/built-in.o >> CC [M] =20 >>/git/Pktgen-DPDK/dpdk/build/build/lib/librte_eal/linuxapp/kni/ixgbe_main. >>o >> CC [M] =20 >>/git/Pktgen-DPDK/dpdk/build/build/lib/librte_eal/linuxapp/kni/ixgbe_api.o >> CC [M] =20 >>/git/Pktgen-DPDK/dpdk/build/build/lib/librte_eal/linuxapp/kni/ixgbe_commo >>n.o >> CC [M] =20 >>/git/Pktgen-DPDK/dpdk/build/build/lib/librte_eal/linuxapp/kni/ixgbe_ethto >>ol.o >> CC [M] =20 >>/git/Pktgen-DPDK/dpdk/build/build/lib/librte_eal/linuxapp/kni/ixgbe_82599 >>.o >> CC [M] =20 >>/git/Pktgen-DPDK/dpdk/build/build/lib/librte_eal/linuxapp/kni/ixgbe_82598 >>.o >> CC [M] =20 >>/git/Pktgen-DPDK/dpdk/build/build/lib/librte_eal/linuxapp/kni/ixgbe_x540. >>o >> CC [M] =20 >>/git/Pktgen-DPDK/dpdk/build/build/lib/librte_eal/linuxapp/kni/ixgbe_phy.o >> CC [M] =20 >>/git/Pktgen-DPDK/dpdk/build/build/lib/librte_eal/linuxapp/kni/kcompat.o >> CC [M] =20 >>/git/Pktgen-DPDK/dpdk/build/build/lib/librte_eal/linuxapp/kni/e1000_82575 >>.o >> CC [M] =20 >>/git/Pktgen-DPDK/dpdk/build/build/lib/librte_eal/linuxapp/kni/e1000_i210. >>o >> CC [M] =20 >>/git/Pktgen-DPDK/dpdk/build/build/lib/librte_eal/linuxapp/kni/e1000_api.o >> CC [M] =20 >>/git/Pktgen-DPDK/dpdk/build/build/lib/librte_eal/linuxapp/kni/e1000_mac.o >> CC [M] =20 >>/git/Pktgen-DPDK/dpdk/build/build/lib/librte_eal/linuxapp/kni/e1000_manag >>e.o >> CC [M] =20 >>/git/Pktgen-DPDK/dpdk/build/build/lib/librte_eal/linuxapp/kni/e1000_mbx.o >> CC [M] =20 >>/git/Pktgen-DPDK/dpdk/build/build/lib/librte_eal/linuxapp/kni/e1000_nvm.o >> CC [M] =20 >>/git/Pktgen-DPDK/dpdk/build/build/lib/librte_eal/linuxapp/kni/e1000_phy.o >> CC [M] =20 >>/git/Pktgen-DPDK/dpdk/build/build/lib/librte_eal/linuxapp/kni/igb_ethtool >>.o >> CC [M] =20 >>/git/Pktgen-DPDK/dpdk/build/build/lib/librte_eal/linuxapp/kni/igb_hwmon.o >> CC [M] =20 >>/git/Pktgen-DPDK/dpdk/build/build/lib/librte_eal/linuxapp/kni/igb_main.o >> CC [M] =20 >>/git/Pktgen-DPDK/dpdk/build/build/lib/librte_eal/linuxapp/kni/igb_debugfs >>.o >> CC [M] =20 >>/git/Pktgen-DPDK/dpdk/build/build/lib/librte_eal/linuxapp/kni/igb_param.o >> CC [M] =20 >>/git/Pktgen-DPDK/dpdk/build/build/lib/librte_eal/linuxapp/kni/igb_procfs. >>o >> CC [M] =20 >>/git/Pktgen-DPDK/dpdk/build/build/lib/librte_eal/linuxapp/kni/igb_vmdq.o >> CC [M] =20 >>/git/Pktgen-DPDK/dpdk/build/build/lib/librte_eal/linuxapp/kni/kni_misc.o >> CC [M] =20 >>/git/Pktgen-DPDK/dpdk/build/build/lib/librte_eal/linuxapp/kni/kni_net.o >> CC [M] =20 >>/git/Pktgen-DPDK/dpdk/build/build/lib/librte_eal/linuxapp/kni/kni_ethtool >>.o >> LD [M] =20 >>/git/Pktgen-DPDK/dpdk/build/build/lib/librte_eal/linuxapp/kni/rte_kni.o >> WARNING:=20 >>/git/Pktgen-DPDK/dpdk/build/build/lib/librte_eal/linuxapp/kni/rte_kni.o(. >>data+0x20): Section mismatch in reference from the variable >>ixgbe_ethtool_ops to the function .text:ixgbe_get_settings() >>=20 >> WARNING:=20 >>/git/Pktgen-DPDK/dpdk/build/build/lib/librte_eal/linuxapp/kni/rte_kni.o(. >>data+0x28): Section mismatch in reference from the variable >>ixgbe_ethtool_ops to the function .text:ixgbe_set_settings() >>=20 >> WARNING:=20 >>/git/Pktgen-DPDK/dpdk/build/build/lib/librte_eal/linuxapp/kni/rte_kni.o(. >>data+0x30): Section mismatch in reference from the variable >>ixgbe_ethtool_ops to the function .text:ixgbe_get_drvinfo() >>=20 >> WARNING:=20 >>/git/Pktgen-DPDK/dpdk/build/build/lib/librte_eal/linuxapp/kni/rte_kni.o(. >>data+0x38): Section mismatch in reference from the variable >>ixgbe_ethtool_ops to the function .text:ixgbe_get_regs_len() >>=20 >> WARNING:=20 >>/git/Pktgen-DPDK/dpdk/build/build/lib/librte_eal/linuxapp/kni/rte_kni.o(. >>data+0x40): Section mismatch in reference from the variable >>ixgbe_ethtool_ops to the function .text:ixgbe_get_regs() >>=20 >> Thanks, >> Michael >>=20 >>=20 >>=20