From: "J. Bruce Fields" <bfields@fieldses.org>
To: Chuck Lever <chuck.lever@oracle.com>
Cc: bcodding@redhat.com, linux-nfs@vger.kernel.org
Subject: Re: [PATCH v1] svcauth_gss: Close connection when dropping an incoming message
Date: Fri, 9 Sep 2016 17:18:22 -0400 [thread overview]
Message-ID: <20160909211822.GA25868@fieldses.org> (raw)
In-Reply-To: <20160907202552.15084.40866.stgit@klimt.1015granger.net>
On Wed, Sep 07, 2016 at 04:36:19PM -0400, Chuck Lever wrote:
> S5.3.3.1 of RFC 2203 requires that an incoming GSS-wrapped message
> whose sequence number lies outside the current window is dropped.
> The rationale is:
>
> The reason for discarding requests silently is that the server
> is unable to determine if the duplicate or out of range request
> was due to a sequencing problem in the client, network, or the
> operating system, or due to some quirk in routing, or a replay
> attack by an intruder. Discarding the request allows the client
> to recover after timing out, if indeed the duplication was
> unintentional or well intended.
>
> However, clients may rely on the server dropping the connection to
> indicate that a retransmit is needed. Without a connection reset, a
> client can wait forever without retransmitting, and the workload
> just stops dead. I've reproduced this behavior by running xfstests
> generic/323 on an NFSv4.0 mount with proto=rdma and sec=krb5i.
>
> To address this issue, have the server close the connection when it
> silently discards an incoming message due to a GSS sequence number
> problem.
>
> Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
> Cc: Benjamin Coddington <bcodding@redhat.com>
> ---
> Hi-
>
> Passed testing with my reproducer: 10 runs of generic/323 with
> proto=rdma and sec=krb5i, with NFSv3, NFSv4.0, and NFSv4.1.
> generic/323 is 120 seconds or so of a heavy aio workload.
>
> I tested with that dprintk replaced with pr_warn to confirm that the
> reproducer hits this path one or more times per test run.
Thanks, this is useful, but before applying I'd just like to audit other
uses of SVC_DROP in the server rpc code as this probably isn't the only
place with this problem.
Also, this changes behavior for v2/v3 too, does that cause any problems?
Is it OK for the server to just always close connections on dropping in
the v2/v3 case too?
--b.
>
> net/sunrpc/auth_gss/svcauth_gss.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/net/sunrpc/auth_gss/svcauth_gss.c b/net/sunrpc/auth_gss/svcauth_gss.c
> index d858202..3ff52ec 100644
> --- a/net/sunrpc/auth_gss/svcauth_gss.c
> +++ b/net/sunrpc/auth_gss/svcauth_gss.c
> @@ -696,7 +696,8 @@ gss_verify_header(struct svc_rqst *rqstp, struct rsc *rsci,
> if (!gss_check_seq_num(rsci, gc->gc_seq)) {
> dprintk("RPC: svcauth_gss: discarding request with "
> "old sequence number %d\n", gc->gc_seq);
> - return SVC_DROP;
> + /* Signal to the client that an RPC message was lost */
> + return SVC_CLOSE;
> }
> return SVC_OK;
> }
next prev parent reply other threads:[~2016-09-09 21:18 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-09-07 20:36 [PATCH v1] svcauth_gss: Close connection when dropping an incoming message Chuck Lever
2016-09-09 21:18 ` J. Bruce Fields [this message]
2016-09-12 15:57 ` Chuck Lever
2016-09-12 16:18 ` J. Bruce Fields
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=20160909211822.GA25868@fieldses.org \
--to=bfields@fieldses.org \
--cc=bcodding@redhat.com \
--cc=chuck.lever@oracle.com \
--cc=linux-nfs@vger.kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.