From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jason Gunthorpe Subject: Re: [RFC ABI V1 4/8] RDMA/core: Add support for custom types Date: Wed, 13 Jul 2016 11:21:16 -0600 Message-ID: <20160713172116.GC19657@obsidianresearch.com> References: <1467293971-25688-1-git-send-email-matanb@mellanox.com> <1467293971-25688-5-git-send-email-matanb@mellanox.com> <20160712192345.GC8206@obsidianresearch.com> <081a02c0-0650-d0c2-494c-19a64b83cbc1@mellanox.com> <20160713163924.GA19657@obsidianresearch.com> <0959d391-75fb-75e8-ef2e-9d8c06b1b96f@mellanox.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Content-Disposition: inline In-Reply-To: <0959d391-75fb-75e8-ef2e-9d8c06b1b96f-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org> Sender: linux-rdma-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: Matan Barak Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Doug Ledford , Sean Hefty , Tal Alon , Liran Liss , Haggai Eran , Majd Dibbiny , Christoph Lameter , Leon Romanovsky List-Id: linux-rdma@vger.kernel.org On Wed, Jul 13, 2016 at 07:57:04PM +0300, Matan Barak wrote: > Maybe instead of having an idr per device, it's better to have an idr per > uverbs file. Oh, I thought you were doing that already! Yes, the idr must be per ucontext, otherwise we create a big security problem. Access to one files object #'s cannot be allowed from another file. > However, when a device is removed, we need to find all its related objects > and destroy them. In order to do that in a simple way, we could say that a > uverbs_file is either not bound to any rdma device or bound to a > single IB This is just more searching on the disassociate path. Search all ucontexts for any uobj connected to the victim device. If we drop the file == device scheme then we need a generic op to tell what device a uobj is associated with. All our kobjs already store this information, so it isn't a big deal. 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