[dpdk-dev] VFIO in setup.sh

Stephen Hemminger stephen at networkplumber.org
Mon Mar 30 22:37:42 CEST 2015


On Mon, 30 Mar 2015 13:35:07 -0700
Stephen Hemminger <stephen at networkplumber.org> wrote:

> This code around vfio in setup script looks incorrect, is anyone using it:
> 
> 1. Why set the execute bit, when you want read-write?
>    Looks like a bug (or worse a security hole).
> 	# make sure regular users can read /dev/vfio
> 	echo "chmod /dev/vfio"
> 	sudo chmod a+x /dev/vfio
> 
> 3. Why depend on location of vfio module in kernel tree?
>    modprobe does the right thing and finds it.
> 
> 	VFIO_PATH="kernel/drivers/vfio/pci/vfio-pci.ko"
> 
> 	echo "Loading VFIO module"
> 	/sbin/lsmod | grep -s vfio_pci > /dev/null
> 	if [ $? -ne 0 ] ; then
> 		if [ -f /lib/modules/$(uname -r)/$VFIO_PATH ] ; then
> 			sudo /sbin/modprobe vfio-pci
> 		fi
> 	fi
> 
> 

Never mind, it is fine. /dev/vfio is a directory and loading
the module creates the directory.


More information about the dev mailing list