From: "J. Bruce Fields" <bfields@fieldses.org>
To: Chuck Lever <chuck.lever@oracle.com>
Cc: swise@ogc.net, Linux NFS Mailing List <linux-nfs@vger.kernel.org>,
linux-rdma@vger.kernel.org
Subject: Re: [PATCH 2/2] svcrdma: Remove extra writeargs sanity check for NFSv2/3
Date: Thu, 10 Jul 2014 15:43:49 -0400 [thread overview]
Message-ID: <20140710194349.GD26561@fieldses.org> (raw)
In-Reply-To: <B89AB7AC-32E1-4944-9287-73958A569A8E@oracle.com>
On Thu, Jul 10, 2014 at 03:07:34PM -0400, Chuck Lever wrote:
> Hi Bruce-
>
> On Jul 10, 2014, at 2:49 PM, J. Bruce Fields <bfields@fieldses.org> wrote:
>
> > On Thu, Jul 10, 2014 at 02:24:57PM -0400, Chuck Lever wrote:
> >>
> >> On Jul 10, 2014, at 2:19 PM, J. Bruce Fields <bfields@fieldses.org> wrote:
> >>
> >>> On Thu, Jul 10, 2014 at 01:44:35PM -0400, Chuck Lever wrote:
> >>>> The server should comply with RFC 5667,
> >>>
> >>> Where's the relevant language? (I took a quick look but didn't see it.)
> >>
> >> Sorry, I listed the wrong RFC when I wrote the description of bug 246.
> >> It’s actually RFC 5666, section 3.7.
> >
> > Thanks.
> >
> >>> So I think you just want to drop the round-up of len, not the whole
> >>> check.
> >>
> >> I’ll try that, thanks!
>
> Works-as-expected.
>
> > Actually, I'd really rather this get fixed up in the rpc layer. The
> > padding is really required for correct xdr.
>
> How so?
Well, to be spec-lawyerly, rfc 1832 3.9 defines opaque data as including
the zero-padding; a sequence of bytes isn't legal xdr if it just ends
early.
> All of NFSv4 and all other NFSv3 operations work as expected
> without that padding present. There doesn’t seem to be any operational
> dependency on the presence of padding. Help?
I can believe that the code deals with it now, I just wonder if this
check may not be the only case where someone writing xdr code expects
total length to be a multiple of four.
The drc code also depends on the length being right, see
nfsd_cache_csum. I don't know whether that will cause a practical
problem in this case.
(What about the krb5i case?)
> > The fact that RDMA doesn't
> > require those zeroes to be literally transmitted across the network
> > sounds like a transport-level detail that should be hidden from the xdr
> > code.
>
> The best I can think of is adding a false page array entry to the
> xdr_buf if the last incoming page is short by a few bytes.
The padding just gets added to the end of whichever page the write ended
on, and you only use another page if you run out of space, right?
I don't know, if that's a huge pain then I guess we can live with this.
--b.
WARNING: multiple messages have this Message-ID (diff)
From: "J. Bruce Fields" <bfields-uC3wQj2KruNg9hUCZPvPmw@public.gmane.org>
To: Chuck Lever <chuck.lever-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
Cc: swise-UeZzRo20aYc@public.gmane.org,
Linux NFS Mailing List
<linux-nfs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [PATCH 2/2] svcrdma: Remove extra writeargs sanity check for NFSv2/3
Date: Thu, 10 Jul 2014 15:43:49 -0400 [thread overview]
Message-ID: <20140710194349.GD26561@fieldses.org> (raw)
In-Reply-To: <B89AB7AC-32E1-4944-9287-73958A569A8E-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
On Thu, Jul 10, 2014 at 03:07:34PM -0400, Chuck Lever wrote:
> Hi Bruce-
>
> On Jul 10, 2014, at 2:49 PM, J. Bruce Fields <bfields-uC3wQj2KruNg9hUCZPvPmw@public.gmane.org> wrote:
>
> > On Thu, Jul 10, 2014 at 02:24:57PM -0400, Chuck Lever wrote:
> >>
> >> On Jul 10, 2014, at 2:19 PM, J. Bruce Fields <bfields-uC3wQj2KruNg9hUCZPvPmw@public.gmane.org> wrote:
> >>
> >>> On Thu, Jul 10, 2014 at 01:44:35PM -0400, Chuck Lever wrote:
> >>>> The server should comply with RFC 5667,
> >>>
> >>> Where's the relevant language? (I took a quick look but didn't see it.)
> >>
> >> Sorry, I listed the wrong RFC when I wrote the description of bug 246.
> >> It’s actually RFC 5666, section 3.7.
> >
> > Thanks.
> >
> >>> So I think you just want to drop the round-up of len, not the whole
> >>> check.
> >>
> >> I’ll try that, thanks!
>
> Works-as-expected.
>
> > Actually, I'd really rather this get fixed up in the rpc layer. The
> > padding is really required for correct xdr.
>
> How so?
Well, to be spec-lawyerly, rfc 1832 3.9 defines opaque data as including
the zero-padding; a sequence of bytes isn't legal xdr if it just ends
early.
> All of NFSv4 and all other NFSv3 operations work as expected
> without that padding present. There doesn’t seem to be any operational
> dependency on the presence of padding. Help?
I can believe that the code deals with it now, I just wonder if this
check may not be the only case where someone writing xdr code expects
total length to be a multiple of four.
The drc code also depends on the length being right, see
nfsd_cache_csum. I don't know whether that will cause a practical
problem in this case.
(What about the krb5i case?)
> > The fact that RDMA doesn't
> > require those zeroes to be literally transmitted across the network
> > sounds like a transport-level detail that should be hidden from the xdr
> > code.
>
> The best I can think of is adding a false page array entry to the
> xdr_buf if the last incoming page is short by a few bytes.
The padding just gets added to the end of whichever page the write ended
on, and you only use another page if you run out of space, right?
I don't know, if that's a huge pain then I guess we can live with this.
--b.
--
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
next prev parent reply other threads:[~2014-07-10 19:43 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-07-10 17:44 [PATCH 0/2] NFS/RDMA server patches for 3.17 Chuck Lever
2014-07-10 17:44 ` Chuck Lever
2014-07-10 17:44 ` [PATCH 1/2] svcrdma: Increase credit limit to 32 Chuck Lever
2014-07-10 17:44 ` Chuck Lever
2014-07-10 17:44 ` [PATCH 2/2] svcrdma: Remove extra writeargs sanity check for NFSv2/3 Chuck Lever
2014-07-10 17:44 ` Chuck Lever
2014-07-10 18:19 ` J. Bruce Fields
2014-07-10 18:19 ` J. Bruce Fields
2014-07-10 18:24 ` Chuck Lever
2014-07-10 18:24 ` Chuck Lever
2014-07-10 18:49 ` J. Bruce Fields
2014-07-10 18:49 ` J. Bruce Fields
2014-07-10 19:07 ` Chuck Lever
2014-07-10 19:07 ` Chuck Lever
2014-07-10 19:43 ` J. Bruce Fields [this message]
2014-07-10 19:43 ` J. Bruce Fields
2014-07-10 20:43 ` Chuck Lever
2014-07-10 20:43 ` Chuck Lever
2014-07-11 18:49 ` J. Bruce Fields
2014-07-11 18:49 ` J. Bruce Fields
2014-07-10 19:00 ` [PATCH 0/2] NFS/RDMA server patches for 3.17 Steve Wise
2014-07-10 19:00 ` Steve Wise
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=20140710194349.GD26561@fieldses.org \
--to=bfields@fieldses.org \
--cc=chuck.lever@oracle.com \
--cc=linux-nfs@vger.kernel.org \
--cc=linux-rdma@vger.kernel.org \
--cc=swise@ogc.net \
/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.