NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: kern/57691: NFS client regression with macOS 14 server



The following reply was made to PR kern/57691; it has been noted by GNATS.

From: "Amitai Schleier" <schmonz%schmonz.com@localhost>
To: "Jason Thorpe" <thorpej%me.com@localhost>
Cc: gnats-bugs%netbsd.org@localhost, kern-bug-people%netbsd.org@localhost, gnats-admin%netbsd.org@localhost,
  netbsd-bugs%netbsd.org@localhost,
  "NetBSD Kernel Technical Discussion List" <tech-kern%NetBSD.org@localhost>
Subject: Re: kern/57691: NFS client regression with macOS 14 server
Date: 8 Dec 2023 22:25:32 -0500

 On 8 Dec 2023, at 14:17, Jason Thorpe wrote:
 
 >> On Dec 8, 2023, at 10:55â?¯AM, Jason Thorpe <thorpej%me.com@localhost> wrote:
 >>
 >> Probably whatâ??s going on is that the server is verifying the 
 >> directory cookie more strictly than before.  Those two lines that 
 >> pack the cookieverf should be inserting 0s if uno_offset is 0.
 >
 > Just confirmed by code inspection that FreeBSD always sends a 0 cookie 
 > verifier for uio_offset 0.
 >
 > <quote>
 > 		if (cookie.qval == 0) {
 > 			*tl++ = 0;
 > 			*tl++ = 0;
 > 		} else {
 > </quote>
 
 Thank you for looking into this and giving me something to try. Neither 
 of the following diffs seems to make a difference, though (tested on my 
 10.0_RC1/aarch64 NFS client). Have I misunderstood something?
 
 
 Index: nfs/nfs_vnops.c
 ===================================================================
 RCS file: /cvsroot/src/sys/nfs/nfs_vnops.c,v
 retrieving revision 1.324
 diff -u -p -r1.324 nfs_vnops.c
 --- nfs/nfs_vnops.c	24 May 2022 06:28:02 -0000	1.324
 +++ nfs/nfs_vnops.c	9 Dec 2023 03:23:02 -0000
 @@ -2632,8 +2632,13 @@ nfs_readdirplusrpc(struct vnode *vp, str
   			txdr_cookie3(uiop->uio_offset, tl);
   		}
   		tl += 2;
 -		*tl++ = dnp->n_cookieverf.nfsuquad[0];
 -		*tl++ = dnp->n_cookieverf.nfsuquad[1];
 +		if (uiop->uio_offset == 0) {
 +			*tl++ = 0;
 +			*tl++ = 0;
 +		} else {
 +			*tl++ = dnp->n_cookieverf.nfsuquad[0];
 +			*tl++ = dnp->n_cookieverf.nfsuquad[1];
 +		}
   		*tl++ = txdr_unsigned(nmp->nm_readdirsize);
   		*tl = txdr_unsigned(nmp->nm_rsize);
   		nfsm_request(dnp, NFSPROC_READDIRPLUS, curlwp, cred);
 
 
 
 Index: nfs/nfs_vnops.c
 ===================================================================
 RCS file: /cvsroot/src/sys/nfs/nfs_vnops.c,v
 retrieving revision 1.324
 diff -u -p -r1.324 nfs_vnops.c
 --- nfs/nfs_vnops.c	24 May 2022 06:28:02 -0000	1.324
 +++ nfs/nfs_vnops.c	9 Dec 2023 03:12:56 -0000
 @@ -2632,6 +2632,10 @@ nfs_readdirplusrpc(struct vnode *vp, str
   			txdr_cookie3(uiop->uio_offset, tl);
   		}
   		tl += 2;
 +		if (uiop->uio_offset == 0) {
 +			dnp->n_cookieverf.nfsuquad[0] = 0;
 +			dnp->n_cookieverf.nfsuquad[1] = 0;
 +		}
   		*tl++ = dnp->n_cookieverf.nfsuquad[0];
   		*tl++ = dnp->n_cookieverf.nfsuquad[1];
   		*tl++ = txdr_unsigned(nmp->nm_readdirsize);
 


Home | Main Index | Thread Index | Old Index