[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: Mon, 03 Jan 2022 05:44:43 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=260375
--- Comment #7 from commit-hook@FreeBSD.org ---
A commit in branch stable/12 references this bug:
URL:
https://cgit.FreeBSD.org/src/commit/?id=374e8226d2252da6421a05313a7ac223fc00c432
commit 374e8226d2252da6421a05313a7ac223fc00c432
Author: Alan Somers <asomers@FreeBSD.org>
AuthorDate: 2021-12-13 03:57:14 +0000
Commit: Alan Somers <asomers@FreeBSD.org>
CommitDate: 2022-01-03 05:37:51 +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
Reviewed by: rmacklem
Differential Revision: https://reviews.freebsd.org/D33404
(cherry picked from commit 32fbc5d824f51f97220bc5c61a23e0bf3ff2b470)
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.