DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] section mismatch warnings
@ 2014-10-06 18:42 Michael Hu (NSBU)
  2014-10-07 14:31 ` Sergio Gonzalez Monroy
  2014-10-07 16:46 ` Neil Horman
  0 siblings, 2 replies; 4+ messages in thread
From: Michael Hu (NSBU) @ 2014-10-06 18:42 UTC (permalink / raw)
  To: dev

Hi Everyone,

When we enable kernel config CONFIG_DEBUG_SECTION_MISMATCH=y 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.



== Build lib/librte_eal/linuxapp/kni
cut: /proc/version_signature: No such file or directory
  LD      /git/Pktgen-DPDK/dpdk/build/build/lib/librte_eal/linuxapp/igb_uio/built-in.o
  CC [M]  /git/Pktgen-DPDK/dpdk/build/build/lib/librte_eal/linuxapp/igb_uio/igb_uio.o
  Building modules, stage 2.
  MODPOST 1 modules
WARNING: /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()

WARNING: /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()

WARNING: /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()

WARNING: /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()

  CC      /git/Pktgen-DPDK/dpdk/build/build/lib/librte_eal/linuxapp/igb_uio/igb_uio.mod.o
  LD [M]  /git/Pktgen-DPDK/dpdk/build/build/lib/librte_eal/linuxapp/igb_uio/igb_uio.ko
INSTALL-MODULE igb_uio.ko

  LD      /git/Pktgen-DPDK/dpdk/build/build/lib/librte_eal/linuxapp/kni/built-in.o
  CC [M]  /git/Pktgen-DPDK/dpdk/build/build/lib/librte_eal/linuxapp/kni/ixgbe_main.o
  CC [M]  /git/Pktgen-DPDK/dpdk/build/build/lib/librte_eal/linuxapp/kni/ixgbe_api.o
  CC [M]  /git/Pktgen-DPDK/dpdk/build/build/lib/librte_eal/linuxapp/kni/ixgbe_common.o
  CC [M]  /git/Pktgen-DPDK/dpdk/build/build/lib/librte_eal/linuxapp/kni/ixgbe_ethtool.o
  CC [M]  /git/Pktgen-DPDK/dpdk/build/build/lib/librte_eal/linuxapp/kni/ixgbe_82599.o
  CC [M]  /git/Pktgen-DPDK/dpdk/build/build/lib/librte_eal/linuxapp/kni/ixgbe_82598.o
  CC [M]  /git/Pktgen-DPDK/dpdk/build/build/lib/librte_eal/linuxapp/kni/ixgbe_x540.o
  CC [M]  /git/Pktgen-DPDK/dpdk/build/build/lib/librte_eal/linuxapp/kni/ixgbe_phy.o
  CC [M]  /git/Pktgen-DPDK/dpdk/build/build/lib/librte_eal/linuxapp/kni/kcompat.o
  CC [M]  /git/Pktgen-DPDK/dpdk/build/build/lib/librte_eal/linuxapp/kni/e1000_82575.o
  CC [M]  /git/Pktgen-DPDK/dpdk/build/build/lib/librte_eal/linuxapp/kni/e1000_i210.o
  CC [M]  /git/Pktgen-DPDK/dpdk/build/build/lib/librte_eal/linuxapp/kni/e1000_api.o
  CC [M]  /git/Pktgen-DPDK/dpdk/build/build/lib/librte_eal/linuxapp/kni/e1000_mac.o
  CC [M]  /git/Pktgen-DPDK/dpdk/build/build/lib/librte_eal/linuxapp/kni/e1000_manage.o
  CC [M]  /git/Pktgen-DPDK/dpdk/build/build/lib/librte_eal/linuxapp/kni/e1000_mbx.o
  CC [M]  /git/Pktgen-DPDK/dpdk/build/build/lib/librte_eal/linuxapp/kni/e1000_nvm.o
  CC [M]  /git/Pktgen-DPDK/dpdk/build/build/lib/librte_eal/linuxapp/kni/e1000_phy.o
  CC [M]  /git/Pktgen-DPDK/dpdk/build/build/lib/librte_eal/linuxapp/kni/igb_ethtool.o
  CC [M]  /git/Pktgen-DPDK/dpdk/build/build/lib/librte_eal/linuxapp/kni/igb_hwmon.o
  CC [M]  /git/Pktgen-DPDK/dpdk/build/build/lib/librte_eal/linuxapp/kni/igb_main.o
  CC [M]  /git/Pktgen-DPDK/dpdk/build/build/lib/librte_eal/linuxapp/kni/igb_debugfs.o
  CC [M]  /git/Pktgen-DPDK/dpdk/build/build/lib/librte_eal/linuxapp/kni/igb_param.o
  CC [M]  /git/Pktgen-DPDK/dpdk/build/build/lib/librte_eal/linuxapp/kni/igb_procfs.o
  CC [M]  /git/Pktgen-DPDK/dpdk/build/build/lib/librte_eal/linuxapp/kni/igb_vmdq.o
  CC [M]  /git/Pktgen-DPDK/dpdk/build/build/lib/librte_eal/linuxapp/kni/kni_misc.o
  CC [M]  /git/Pktgen-DPDK/dpdk/build/build/lib/librte_eal/linuxapp/kni/kni_net.o
  CC [M]  /git/Pktgen-DPDK/dpdk/build/build/lib/librte_eal/linuxapp/kni/kni_ethtool.o
  LD [M]  /git/Pktgen-DPDK/dpdk/build/build/lib/librte_eal/linuxapp/kni/rte_kni.o
WARNING: /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()

WARNING: /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()

WARNING: /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()

WARNING: /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()

WARNING: /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()

Thanks,
Michael

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [dpdk-dev] section mismatch warnings
  2014-10-06 18:42 [dpdk-dev] section mismatch warnings Michael Hu (NSBU)
@ 2014-10-07 14:31 ` Sergio Gonzalez Monroy
  2014-10-07 16:46 ` Neil Horman
  1 sibling, 0 replies; 4+ messages in thread
From: Sergio Gonzalez Monroy @ 2014-10-07 14:31 UTC (permalink / raw)
  To: Michael Hu (NSBU); +Cc: dev

On Mon, Oct 06, 2014 at 06:42:04PM +0000, Michael Hu (NSBU) wrote:
> Hi Everyone,
> 
> When we enable kernel config CONFIG_DEBUG_SECTION_MISMATCH=y 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.
> 
> 
> 
> == Build lib/librte_eal/linuxapp/kni
> cut: /proc/version_signature: No such file or directory
>   LD      /git/Pktgen-DPDK/dpdk/build/build/lib/librte_eal/linuxapp/igb_uio/built-in.o
>   CC [M]  /git/Pktgen-DPDK/dpdk/build/build/lib/librte_eal/linuxapp/igb_uio/igb_uio.o
>   Building modules, stage 2.
>   MODPOST 1 modules
> WARNING: /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()
> 
> WARNING: /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()
> 
> WARNING: /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()
> 
> WARNING: /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()
> 
>   CC      /git/Pktgen-DPDK/dpdk/build/build/lib/librte_eal/linuxapp/igb_uio/igb_uio.mod.o
>   LD [M]  /git/Pktgen-DPDK/dpdk/build/build/lib/librte_eal/linuxapp/igb_uio/igb_uio.ko
> INSTALL-MODULE igb_uio.ko
> 
>   LD      /git/Pktgen-DPDK/dpdk/build/build/lib/librte_eal/linuxapp/kni/built-in.o
>   CC [M]  /git/Pktgen-DPDK/dpdk/build/build/lib/librte_eal/linuxapp/kni/ixgbe_main.o
>   CC [M]  /git/Pktgen-DPDK/dpdk/build/build/lib/librte_eal/linuxapp/kni/ixgbe_api.o
>   CC [M]  /git/Pktgen-DPDK/dpdk/build/build/lib/librte_eal/linuxapp/kni/ixgbe_common.o
>   CC [M]  /git/Pktgen-DPDK/dpdk/build/build/lib/librte_eal/linuxapp/kni/ixgbe_ethtool.o
>   CC [M]  /git/Pktgen-DPDK/dpdk/build/build/lib/librte_eal/linuxapp/kni/ixgbe_82599.o
>   CC [M]  /git/Pktgen-DPDK/dpdk/build/build/lib/librte_eal/linuxapp/kni/ixgbe_82598.o
>   CC [M]  /git/Pktgen-DPDK/dpdk/build/build/lib/librte_eal/linuxapp/kni/ixgbe_x540.o
>   CC [M]  /git/Pktgen-DPDK/dpdk/build/build/lib/librte_eal/linuxapp/kni/ixgbe_phy.o
>   CC [M]  /git/Pktgen-DPDK/dpdk/build/build/lib/librte_eal/linuxapp/kni/kcompat.o
>   CC [M]  /git/Pktgen-DPDK/dpdk/build/build/lib/librte_eal/linuxapp/kni/e1000_82575.o
>   CC [M]  /git/Pktgen-DPDK/dpdk/build/build/lib/librte_eal/linuxapp/kni/e1000_i210.o
>   CC [M]  /git/Pktgen-DPDK/dpdk/build/build/lib/librte_eal/linuxapp/kni/e1000_api.o
>   CC [M]  /git/Pktgen-DPDK/dpdk/build/build/lib/librte_eal/linuxapp/kni/e1000_mac.o
>   CC [M]  /git/Pktgen-DPDK/dpdk/build/build/lib/librte_eal/linuxapp/kni/e1000_manage.o
>   CC [M]  /git/Pktgen-DPDK/dpdk/build/build/lib/librte_eal/linuxapp/kni/e1000_mbx.o
>   CC [M]  /git/Pktgen-DPDK/dpdk/build/build/lib/librte_eal/linuxapp/kni/e1000_nvm.o
>   CC [M]  /git/Pktgen-DPDK/dpdk/build/build/lib/librte_eal/linuxapp/kni/e1000_phy.o
>   CC [M]  /git/Pktgen-DPDK/dpdk/build/build/lib/librte_eal/linuxapp/kni/igb_ethtool.o
>   CC [M]  /git/Pktgen-DPDK/dpdk/build/build/lib/librte_eal/linuxapp/kni/igb_hwmon.o
>   CC [M]  /git/Pktgen-DPDK/dpdk/build/build/lib/librte_eal/linuxapp/kni/igb_main.o
>   CC [M]  /git/Pktgen-DPDK/dpdk/build/build/lib/librte_eal/linuxapp/kni/igb_debugfs.o
>   CC [M]  /git/Pktgen-DPDK/dpdk/build/build/lib/librte_eal/linuxapp/kni/igb_param.o
>   CC [M]  /git/Pktgen-DPDK/dpdk/build/build/lib/librte_eal/linuxapp/kni/igb_procfs.o
>   CC [M]  /git/Pktgen-DPDK/dpdk/build/build/lib/librte_eal/linuxapp/kni/igb_vmdq.o
>   CC [M]  /git/Pktgen-DPDK/dpdk/build/build/lib/librte_eal/linuxapp/kni/kni_misc.o
>   CC [M]  /git/Pktgen-DPDK/dpdk/build/build/lib/librte_eal/linuxapp/kni/kni_net.o
>   CC [M]  /git/Pktgen-DPDK/dpdk/build/build/lib/librte_eal/linuxapp/kni/kni_ethtool.o
>   LD [M]  /git/Pktgen-DPDK/dpdk/build/build/lib/librte_eal/linuxapp/kni/rte_kni.o
> WARNING: /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()
> 
> WARNING: /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()
> 
> WARNING: /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()
> 
> WARNING: /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()
> 
> WARNING: /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()
> 
> Thanks,
> Michael
> 
> 

Hi Michael,

I have been trying to reproduce those warnings without success (kernel 3.14.17,
DPDK 1.7.0 and gcc 4.8.3).

Regardless, if my understanding of section mismatches is correct, they should be no
warnings when referencing to functions in .text section, as it is not a discardable
section.

Have you tried to reproduce those warnings with different setup?

Thanks,
Sergio

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [dpdk-dev] section mismatch warnings
  2014-10-06 18:42 [dpdk-dev] section mismatch warnings Michael Hu (NSBU)
  2014-10-07 14:31 ` Sergio Gonzalez Monroy
@ 2014-10-07 16:46 ` Neil Horman
  2014-10-08 21:34   ` Michael Hu (NSBU)
  1 sibling, 1 reply; 4+ messages in thread
From: Neil Horman @ 2014-10-07 16:46 UTC (permalink / raw)
  To: Michael Hu (NSBU); +Cc: dev

On Mon, Oct 06, 2014 at 06:42:04PM +0000, Michael Hu (NSBU) wrote:
> Hi Everyone,
> 
> When we enable kernel config CONFIG_DEBUG_SECTION_MISMATCH=y 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.
> 
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

> 
> 
> == Build lib/librte_eal/linuxapp/kni
> cut: /proc/version_signature: No such file or directory
>   LD      /git/Pktgen-DPDK/dpdk/build/build/lib/librte_eal/linuxapp/igb_uio/built-in.o
>   CC [M]  /git/Pktgen-DPDK/dpdk/build/build/lib/librte_eal/linuxapp/igb_uio/igb_uio.o
>   Building modules, stage 2.
>   MODPOST 1 modules
> WARNING: /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()
> 
> WARNING: /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()
> 
> WARNING: /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()
> 
> WARNING: /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()
> 
>   CC      /git/Pktgen-DPDK/dpdk/build/build/lib/librte_eal/linuxapp/igb_uio/igb_uio.mod.o
>   LD [M]  /git/Pktgen-DPDK/dpdk/build/build/lib/librte_eal/linuxapp/igb_uio/igb_uio.ko
> INSTALL-MODULE igb_uio.ko
> 
>   LD      /git/Pktgen-DPDK/dpdk/build/build/lib/librte_eal/linuxapp/kni/built-in.o
>   CC [M]  /git/Pktgen-DPDK/dpdk/build/build/lib/librte_eal/linuxapp/kni/ixgbe_main.o
>   CC [M]  /git/Pktgen-DPDK/dpdk/build/build/lib/librte_eal/linuxapp/kni/ixgbe_api.o
>   CC [M]  /git/Pktgen-DPDK/dpdk/build/build/lib/librte_eal/linuxapp/kni/ixgbe_common.o
>   CC [M]  /git/Pktgen-DPDK/dpdk/build/build/lib/librte_eal/linuxapp/kni/ixgbe_ethtool.o
>   CC [M]  /git/Pktgen-DPDK/dpdk/build/build/lib/librte_eal/linuxapp/kni/ixgbe_82599.o
>   CC [M]  /git/Pktgen-DPDK/dpdk/build/build/lib/librte_eal/linuxapp/kni/ixgbe_82598.o
>   CC [M]  /git/Pktgen-DPDK/dpdk/build/build/lib/librte_eal/linuxapp/kni/ixgbe_x540.o
>   CC [M]  /git/Pktgen-DPDK/dpdk/build/build/lib/librte_eal/linuxapp/kni/ixgbe_phy.o
>   CC [M]  /git/Pktgen-DPDK/dpdk/build/build/lib/librte_eal/linuxapp/kni/kcompat.o
>   CC [M]  /git/Pktgen-DPDK/dpdk/build/build/lib/librte_eal/linuxapp/kni/e1000_82575.o
>   CC [M]  /git/Pktgen-DPDK/dpdk/build/build/lib/librte_eal/linuxapp/kni/e1000_i210.o
>   CC [M]  /git/Pktgen-DPDK/dpdk/build/build/lib/librte_eal/linuxapp/kni/e1000_api.o
>   CC [M]  /git/Pktgen-DPDK/dpdk/build/build/lib/librte_eal/linuxapp/kni/e1000_mac.o
>   CC [M]  /git/Pktgen-DPDK/dpdk/build/build/lib/librte_eal/linuxapp/kni/e1000_manage.o
>   CC [M]  /git/Pktgen-DPDK/dpdk/build/build/lib/librte_eal/linuxapp/kni/e1000_mbx.o
>   CC [M]  /git/Pktgen-DPDK/dpdk/build/build/lib/librte_eal/linuxapp/kni/e1000_nvm.o
>   CC [M]  /git/Pktgen-DPDK/dpdk/build/build/lib/librte_eal/linuxapp/kni/e1000_phy.o
>   CC [M]  /git/Pktgen-DPDK/dpdk/build/build/lib/librte_eal/linuxapp/kni/igb_ethtool.o
>   CC [M]  /git/Pktgen-DPDK/dpdk/build/build/lib/librte_eal/linuxapp/kni/igb_hwmon.o
>   CC [M]  /git/Pktgen-DPDK/dpdk/build/build/lib/librte_eal/linuxapp/kni/igb_main.o
>   CC [M]  /git/Pktgen-DPDK/dpdk/build/build/lib/librte_eal/linuxapp/kni/igb_debugfs.o
>   CC [M]  /git/Pktgen-DPDK/dpdk/build/build/lib/librte_eal/linuxapp/kni/igb_param.o
>   CC [M]  /git/Pktgen-DPDK/dpdk/build/build/lib/librte_eal/linuxapp/kni/igb_procfs.o
>   CC [M]  /git/Pktgen-DPDK/dpdk/build/build/lib/librte_eal/linuxapp/kni/igb_vmdq.o
>   CC [M]  /git/Pktgen-DPDK/dpdk/build/build/lib/librte_eal/linuxapp/kni/kni_misc.o
>   CC [M]  /git/Pktgen-DPDK/dpdk/build/build/lib/librte_eal/linuxapp/kni/kni_net.o
>   CC [M]  /git/Pktgen-DPDK/dpdk/build/build/lib/librte_eal/linuxapp/kni/kni_ethtool.o
>   LD [M]  /git/Pktgen-DPDK/dpdk/build/build/lib/librte_eal/linuxapp/kni/rte_kni.o
> WARNING: /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()
> 
> WARNING: /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()
> 
> WARNING: /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()
> 
> WARNING: /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()
> 
> WARNING: /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()
> 
> Thanks,
> Michael
> 
> 
> 

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [dpdk-dev] section mismatch warnings
  2014-10-07 16:46 ` Neil Horman
@ 2014-10-08 21:34   ` Michael Hu (NSBU)
  0 siblings, 0 replies; 4+ messages in thread
From: Michael Hu (NSBU) @ 2014-10-08 21:34 UTC (permalink / raw)
  To: Neil Horman ,, Sergio Gonzalez Monroy; +Cc: dev

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 






On 10/7/14 9:46 AM, "Neil Horman" <nhorman@tuxdriver.com> wrote:

>On Mon, Oct 06, 2014 at 06:42:04PM +0000, Michael Hu (NSBU) wrote:
>> Hi Everyone,
>> 
>> When we enable kernel config CONFIG_DEBUG_SECTION_MISMATCH=y 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.
>> 
>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
>
>> 
>> 
>> == Build lib/librte_eal/linuxapp/kni
>> cut: /proc/version_signature: No such file or directory
>>   LD      
>>/git/Pktgen-DPDK/dpdk/build/build/lib/librte_eal/linuxapp/igb_uio/built-i
>>n.o
>>   CC [M]  
>>/git/Pktgen-DPDK/dpdk/build/build/lib/librte_eal/linuxapp/igb_uio/igb_uio
>>.o
>>   Building modules, stage 2.
>>   MODPOST 1 modules
>> WARNING: 
>>/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()
>> 
>> WARNING: 
>>/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()
>> 
>> WARNING: 
>>/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()
>> 
>> WARNING: 
>>/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()
>> 
>>   CC      
>>/git/Pktgen-DPDK/dpdk/build/build/lib/librte_eal/linuxapp/igb_uio/igb_uio
>>.mod.o
>>   LD [M]  
>>/git/Pktgen-DPDK/dpdk/build/build/lib/librte_eal/linuxapp/igb_uio/igb_uio
>>.ko
>> INSTALL-MODULE igb_uio.ko
>> 
>>   LD      
>>/git/Pktgen-DPDK/dpdk/build/build/lib/librte_eal/linuxapp/kni/built-in.o
>>   CC [M]  
>>/git/Pktgen-DPDK/dpdk/build/build/lib/librte_eal/linuxapp/kni/ixgbe_main.
>>o
>>   CC [M]  
>>/git/Pktgen-DPDK/dpdk/build/build/lib/librte_eal/linuxapp/kni/ixgbe_api.o
>>   CC [M]  
>>/git/Pktgen-DPDK/dpdk/build/build/lib/librte_eal/linuxapp/kni/ixgbe_commo
>>n.o
>>   CC [M]  
>>/git/Pktgen-DPDK/dpdk/build/build/lib/librte_eal/linuxapp/kni/ixgbe_ethto
>>ol.o
>>   CC [M]  
>>/git/Pktgen-DPDK/dpdk/build/build/lib/librte_eal/linuxapp/kni/ixgbe_82599
>>.o
>>   CC [M]  
>>/git/Pktgen-DPDK/dpdk/build/build/lib/librte_eal/linuxapp/kni/ixgbe_82598
>>.o
>>   CC [M]  
>>/git/Pktgen-DPDK/dpdk/build/build/lib/librte_eal/linuxapp/kni/ixgbe_x540.
>>o
>>   CC [M]  
>>/git/Pktgen-DPDK/dpdk/build/build/lib/librte_eal/linuxapp/kni/ixgbe_phy.o
>>   CC [M]  
>>/git/Pktgen-DPDK/dpdk/build/build/lib/librte_eal/linuxapp/kni/kcompat.o
>>   CC [M]  
>>/git/Pktgen-DPDK/dpdk/build/build/lib/librte_eal/linuxapp/kni/e1000_82575
>>.o
>>   CC [M]  
>>/git/Pktgen-DPDK/dpdk/build/build/lib/librte_eal/linuxapp/kni/e1000_i210.
>>o
>>   CC [M]  
>>/git/Pktgen-DPDK/dpdk/build/build/lib/librte_eal/linuxapp/kni/e1000_api.o
>>   CC [M]  
>>/git/Pktgen-DPDK/dpdk/build/build/lib/librte_eal/linuxapp/kni/e1000_mac.o
>>   CC [M]  
>>/git/Pktgen-DPDK/dpdk/build/build/lib/librte_eal/linuxapp/kni/e1000_manag
>>e.o
>>   CC [M]  
>>/git/Pktgen-DPDK/dpdk/build/build/lib/librte_eal/linuxapp/kni/e1000_mbx.o
>>   CC [M]  
>>/git/Pktgen-DPDK/dpdk/build/build/lib/librte_eal/linuxapp/kni/e1000_nvm.o
>>   CC [M]  
>>/git/Pktgen-DPDK/dpdk/build/build/lib/librte_eal/linuxapp/kni/e1000_phy.o
>>   CC [M]  
>>/git/Pktgen-DPDK/dpdk/build/build/lib/librte_eal/linuxapp/kni/igb_ethtool
>>.o
>>   CC [M]  
>>/git/Pktgen-DPDK/dpdk/build/build/lib/librte_eal/linuxapp/kni/igb_hwmon.o
>>   CC [M]  
>>/git/Pktgen-DPDK/dpdk/build/build/lib/librte_eal/linuxapp/kni/igb_main.o
>>   CC [M]  
>>/git/Pktgen-DPDK/dpdk/build/build/lib/librte_eal/linuxapp/kni/igb_debugfs
>>.o
>>   CC [M]  
>>/git/Pktgen-DPDK/dpdk/build/build/lib/librte_eal/linuxapp/kni/igb_param.o
>>   CC [M]  
>>/git/Pktgen-DPDK/dpdk/build/build/lib/librte_eal/linuxapp/kni/igb_procfs.
>>o
>>   CC [M]  
>>/git/Pktgen-DPDK/dpdk/build/build/lib/librte_eal/linuxapp/kni/igb_vmdq.o
>>   CC [M]  
>>/git/Pktgen-DPDK/dpdk/build/build/lib/librte_eal/linuxapp/kni/kni_misc.o
>>   CC [M]  
>>/git/Pktgen-DPDK/dpdk/build/build/lib/librte_eal/linuxapp/kni/kni_net.o
>>   CC [M]  
>>/git/Pktgen-DPDK/dpdk/build/build/lib/librte_eal/linuxapp/kni/kni_ethtool
>>.o
>>   LD [M]  
>>/git/Pktgen-DPDK/dpdk/build/build/lib/librte_eal/linuxapp/kni/rte_kni.o
>> WARNING: 
>>/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()
>> 
>> WARNING: 
>>/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()
>> 
>> WARNING: 
>>/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()
>> 
>> WARNING: 
>>/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()
>> 
>> WARNING: 
>>/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()
>> 
>> Thanks,
>> Michael
>> 
>> 
>> 

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2014-10-08 21:27 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-10-06 18:42 [dpdk-dev] section mismatch warnings Michael Hu (NSBU)
2014-10-07 14:31 ` Sergio Gonzalez Monroy
2014-10-07 16:46 ` Neil Horman
2014-10-08 21:34   ` Michael Hu (NSBU)

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).