[Bug 260375] NFS server truncates directory cookies to 32-bits
- In reply to: bugzilla-noreply_a_freebsd.org: "[Bug 260375] NFS server truncates directory cookies to 32-bits"
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Thu, 16 Dec 2021 03:55:55 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=260375 --- Comment #4 from commit-hook@FreeBSD.org --- A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/src/commit/?id=32fbc5d824f51f97220bc5c61a23e0bf3ff2b470 commit 32fbc5d824f51f97220bc5c61a23e0bf3ff2b470 Author: Alan Somers <asomers@FreeBSD.org> AuthorDate: 2021-12-13 03:57:14 +0000 Commit: Alan Somers <asomers@FreeBSD.org> CommitDate: 2021-12-16 03:54:57 +0000 nfs: don't truncate directory cookies to 32-bits in the NFS server In NFSv2, the directory cookie was 32-bits. NFSv3 widened it to 64-bits and SVN r22521 widened the corresponding argument in VOP_READDIR, but FreeBSD's NFS server continued to treat the cookies as 32-bits, and 0-extended to fill the field on the wire. Nobody ever noticed, because every in-tree file system generates cookies that fit comfortably within 32-bits. Also, have better type safety for txdr_hyper. Turn it into an inline function that type-checks its arguments. Prevents warnings about shift-count-overflow. PR: 260375 MFC after: 2 weeks Reviewed by: rmacklem Differential Revision: https://reviews.freebsd.org/D33404 sys/fs/nfs/xdr_subs.h | 10 ++++++---- sys/fs/nfsserver/nfs_nfsdport.c | 13 ++++++------- sys/fs/nfsserver/nfs_nfsdsubs.c | 6 +++--- sys/nfs/xdr_subs.h | 12 +++++++----- 4 files changed, 22 insertions(+), 19 deletions(-) -- You are receiving this mail because: You are the assignee for the bug.