From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wi0-f172.google.com (mail-wi0-f172.google.com [209.85.212.172]) by dpdk.org (Postfix) with ESMTP id BDC8B6A87 for ; Tue, 6 Oct 2015 16:49:23 +0200 (CEST) Received: by wicgb1 with SMTP id gb1so169108618wic.1 for ; Tue, 06 Oct 2015 07:49:23 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:subject:to:references:cc:from:message-id:date :user-agent:mime-version:in-reply-to:content-type :content-transfer-encoding; bh=uQkSgUFCfDaWCNb9v4hI0vOQGFbMOY34JJDSWsyS5Aw=; b=arrx6+UjQnNwhxgYde9zPlQZD5ZbF3shMP2QqjYVfy/RbxmgRSb3Bw0jK02X1LizbK gcNQmiJ1lNx8Q26xHwQ1bqE19momtqtyx4J3oe9Qik7WSa6gL7gUcCGAfKbRViKg+F6B k0J9m7HlkHxj8gMXVGhY8G4HNNVrAQ+KZ/o6gMxnofGoPZ1f57X9luIYErL2RiSufN8p RE+D4E9jW8oDSflWmoqMlTM2w4nq8hcCTSdPkCi8PoRTx0j9UvpTixGfkcX7qb9ruLgk 55n/ljJSvoqGzKrvH3V7FZ2IzNffg0ddIURxpPkQN9+XajM51TIFI4LSpNTUq21VrmWG VmEg== X-Gm-Message-State: ALoCoQkevN78Tpk6FrlmH/0jy805xkgeSnkwZRb9j3gZaauBMsh7XJnfCo9OM4dWOkQhxjx+/U0n X-Received: by 10.195.11.165 with SMTP id ej5mr27761875wjd.117.1444142963581; Tue, 06 Oct 2015 07:49:23 -0700 (PDT) Received: from [10.0.0.171] ([37.142.229.250]) by smtp.googlemail.com with ESMTPSA id bh5sm33016740wjb.42.2015.10.06.07.49.22 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 06 Oct 2015 07:49:22 -0700 (PDT) To: "Michael S. Tsirkin" References: <1443652138-31782-1-git-send-email-stephen@networkplumber.org> <1443652138-31782-3-git-send-email-stephen@networkplumber.org> <20151001104505-mutt-send-email-mst@redhat.com> <20151005215455.GA7608@redhat.com> <20151006013000-mutt-send-email-mst@redhat.com> <561384EF.8020100@cloudius-systems.com> <20151006164259-mutt-send-email-mst@redhat.com> From: Vlad Zolotarov Message-ID: <5613DF71.7090207@cloudius-systems.com> Date: Tue, 6 Oct 2015 17:49:21 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.1.0 MIME-Version: 1.0 In-Reply-To: <20151006164259-mutt-send-email-mst@redhat.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Cc: dev@dpdk.org, hjk@hansjkoch.de, gregkh@linux-foundation.org, linux-kernel@vger.kernel.org Subject: Re: [dpdk-dev] [PATCH 2/2] uio: new driver to support PCI MSI-X 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: Tue, 06 Oct 2015 14:49:24 -0000 On 10/06/15 16:58, Michael S. Tsirkin wrote: > On Tue, Oct 06, 2015 at 11:23:11AM +0300, Vlad Zolotarov wrote: >> Michael, how this or any other related patch is related to the problem u r >> describing? >> The above ability is there for years and if memory serves me >> well it was u who wrote uio_pci_generic with this "security flaw". ;) > I answered all this already. > > This patch enables bus mastering, enables MSI or MSI-X This may be done from the user space right now without this patch... > , and requires > userspace to map the MSI-X table Hmmm... I must have missed this requirement. Could u, pls., clarify? From what I see, MSI/MSI-X table is configured completely in the kernel here... > and read/write the config space. > This means that a single userspace bug is enough to corrupt kernel > memory. Could u, pls., provide and example of this simple bug? Because it's absolutely not obvious... > > uio_pci_generic does not enable bus mastering or MSI, and > it might be a good idea to have uio_pci_generic block > access to MSI/MSI-X config. Since device bars may be mapped bypassing the UIO/uio_pci_generic - this won't solve any issue.