From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pd0-f179.google.com (mail-pd0-f179.google.com [209.85.192.179]) by dpdk.org (Postfix) with ESMTP id 5A6FC5A8E for ; Mon, 30 Mar 2015 22:37:39 +0200 (CEST) Received: by pdcp1 with SMTP id p1so95017279pdc.3 for ; Mon, 30 Mar 2015 13:37:37 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-type:content-transfer-encoding; bh=naKEoL2hIgIZhZe2MBwAwntSaGJIK7DEWEsZO7DSy+8=; b=O6cQp9TAg6AttrImiZzVPmZuEvAT9FJppmMk3yuJT2JKCGS7cFPoEnqOg2cHAQe8sO irUB9NGJ0tgA97t4eHIcHTMtQHQ0q+hdDZGU35+1T1zjS7tGNYT3mKe+uz2NidaZS+jJ zLeEvUGboCLX27nRlhfYV3fle0hG71BlaWe05YWtFooX3Jd7hnGqhEVbtD7b3KSu3Bvi uBYGjy/wmVjwqrDZcUYpMWQOWpfunuXfibyBPnuxuiGdF25stM5UUsvlb9fPtgKDq3rJ jOtnXCXE/UxBE1Tyog/KjeuxY139zKXacO7Dzrncc9ZsBxk78E40w6s5wodzRf+THPN/ EeBQ== X-Gm-Message-State: ALoCoQk+X7msI13O1mt1lhvQPgNyO1VvNihhX0dY1grkDG69nHi3DNaeu75KIKlkHvZmbKXWgs7y X-Received: by 10.70.100.39 with SMTP id ev7mr61841048pdb.29.1427747857721; Mon, 30 Mar 2015 13:37:37 -0700 (PDT) Received: from urahara (static-50-53-82-155.bvtn.or.frontiernet.net. [50.53.82.155]) by mx.google.com with ESMTPSA id my7sm11590935pbc.0.2015.03.30.13.37.37 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 30 Mar 2015 13:37:37 -0700 (PDT) Date: Mon, 30 Mar 2015 13:37:42 -0700 From: Stephen Hemminger To: Anatoly Burakov Message-ID: <20150330133742.57adef52@urahara> In-Reply-To: <20150330133507.77ff6b1d@urahara> References: <20150330133507.77ff6b1d@urahara> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: dev@dpdk.org Subject: Re: [dpdk-dev] VFIO in setup.sh 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: Mon, 30 Mar 2015 20:37:39 -0000 On Mon, 30 Mar 2015 13:35:07 -0700 Stephen Hemminger 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.