[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <D9B2DD62-E16C-4781-9EFD-FD8661642E24@oracle.com>
Date: Wed, 21 Oct 2020 13:29:12 -0400
From: Chuck Lever <chuck.lever@...cle.com>
To: Martijn de Gouw <martijn.de.gouw@...drive-technologies.com>
Cc: Bruce Fields <bfields@...ldses.org>,
Trond Myklebust <trond.myklebust@...merspace.com>,
Anna Schumaker <anna.schumaker@...app.com>,
"David S. Miller" <davem@...emloft.net>,
Jakub Kicinski <kuba@...nel.org>,
Arnd Bergmann <arnd@...db.de>, Neil Brown <neilb@...e.de>,
Alexey Dobriyan <adobriyan@...il.com>,
Roberto Bergantinos Corpas <rbergant@...hat.com>,
Linux NFS Mailing List <linux-nfs@...r.kernel.org>,
"open list:NETWORKING [GENERAL]" <netdev@...r.kernel.org>,
open list <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] SUNRPC: fix copying of multiple pages in
gss_read_proxy_verf()
> On Oct 20, 2020, at 3:16 AM, Martijn de Gouw <martijn.de.gouw@...drive-technologies.com> wrote:
>
> Hi,
>
> On 20-10-2020 00:04, J. Bruce Fields wrote:
>> On Mon, Oct 19, 2020 at 03:46:39PM +0000, Martijn de Gouw wrote:
>>> Hi
>>>
>>> On 19-10-2020 17:23, J. Bruce Fields wrote:
>>>> On Mon, Oct 19, 2020 at 01:42:27PM +0200, Martijn de Gouw wrote:
>>>>> When the passed token is longer than 4032 bytes, the remaining part
>>>>> of the token must be copied from the rqstp->rq_arg.pages. But the
>>>>> copy must make sure it happens in a consecutive way.
>>>>
>>>> Thanks. Apologies, but I don't immediately see where the copy is
>>>> non-consecutive. What exactly is the bug in the existing code?
>>>
>>> In the first memcpy 'length' bytes are copied from argv->iobase, but
>>> since the header is in front, this never fills the whole first page of
>>> in_token->pages.
>>>
>>> The memcpy in the loop copies the following bytes, but starts writing at
>>> the next page of in_token->pages. This leaves the last bytes of page 0
>>> unwritten.
>>>
>>> Next to that, the remaining data is in page 0 of rqstp->rq_arg.pages,
>>> not page 1.
>>
>> Got it, thanks. Looks like the culprit might be a patch from a year ago
>> from Chuck, 5866efa8cbfb "SUNRPC: Fix svcauth_gss_proxy_init()"? At
>> least, that's the last major patch to touch this code.
It's likely that we didn't have a test scenario at bake-a-thon that
presents large tokens, so that new tail copy logic was never properly
exercised.
> I found this issue when setting up NFSv4 with Active Directory as KDC
> and gssproxy. Users with many groups where not able to access the NFS
> shares, while others could access them just fine. During debugging I
> found that the token was not the same on both sides.
>
> I do not have the HW to setup a rdma version of NFSv4, so I'm unable to
> test if it still works via rdma.
You don't need special HW to get NFS/RDMA with Linux working, though.
Linux now has soft iWARP, and NFS/RDMA works fine with that.
As stated in the patch description for commit 5866efa8cbfb, the original
issue won't appear with Linux clients, because they use TCP to handle
the ACCEPT_SEC_CONTEXT handshake. You'd need to have both Solaris and
RDMA to test it. Maybe we can scrounge something up, but that would only
be enough to ensure that your patch doesn't regress the Solaris NFS/RDMA
with Kerberos setup when using small tokens.
--
Chuck Lever
Powered by blists - more mailing lists