Re: [PATCH v2] NFSv4.2: fix nfs4_listxattr size accounting
Paul Moore <[email protected]> Tue, 14 Jul 2026 14:20:44 -0400
| Newsgroups | org.kernel.vger.linux-security-module,org.kernel.vger.linux-nfs,org.kernel.vger.selinux |
|---|---|
| Message-ID | <CAHC9VhR+pWFnt=1pBJTky78br7NsfVcZE=V4UkfkfTbMvBo+mQ@mail.gmail.com> |
On Fri, Jul 10, 2026 at 6:20 PM Paul Moore <[email protected]> wrote: > > ... and scratch that, the offending commit was that one. > > commit 01c2305795a3b6b164df48e72b12022a68fd60c1 > Author: Jeff Layton <[email protected]> > Date: Wed Mar 25 10:40:32 2026 -0400 > > nfsd: add netlink upcall for the nfsd.fh cache > > Add netlink-based cache upcall support for the expkey (nfsd.fh) cache, > following the same pattern as the existing svc_export netlink support. > > Add expkey to the cache-type enum, a new expkey attribute-set with > client, fsidtype, fsid, negative, expiry, and path fields, and the > expkey-get-reqs / expkey-set-reqs operations to the nfsd YAML spec > and generated headers. > > Implement nfsd_nl_expkey_get_reqs_dumpit() which snapshots pending > expkey cache requests and sends each entry's seqno, client name, > fsidtype, and fsid over netlink. > > Implement nfsd_nl_expkey_set_reqs_doit() which parses expkey cache > responses from userspace (client, fsidtype, fsid, expiry, and path > or negative flag) and updates the cache via svc_expkey_lookup() / > svc_expkey_update(). > > Wire up the expkey_notify() callback in svc_expkey_cache_template > so cache misses trigger NFSD_CMD_CACHE_NOTIFY multicast events with > NFSD_CACHE_TYPE_EXPKEY. > > Signed-off-by: Jeff Layton <[email protected]> > Signed-off-by: Chuck Lever <[email protected]> Playing around with it some this morning on a current Fedora Rawhide system, I can reproduce the problem with a simple command line: % mount -t nfs localhost:/mnt/test /mnt/nfs_test mount.nfs: Connection refused for localhost:/mnt/test on /mnt/nfs_test ... adding an explicit "vers={4,4.1,4.2}" has no effect; versions 2 and 3 are no supported on my kernel builds. There is nothing obvious in dmesg. I've run with SELinux both in permissive mode and disabled and encountered the same problem. This doesn't appear to be related to SELinux, it may simply be that we are the first ones to hit this. As there was some earlier discussion about this being a wonky interaction with userspace, here are some of the relevant packages on my system: nfs-common-utils-2.9.1-4.rc4.fc45.x86_64 nfs-client-utils-2.9.1-4.rc4.fc45.x86_64 nfsv4-client-utils-2.9.1-4.rc4.fc45.x86_64 nfs-utils-2.9.1-4.rc4.fc45.x86_64 My next step is to try disabling portions of the NFS file handle cache upcall to see if that is the issue, but it would be nice if the NFS devs could take a look at this too. I'm happy to test things out or answer any questions about my test system. -- paul-moore.com