[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20141007.120844.1942274261809860374.davem@davemloft.net>
Date: Tue, 07 Oct 2014 12:08:44 -0400 (EDT)
From: David Miller <davem@...emloft.net>
To: David.Laight@...LAB.COM
Cc: willemb@...gle.com, john.fastabend@...il.com, dborkman@...hat.com,
fw@...len.de, gerlitz.or@...il.com, hannes@...essinduktion.org,
netdev@...r.kernel.org, john.ronciak@...el.com, amirv@...lanox.com,
eric.dumazet@...il.com, danny.zhou@...el.com
Subject: Re: [net-next PATCH v1 1/3] net: sched: af_packet support for
direct ring access
From: David Laight <David.Laight@...LAB.COM>
Date: Tue, 7 Oct 2014 15:59:35 +0000
> From: David
>> From: David Laight <David.Laight@...LAB.COM>
>> Date: Tue, 7 Oct 2014 09:27:03 +0000
>>
>> > That is (probably) the only scheme that stops the application
>> > accessing random parts of physical memory.
>>
>> I don't know where this claim keeps coming from, it's false.
>>
>> The application has to attach memory to the ring, and then the
>> ring can only refer to that memory for the duration of the
>> session.
>>
>> There is no way that the user can program the address field of the
>> descriptors to point at arbitrary physical memory locations.
>>
>> There is protection and control.
>
> I got the impression that the application was directly writing the ring
> structure that the ethernet mac hardware uses to describe tx and rx buffers.
> (ie they are mapped read-write into userspace).
> Unless you have a system where you can limit the physical memory
> ranges accessible to the mac hardware, I don't see how you can stop
> the application putting rogue values into the ring.
>
> Clearly I'm missing something in my quick read of the change.
No, I think I misunderstood, and apparently the Mellanox driver allows
the user to crap into arbitrary physical memory too.
All of this garbage must get fixed and this feature is a non-starter
until there is control over the memory the rings can point ti.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists