linux-rdma.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jason Gunthorpe <jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
To: Chuck Lever <chuck.lever-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
Cc: Linux RDMA Mailing List
	<linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
Subject: Re: RFC: RPC/RDMA memory invalidation
Date: Wed, 28 Oct 2015 14:10:02 -0600	[thread overview]
Message-ID: <20151028201002.GA27901@obsidianresearch.com> (raw)
In-Reply-To: <094A348A-0764-4F46-A422-FBF2F1DC1C28-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>

On Wed, Oct 28, 2015 at 03:56:08PM -0400, Chuck Lever wrote:

> A key question is whether connection loss guarantees that the
> server is fenced, for all device types, from existing
> registered MRs. After reconnect, each MR must be registered
> again before it can be accessed remotely. Is this true for the
> Linux IB core, and all kernel providers, when using FRWR?

MR validation is not linked to a QP in any way. The memory is not
fully fenced until the invalidate completes, or the MR unregister
completes. Nothing else is good enough.

> After a connection loss, the Linux kernel RPC/RDMA client
> creates a new QP as it reconnects, thus I’d expect the QPN to
> be different on the new connection. That should be enough to
> prevent access to MRs that were registered with the previous
> QP and PD, right?

No, the NFS implementation creates a single PD for everything and any
QP in the PD can access all the MRs. This is another security issue of
a different sort.

If there was one PD per QP then the above would be true, since the MR
is linked to the PD.

Even so, moving a QP out of RTR is not a synchronous operation, and
until the CQ is drained, the disoposition of ongoing RDMA is not
defined.

Basically: You can't avoid actually doing a blocking invalidate
operation. The core layer must allow for this if it is going to async
cancel RPCs.

FWIW, the same is true on the send side too, if the RPC had send
buffers and gets canceled, you have to block until a CQ linked to that
send is seen.

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

  parent reply	other threads:[~2015-10-28 20:10 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-28 19:56 RFC: RPC/RDMA memory invalidation Chuck Lever
     [not found] ` <094A348A-0764-4F46-A422-FBF2F1DC1C28-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
2015-10-28 20:10   ` Jason Gunthorpe [this message]
     [not found]     ` <20151028201002.GA27901-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2015-10-28 21:30       ` Chuck Lever
     [not found]         ` <59849A38-0C8F-46AB-BB76-71216C6C0631-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
2015-10-28 21:51           ` Jason Gunthorpe

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20151028201002.GA27901@obsidianresearch.com \
    --to=jgunthorpe-epgobjl8dl3ta4ec/59zmfatqe2ktcn/@public.gmane.org \
    --cc=chuck.lever-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org \
    --cc=linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).