* protection domain question
@ 2016-04-09 19:03 Christoph Hellwig
[not found] ` <20160409190331.GA23186-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org>
0 siblings, 1 reply; 4+ messages in thread
From: Christoph Hellwig @ 2016-04-09 19:03 UTC (permalink / raw)
To: linux-rdma-u79uwXL29TY76Z2rM5mHXA
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset=unknown-8bit, Size: 561 bytes --]
As far as I can tell from reading the Verbs spec the raison d'êtrefor
protection domains is to allow associating MRs with different address
spaces in userspace programs.
Is there any good reason to have each kernel driver create it's own PDs
instead of simply creating one per device and sticking it into the
ib_device structure?
--
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
^ permalink raw reply [flat|nested] 4+ messages in thread[parent not found: <20160409190331.GA23186-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org>]
* Re: protection domain question [not found] ` <20160409190331.GA23186-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org> @ 2016-04-10 14:27 ` Sagi Grimberg [not found] ` <570A62B7.9020200-NQWnxTmZq1alnMjI0IkVqw@public.gmane.org> 0 siblings, 1 reply; 4+ messages in thread From: Sagi Grimberg @ 2016-04-10 14:27 UTC (permalink / raw) To: Christoph Hellwig, linux-rdma-u79uwXL29TY76Z2rM5mHXA > As far as I can tell from reading the Verbs spec the raison d'êtrefor > protection domains is to allow associating MRs with different address > spaces in userspace programs. The PD number is enforced when accessing the associated MRs (via the associated QPs). So if someone is accessing a MR that is associated with a PD via a queue-pair that is not it will fail (its a security thing). > Is there any good reason to have each kernel driver create it's own PDs > instead of simply creating one per device and sticking it into the > ib_device structure? There is a theoretical breach here. Say you're connected with a srp channel to a target, and you send out rkey X to your peer. In case there is a man-in-the-middle who sniffs it, he can theoretically read/write to your rkey by connecting to IPoIB in RC mode (which will connect to anyone). The fact that srp has it's own PD prevents this from happening. -- 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 ^ permalink raw reply [flat|nested] 4+ messages in thread
[parent not found: <570A62B7.9020200-NQWnxTmZq1alnMjI0IkVqw@public.gmane.org>]
* Re: protection domain question [not found] ` <570A62B7.9020200-NQWnxTmZq1alnMjI0IkVqw@public.gmane.org> @ 2016-04-10 14:55 ` Christoph Hellwig [not found] ` <20160410145511.GB2409-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org> 0 siblings, 1 reply; 4+ messages in thread From: Christoph Hellwig @ 2016-04-10 14:55 UTC (permalink / raw) To: Sagi Grimberg; +Cc: Christoph Hellwig, linux-rdma-u79uwXL29TY76Z2rM5mHXA On Sun, Apr 10, 2016 at 05:27:03PM +0300, Sagi Grimberg wrote: > >Is there any good reason to have each kernel driver create it's own PDs > >instead of simply creating one per device and sticking it into the > >ib_device structure? > > There is a theoretical breach here. Say you're connected with a srp > channel to a target, and you send out rkey X to your peer. In case > there is a man-in-the-middle who sniffs it, he can theoretically > read/write to your rkey by connecting to IPoIB in RC mode (which > will connect to anyone). Already, makes sense. -- 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 ^ permalink raw reply [flat|nested] 4+ messages in thread
[parent not found: <20160410145511.GB2409-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org>]
* Re: protection domain question [not found] ` <20160410145511.GB2409-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org> @ 2016-04-10 19:10 ` santosh.shilimkar-QHcLZuEGTsvQT0dZR+AlfA 0 siblings, 0 replies; 4+ messages in thread From: santosh.shilimkar-QHcLZuEGTsvQT0dZR+AlfA @ 2016-04-10 19:10 UTC (permalink / raw) To: Christoph Hellwig, Sagi Grimberg; +Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA On 4/10/16 7:55 AM, Christoph Hellwig wrote: > On Sun, Apr 10, 2016 at 05:27:03PM +0300, Sagi Grimberg wrote: >>> Is there any good reason to have each kernel driver create it's own PDs >>> instead of simply creating one per device and sticking it into the >>> ib_device structure? >> >> There is a theoretical breach here. Say you're connected with a srp >> channel to a target, and you send out rkey X to your peer. In case >> there is a man-in-the-middle who sniffs it, he can theoretically >> read/write to your rkey by connecting to IPoIB in RC mode (which >> will connect to anyone). > > Already, makes sense. Exactly I was also responding with similar response since many ULPs share the HCA resources and they needs to be isolated which PD does. Regards, Santosh -- 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 ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2016-04-10 19:10 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-04-09 19:03 protection domain question Christoph Hellwig
[not found] ` <20160409190331.GA23186-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org>
2016-04-10 14:27 ` Sagi Grimberg
[not found] ` <570A62B7.9020200-NQWnxTmZq1alnMjI0IkVqw@public.gmane.org>
2016-04-10 14:55 ` Christoph Hellwig
[not found] ` <20160410145511.GB2409-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org>
2016-04-10 19:10 ` santosh.shilimkar-QHcLZuEGTsvQT0dZR+AlfA
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox