From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jason Gunthorpe Subject: Re: [PATCH V3 1/5] RDMA/core: Transport-independent access flags Date: Tue, 14 Jul 2015 15:14:00 -0600 Message-ID: <20150714211400.GA21502@obsidianresearch.com> References: <559FC710.1050307@talpey.com> <20150710161108.GA19042@obsidianresearch.com> <55A24571.60902@dev.mellanox.co.il> <00e201d0be6a$e49bc910$add35b30$@opengridcomputing.com> <20150714194512.GA25887@infradead.org> <00f901d0be6f$70c96b00$525c4100$@opengridcomputing.com> <20150714204145.GC26927@obsidianresearch.com> <010c01d0be76$dbb4c520$931e4f60$@opengridcomputing.com> <011001d0be78$32412ef0$96c38cd0$@opengridcomputing.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Content-Disposition: inline In-Reply-To: <011001d0be78$32412ef0$96c38cd0$@opengridcomputing.com> Sender: linux-nfs-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: Steve Wise Cc: 'Christoph Hellwig' , 'Sagi Grimberg' , 'Steve Wise' , 'Tom Talpey' , 'Doug Ledford' , sagig-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org, ogerlitz-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org, roid-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org, linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, eli-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org, target-devel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-nfs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, trond.myklebust-7I+n7zu2hftEKMMhf/gKZA@public.gmane.org, bfields-uC3wQj2KruNg9hUCZPvPmw@public.gmane.org, 'Oren Duer' List-Id: linux-rdma@vger.kernel.org On Tue, Jul 14, 2015 at 04:01:04PM -0500, Steve Wise wrote: > > Right, a local_dma_lkey is not an rkey, and iwarp requires the > > rkey for the read destination MR. Further that rkey needs > > REMOTE_WRITE. > > BTW: What use is an IB rkey with no REMOTE_ flags set? Can it be > used somehow differently than the associated lkey? Don't think so. Sagi? This looks like it is just an artifact of the sloppy API that treats a rkey MR and lkey MR as the same thing - they are clearly not, and we should start talking about APIs that return lkeys or rkeys, never both (and enforcing that lkey and rkey MRS have the right ACCESS flags). Having looked at this for a bit now, I am of the view that it is very hard to use a MR as both rkey and lkey without creating some kind of security problem. At least every place in current ULPs that does this is a security problem :) So the API should prevent it, IMHO. local_dma_lkey is an excellent step, and if Sagi's MR unification patch is careful to have a lkey/rkey API entry point for the two usages we can maybe nuke this problem for good... Jason -- To unsubscribe from this list: send the line "unsubscribe linux-nfs" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html