From: Stephen Hemminger <stephen-OTpzqLSitTUnbdJkjeBofR2eb7JE58TQ@public.gmane.org>
To: Anatoly Burakov
<anatoly.burakov-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
Cc: dev-VfR2kkLFssw@public.gmane.org
Subject: VFIO in setup.sh
Date: Mon, 30 Mar 2015 13:35:07 -0700 [thread overview]
Message-ID: <20150330133507.77ff6b1d@urahara> (raw)
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
next reply other threads:[~2015-03-30 20:35 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-30 20:35 Stephen Hemminger [this message]
2015-03-30 20:37 ` VFIO in setup.sh Stephen Hemminger
2015-03-31 9:05 ` Burakov, Anatoly
[not found] ` <C6ECDF3AB251BE4894318F4E4512369780C7A59F-kPTMFJFq+rHjxeytcECX8bfspsVTdybXVpNB7YpNyf8@public.gmane.org>
2015-03-31 9:26 ` Andre Richter
[not found] ` <CAKqeN2-vJpvjAL2gj=M=arkZmDz+1UmTbiSngixSkq2uCQQXgg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-03-31 9:35 ` Burakov, Anatoly
[not found] ` <C6ECDF3AB251BE4894318F4E4512369780C7B5BE-kPTMFJFq+rHjxeytcECX8bfspsVTdybXVpNB7YpNyf8@public.gmane.org>
2015-03-31 12:41 ` Andre Richter
[not found] ` <CAKqeN2_BwrH8YE0fzzuynN9DpdCxMBBG0zC3iAe8V7b6Q6a75Q-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-03-31 12:59 ` Burakov, Anatoly
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20150330133507.77ff6b1d@urahara \
--to=stephen-otpzqlsittunbdjkjebofr2eb7je58tq@public.gmane.org \
--cc=anatoly.burakov-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org \
--cc=dev-VfR2kkLFssw@public.gmane.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.