2024-04-15 17:28:35

by Petr Vorel

[permalink] [raw]
Subject: [PATCH 1/1] proc01: Whitelist /proc/fs/nfsd/nfsv4recoverydir

/proc/fs/nfsd/nfsv4recoverydir started from kernel 6.8 report EINVAL.

Signed-off-by: Petr Vorel <[email protected]>
---
Hi,

@ Jeff, Chuck, Neil, NFS devs: The patch itself whitelist reading
/proc/fs/nfsd/nfsv4recoverydir in LTP test. I suspect reading failed
with EINVAL in 6.8 was a deliberate change and expected behavior when
CONFIG_NFSD_LEGACY_CLIENT_TRACKING is not set:

$ sudo cat /proc/fs/nfsd/nfsv4recoverydir
cat: /proc/fs/nfsd/nfsv4recoverydir: Invalid argument

I'm asking because It worked fine in kernel 6.7:

$ sudo cat /proc/fs/nfsd/nfsv4recoverydir
/var/lib/nfs/v4recovery

I did not bisect but I suspect suspect 74fd48739d04 ("nfsd: new Kconfig
option for legacy client tracking") from v6.8-rc1. The system I test
(openSUSE Tumbleweed) has not CONFIG_NFSD_LEGACY_CLIENT_TRACKING set and
74fd48739d04 wraps write_recoverydir setup, thus it's not set.

+#ifdef CONFIG_NFSD_LEGACY_CLIENT_TRACKING
[NFSD_RecoveryDir] = write_recoverydir,
+#endif

Kind regards,
Petr

testcases/kernel/fs/proc/proc01.c | 1 +
1 file changed, 1 insertion(+)

diff --git a/testcases/kernel/fs/proc/proc01.c b/testcases/kernel/fs/proc/proc01.c
index c90e509a3..08b9bbc75 100644
--- a/testcases/kernel/fs/proc/proc01.c
+++ b/testcases/kernel/fs/proc/proc01.c
@@ -113,6 +113,7 @@ static const struct mapping known_issues[] = {
{"read", "/proc/fs/nfsd/filehandle", EINVAL},
{"read", "/proc/fs/nfsd/.getfs", EINVAL},
{"read", "/proc/fs/nfsd/.getfd", EINVAL},
+ {"read", "/proc/fs/nfsd/nfsv4recoverydir", EINVAL},
{"read", "/proc/self/net/rpc/use-gss-proxy", EAGAIN},
{"read", "/proc/sys/net/ipv6/conf/*/stable_secret", EIO},
{"read", "/proc/sys/vm/nr_hugepages", EOPNOTSUPP},
--
2.43.0



2024-04-17 06:06:17

by Petr Vorel

[permalink] [raw]
Subject: Re: [PATCH 1/1] proc01: Whitelist /proc/fs/nfsd/nfsv4recoverydir

Hi all,

> /proc/fs/nfsd/nfsv4recoverydir started from kernel 6.8 report EINVAL.

Because Neil sent fix, I withdraw this patch.

Kind regards,
Petr

[1] https://lore.kernel.org/linux-nfs/[email protected]/