4

I use centos 7.3. When I run insmod igb_uio.ko, I get this error in /var/logs/message:

  • igb_uio: loading out-of-tree module taints kernel.
  • WARNING: module'igb_uio' built without retpoline-enable compiler, may affect Spectre v2 mitigation
  • igb_uio: module verification failed: signature and/or required key missing - tainting kernel.
  • igb_uio: disagrees about version of symol __uio_register_device
  • igb_uio: Unknown symbol __uio_register_device (err -22) ...

This happens after I did some patches to OS and kernel. After patch, the kernel version is: 3.10.0.957.21.3.e17.x86_64

Before patch, it works well. The patch is for some TCP critical vulnerability. I prefer to run the patch.

I use DPDK 17.08.1, I also tried 18.11.2. Both get same error.

I try to rebuild from source, after patch. The rebuild get errors: (before patch, build is successfully.):

  • make: *** /lib/modules/3.10.0-957.21.3.el7.x86_64/build: No such file or directory. Stop.
  • make[6]: *** [igb_uio.ko] Error 2
  • make[5]: *** [igb_uio] Error 2
  • make[4]: *** [linux] Error 2
  • make[3]: *** [kernel] > Error 2
  • make[2]: *** [all] Error 2
  • make[1]: *** [pre_install] Error 2
  • make: *** [install] Error 2
zigzag
  • 171
  • 2
  • 10

3 Answers3

2

To insert igb_uio module, you have to insert the uio module first. Then, inserting igb_uio will work correctly.

In any case, i would suggest using VFIO rather than igb_uio unless you specifically require igb_uio.

Also, if you're building custom kernels, you should add the relevant header/module paths, to ensure that building modules against this custom kernel works. (meaning, when the compiler does /usr/src/linux-headers-$(uname -r)/, the path must exist)

aburakov
  • 71
  • 3
  • when i use igb_uio, I did add: modprobe uio, insmod .../igb_uio.ko. For VFIO, I did a try, the file vfio-pci.ko is inside /lib/modules/$(uname -r)/kenel/drivers/vfio/pci folder. I called modprobe vfio-pci. From status, I can see: 0000:01:00.2 'Ethernet Controller X710 for 10GbE SFP+ 1572' if=ens11f2 drv=i40e unused=igb_uio,vfio-pci. Then I bind vfio-pci: ./bind.py --bind=vfio-pci 0000:01:00.2. It failed to bind. From /var/log/message, I get this error: Sep 19 17:38:48 r2 kernel: vfio-pci: probe of 0000:01:00.2 failed with error -22 – zigzag Sep 19 '19 at 10:42
  • If you get a -22 error when inserting VFIO module, you don't have virtualization enabled. – aburakov Sep 20 '19 at 11:27
1

You need to build your igb_uio module against the right kernel headers. If you patched/updated the kernel then you should do the same for the headers. If your headers are patched but you still get the errors then try compiling it like this:

RTE_KERNELDIR=/path/to/headers make -j
hero24
  • 139
  • 2
1

As I know,

This error derives from mismatch or deficiency of kernel-devel packets with the current kernel.

If the current kernel version is not consistent with kernel-devel, /lib/modules/$(uname -r)/ could not generated properly. In my case, the kernel that I working on is 4.13.12-1.el7.elrepo.x86_64, but kernel-devel packets belong to 3.10.0-1160.31.1.el7.x86_64 .

My solution is installing kernel-devel that consistent with the current kernel by

yum update
yum install "kernel-devel-uname-r == $(uname -r)"

If packets could not found, manual installation using rpm may be required. In my case, I wget kernel-ml-devel-4.14.13-1.el7.elrepo.x86_64.rpm packet and remove old kernel-devel by

yum remove kernel-headers-3.10.0-1160.31.1.el7.x86_64
yum remove kernel-devel-3.10.0-1160.31.1.el7.x86_64

and I install correct devel packets by

sudo rpm -i kernel-ml-devel-4.13.12-1.el7.elrepo.x86_64.rpm

Finally, dpdk compiles with no error in my case.

iamcc
  • 11
  • 1