Re: [dpdk-dev] Running DPDK as an unprivileged user

2017-11-28 Thread Alejandro Lucero
On Tue, Nov 28, 2017 at 5:50 PM, Walker, Benjamin wrote: > On Tue, 2017-11-28 at 14:16 +, Alejandro Lucero wrote: > > > > > > On Mon, Nov 27, 2017 at 5:58 PM, Walker, Benjamin < > benjamin.wal...@intel.com> > > wrote: > > > On Sun, 2017-11-05 at 01:17 +0100, Thomas Monjalon wrote: > > > > Hi,

Re: [dpdk-dev] Running DPDK as an unprivileged user

2017-11-28 Thread Walker, Benjamin
On Tue, 2017-11-28 at 14:16 +, Alejandro Lucero wrote: > > > On Mon, Nov 27, 2017 at 5:58 PM, Walker, Benjamin > wrote: > > On Sun, 2017-11-05 at 01:17 +0100, Thomas Monjalon wrote: > > > Hi, restarting an old topic, > > > > > > 05/01/2017 16:52, Tan, Jianfeng: > > > > On 1/5/2017 5:34 AM, W

Re: [dpdk-dev] Running DPDK as an unprivileged user

2017-11-28 Thread Alejandro Lucero
On Mon, Nov 27, 2017 at 5:58 PM, Walker, Benjamin wrote: > On Sun, 2017-11-05 at 01:17 +0100, Thomas Monjalon wrote: > > Hi, restarting an old topic, > > > > 05/01/2017 16:52, Tan, Jianfeng: > > > On 1/5/2017 5:34 AM, Walker, Benjamin wrote: > > > > > > Note that this > > > > > > probably means t

Re: [dpdk-dev] Running DPDK as an unprivileged user

2017-11-27 Thread Walker, Benjamin
On Sun, 2017-11-05 at 01:17 +0100, Thomas Monjalon wrote: > Hi, restarting an old topic, > > 05/01/2017 16:52, Tan, Jianfeng: > > On 1/5/2017 5:34 AM, Walker, Benjamin wrote: > > > > > Note that this > > > > > probably means that using uio on recent kernels is subtly > > > > > broken and cannot be

Re: [dpdk-dev] Running DPDK as an unprivileged user

2017-11-04 Thread Thomas Monjalon
Hi, restarting an old topic, 05/01/2017 16:52, Tan, Jianfeng: > On 1/5/2017 5:34 AM, Walker, Benjamin wrote: > >>> Note that this > >>> probably means that using uio on recent kernels is subtly > >>> broken and cannot be supported going forward because there > >>> is no uio mechanism to pin the me

Re: [dpdk-dev] Running DPDK as an unprivileged user

2017-01-05 Thread Tan, Jianfeng
Hi Benjamin, On 1/5/2017 5:34 AM, Walker, Benjamin wrote: On Wed, 2017-01-04 at 19:39 +0800, Tan, Jianfeng wrote: Hi Benjamin, On 12/30/2016 4:41 AM, Walker, Benjamin wrote: DPDK today begins by allocating all of the required hugepages, then finds all of the physical addresses for those hug

Re: [dpdk-dev] Running DPDK as an unprivileged user

2017-01-05 Thread Tan, Jianfeng
Hi, On 1/5/2017 6:16 PM, Sergio Gonzalez Monroy wrote: On 05/01/2017 10:09, Sergio Gonzalez Monroy wrote: On 04/01/2017 21:34, Walker, Benjamin wrote: On Wed, 2017-01-04 at 19:39 +0800, Tan, Jianfeng wrote: Hi Benjamin, On 12/30/2016 4:41 AM, Walker, Benjamin wrote: DPDK today begins by a

Re: [dpdk-dev] Running DPDK as an unprivileged user

2017-01-05 Thread Sergio Gonzalez Monroy
On 05/01/2017 10:09, Sergio Gonzalez Monroy wrote: On 04/01/2017 21:34, Walker, Benjamin wrote: On Wed, 2017-01-04 at 19:39 +0800, Tan, Jianfeng wrote: Hi Benjamin, On 12/30/2016 4:41 AM, Walker, Benjamin wrote: DPDK today begins by allocating all of the required hugepages, then finds all of

Re: [dpdk-dev] Running DPDK as an unprivileged user

2017-01-05 Thread Sergio Gonzalez Monroy
On 04/01/2017 21:34, Walker, Benjamin wrote: On Wed, 2017-01-04 at 19:39 +0800, Tan, Jianfeng wrote: Hi Benjamin, On 12/30/2016 4:41 AM, Walker, Benjamin wrote: DPDK today begins by allocating all of the required hugepages, then finds all of the physical addresses for those hugepages using /p

Re: [dpdk-dev] Running DPDK as an unprivileged user

2017-01-04 Thread Walker, Benjamin
On Wed, 2017-01-04 at 11:11 +0100, Thomas Monjalon wrote: > 2017-01-03 22:50, Walker, Benjamin: > > 1) Physical addresses cannot be exposed to unprivileged users due to > > security > > concerns (the fallout of rowhammer). Therefore, systems without an IOMMU can > > only support privileged users. I

Re: [dpdk-dev] Running DPDK as an unprivileged user

2017-01-04 Thread Walker, Benjamin
On Wed, 2017-01-04 at 19:39 +0800, Tan, Jianfeng wrote: > Hi Benjamin, > > > On 12/30/2016 4:41 AM, Walker, Benjamin wrote: > > DPDK today begins by allocating all of the required > > hugepages, then finds all of the physical addresses for > > those hugepages using /proc/self/pagemap, sorts the >

Re: [dpdk-dev] Running DPDK as an unprivileged user

2017-01-04 Thread Tan, Jianfeng
Hi Benjamin, On 12/30/2016 4:41 AM, Walker, Benjamin wrote: Hi all, I've been digging in to what it would take to run DPDK as an unprivileged user and I have some findings that I thought were worthy of discussion. The assumptions here are that I'm using a very recent Linux kernel (4.8.15 to be

Re: [dpdk-dev] Running DPDK as an unprivileged user

2017-01-04 Thread Thomas Monjalon
2017-01-03 22:50, Walker, Benjamin: > 1) Physical addresses cannot be exposed to unprivileged users due to security > concerns (the fallout of rowhammer). Therefore, systems without an IOMMU can > only support privileged users. I think this is probably fine. > 2) The IOCTL from vfio to pin the memo

Re: [dpdk-dev] Running DPDK as an unprivileged user

2017-01-03 Thread Walker, Benjamin
On Thu, 2016-12-29 at 17:14 -0800, Stephen Hemminger wrote: > If kernel broke pinning of hugepages, then it is an upstream kernel bug. The kernel, under a myriad of circumstances, will change the mapping of virtual to physical addresses for hugepages. This behavior began somewhere around kernel 3.

Re: [dpdk-dev] Running DPDK as an unprivileged user

2017-01-02 Thread Stephen Hemminger
On Mon, 02 Jan 2017 15:32:08 +0100 Thomas Monjalon wrote: > 2016-12-29 17:14, Stephen Hemminger: > > On Thu, 29 Dec 2016 20:41:21 + > > "Walker, Benjamin" wrote: > > > My second question is whether the user should be allowed to > > > mix uio and vfio usage simultaneously. For vfio, the > >

Re: [dpdk-dev] Running DPDK as an unprivileged user

2017-01-02 Thread Thomas Monjalon
2016-12-29 17:14, Stephen Hemminger: > On Thu, 29 Dec 2016 20:41:21 + > "Walker, Benjamin" wrote: > > My second question is whether the user should be allowed to > > mix uio and vfio usage simultaneously. For vfio, the > > physical addresses are really DMA addresses and are best > > when arbit

Re: [dpdk-dev] Running DPDK as an unprivileged user

2016-12-29 Thread Stephen Hemminger
On Thu, 29 Dec 2016 20:41:21 + "Walker, Benjamin" wrote: > The first open question I have is whether DPDK should allow > uio at all on recent (4.x) kernels. My current understanding > is that there is no way to pin memory and hugepages can now > be moved around, so uio would be unsafe. What d

[dpdk-dev] Running DPDK as an unprivileged user

2016-12-29 Thread Walker, Benjamin
Hi all, I've been digging in to what it would take to run DPDK as an unprivileged user and I have some findings that I thought were worthy of discussion. The assumptions here are that I'm using a very recent Linux kernel (4.8.15 to be specific) and I'm using vfio with my IOMMU enabled. I'm only in