From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jason Gunthorpe Subject: Re: [PATCH 0/7] IB/hfi1: Remove write() and use ioctl() for user access Date: Tue, 19 Apr 2016 11:35:51 -0600 Message-ID: <20160419173551.GE20844@obsidianresearch.com> References: <20160415044124.GA16805@obsidianresearch.com> <1828884A29C6694DAF28B7E6B8A82373AB0422AE@ORSMSX109.amr.corp.intel.com> <20160415181811.GA22322@obsidianresearch.com> <1828884A29C6694DAF28B7E6B8A82373AB042530@ORSMSX109.amr.corp.intel.com> <20160415220340.GB24204@obsidianresearch.com> <20160416162203.GA6279@rhel> <20160418175559.GC13865@obsidianresearch.com> <20160418181535.GB7596@phlsvsds.ph.intel.com> <20160418182453.GA14930@obsidianresearch.com> <20160419013649.GA28612@phlsvsds.ph.intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Content-Disposition: inline In-Reply-To: <20160419013649.GA28612-W4f6Xiosr+yv7QzWx2u06xL4W9x8LtSr@public.gmane.org> Sender: linux-rdma-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: Dennis Dalessandro Cc: Ira Weiny , "Hefty, Sean" , "dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org" , "linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org" List-Id: linux-rdma@vger.kernel.org On Mon, Apr 18, 2016 at 09:36:49PM -0400, Dennis Dalessandro wrote: > On Mon, Apr 18, 2016 at 12:24:53PM -0600, Jason Gunthorpe wrote: > >On Mon, Apr 18, 2016 at 02:15:36PM -0400, Dennis Dalessandro wrote: > > > >>Point taken on eprom cdev. We should be able to simply drop the last two > >>patches of this series. > > > >I would like to hear more explanation about this snoop thing, and > >where it lives in the driver today. That also seems inappropriate. > > > > Fair enough. I will say the name "snoop" may not be the best and perhaps > adds to the confusion. > Basically it's a diagnostic interface that lets user space do things > without involving the rest of the kernel (verbs, MAD, etc). It can > bring the port up and down, set link credits, and get the status for > instance. So, none of this stuff shold be part of the char dev. The char dev needs to have the same security model as uverbs which means unprivileged access - conflating secure stuff with that interface is a bad idea. Run it over netlink (you may need to develop the IB cores' netlink support a bit more) or put it in debug fs. > Then there are the things it can do with packets. It can send packets > generated by user space. So we can craft all sorts of packets that would not > otherwise be able to be sent through verbs. It also captures packets and > supports basic filtering and hands them to user space before the packets > ever make it to the verbs layer. Depending on mode, packets may be dropped > or passed on to verbs. And this seems very common, other vendors have at least the capture side as out of tree stuff. It would be ideal to have a raw access as a core capability. Jason -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html