From nobody Mon Dec 13 03:37:48 2021 X-Original-To: bugs@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 9BC8E18D3A34 for ; Mon, 13 Dec 2021 03:37:48 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4JC6f40Db8z4jj6 for ; Mon, 13 Dec 2021 03:37:48 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2610:1c1:1:606c::50:1d]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id DC09355B5 for ; Mon, 13 Dec 2021 03:37:47 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.5]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id 1BD3bl30002196 for ; Mon, 13 Dec 2021 03:37:47 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 1BD3bl7U002195 for bugs@FreeBSD.org; Mon, 13 Dec 2021 03:37:47 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: bugs@FreeBSD.org Subject: [Bug 260375] NFS server truncates directory cookies to 32-bits Date: Mon, 13 Dec 2021 03:37:48 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: kern X-Bugzilla-Version: 13.0-RELEASE X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: asomers@FreeBSD.org X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: bugs@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version rep_platform op_sys bug_status bug_severity priority component assigned_to reporter Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated List-Id: Bug reports List-Archive: https://lists.freebsd.org/archives/freebsd-bugs List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-bugs@freebsd.org MIME-Version: 1.0 ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1639366668; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=InO2fdSMN8PsAjucnWTdVuIVNQFLPH3EQJ6znEsyhME=; b=hGvI/rCZQ4r5zgiQEKd6PKjNiRDPoM113j6Uzr+P28BNdE6kFL5qC34xdQcXEd4eAV4/Ya Au6kk+4KObgHLNCNMD1O2oWs1Apbq9HrkdLrvDs91d5pUsz9epe2c+jCbenTe4E4LreV+I oaLDc8dSSO8fVzQs7slTkbs8kOHElhapmHNaDVfhaXwNp5pHz18GlBjQaicuiRWAglvnXG P/AHp1aMBC7A/7w2HKvw0LFmpNhQ5K8tJHJG/jKSMi7FWbeozbhM6hlVPp+UXlftYtJp2o rUxzulWGdd4WkSALiR/9qxdI+uRfKsY1IPyDqnNTYwZXaDeYGdJE7lW2SFdKSA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1639366668; a=rsa-sha256; cv=none; b=CkIf4xRTve0ZU4j+Y5u5toWRYYAUycQZj8eOij3fd02Dv13zeTkcyztooiPr+O5nIpk2n4 4lxuB5+UEyfuRkweqDBHDMXuwzj4g6+xD0DnT7UIQixCGCw5MoRPmd0EXMb0v1ZMxw71jc 242i9RNwjJkbDImJs5sY8taEoapMPvbse8If34YpuPH/JCV0e96BadRPmlWaSU72E5BIC3 5djK1kF6waEBcYYMqNdlmTMqe+p5KJkWWnfqNbQKESqrfoq85MbA69MmEFnGeLS//sh7EK eQRL3KAceNMsXETvS2SdiMnMXRSp+5pqwxLAGv/E6FUxKzwOc0sr4eDw/f6qFw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D260375 Bug ID: 260375 Summary: NFS server truncates directory cookies to 32-bits Product: Base System Version: 13.0-RELEASE Hardware: Any OS: Any Status: New Severity: Affects Only Me Priority: --- Component: kern Assignee: bugs@FreeBSD.org Reporter: asomers@FreeBSD.org VOP_READDIR can return a list of cookies that store seek offsets for the directory entries returned in uio. Each cookie is a 64-bit value, matching= the 64-bit d_off field in struct dirent. However, The NFS server truncates the= se cookies to 32-bits. It happens in both nfsrvd_readdir and nfsrvd_readdirpl= us.=20 The relevant lines are these: *tl++ =3D 0; *tl =3D txdr_unsigned(*cookiep); That works just fine for UFS, where dirent offsets correspond to byte offse= ts within a densely packed array. And it works just fine for ZFS, where dirent offsets seem to come from a 29-bit hash function. But it fails for the FUSE file system I'm developing, where the dirent offset uses all 64 bits. According to RFC-1813, the NFSv3 standard, the cookie3 data type is a uint64 variable. I can't figure out any good reason why the NFS server should truncate it. It's probably just a legacy thing. I'll try to come up with a patch. --=20 You are receiving this mail because: You are the assignee for the bug.=