kernel_samsung_a53x/fs/nfsd
Chuck Lever 38aea79732 NFSD: Decode NFSv4 birth time attribute
[ Upstream commit 5b2f3e0777da2a5dd62824bbe2fdab1d12caaf8f ]

NFSD has advertised support for the NFSv4 time_create attribute
since commit e377a3e698fb ("nfsd: Add support for the birth time
attribute").

Igor Mammedov reports that Mac OS clients attempt to set the NFSv4
birth time attribute via OPEN(CREATE) and SETATTR if the server
indicates that it supports it, but since the above commit was
merged, those attempts now fail.

Table 5 in RFC 8881 lists the time_create attribute as one that can
be both set and retrieved, but the above commit did not add server
support for clients to provide a time_create attribute. IMO that's
a bug in our implementation of the NFSv4 protocol, which this commit
addresses.

Whether NFSD silently ignores the new birth time or actually sets it
is another matter. I haven't found another filesystem service in the
Linux kernel that enables users or clients to modify a file's birth
time attribute.

This commit reflects my (perhaps incorrect) understanding of whether
Linux users can set a file's birth time. NFSD will now recognize a
time_create attribute but it ignores its value. It clears the
time_create bit in the returned attribute bitmask to indicate that
the value was not used.

Reported-by: Igor Mammedov <imammedo@redhat.com>
Fixes: e377a3e698fb ("nfsd: Add support for the birth time attribute")
Tested-by: Igor Mammedov <imammedo@redhat.com>
Reviewed-by: Jeff Layton <jlayton@kernel.org>
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-11-19 12:27:59 +01:00
..
acl.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
auth.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
auth.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
blocklayout.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
blocklayoutxdr.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
blocklayoutxdr.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
cache.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
current_stateid.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
export.c nfsd: report per-export stats 2024-11-19 12:27:31 +01:00
export.h nfsd: report per-export stats 2024-11-19 12:27:31 +01:00
fault_inject.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
filecache.c NFSD: Fix potential use-after-free in nfsd_file_put() 2024-11-19 12:27:58 +01:00
filecache.h NFSD: Instantiate a struct file when creating a regular NFSv4 file 2024-11-19 12:27:57 +01:00
flexfilelayout.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
flexfilelayoutxdr.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
flexfilelayoutxdr.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
idmap.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
Kconfig NFSD: Remove CONFIG_NFSD_V3 2024-11-19 12:27:54 +01:00
lockd.c Keep read and write fds with each nlm_file 2024-11-19 12:27:44 +01:00
Makefile NFSD: Remove CONFIG_NFSD_V3 2024-11-19 12:27:54 +01:00
netns.h NFSD: Rename boot verifier functions 2024-11-19 12:27:52 +01:00
nfs2acl.c SUNRPC: Return true/false (not 1/0) from bool functions 2024-11-19 12:27:54 +01:00
nfs3acl.c SUNRPC: Change return value type of .pc_encode 2024-11-19 12:27:48 +01:00
nfs3proc.c NFSD: Refactor NFSv3 CREATE 2024-11-19 12:27:57 +01:00
nfs3xdr.c NFSD: Deprecate NFS_OFFSET_MAX 2024-11-19 12:27:53 +01:00
nfs4acl.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
nfs4callback.c nfsd: rpc_peeraddr2str needs rcu lock 2024-11-19 12:27:39 +01:00
nfs4idmap.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
nfs4layouts.c nfsd: fix using the correct variable for sizeof() 2024-11-19 12:27:54 +01:00
nfs4proc.c SUNRPC: Use RMW bitops in single-threaded hot paths 2024-11-19 12:27:58 +01:00
nfs4recover.c nfsd: Log client tracking type log message as info instead of warning 2024-11-19 12:27:36 +01:00
nfs4state.c NFSD: Add documenting comment for nfsd4_release_lockowner() 2024-11-19 12:27:58 +01:00
nfs4xdr.c NFSD: Decode NFSv4 birth time attribute 2024-11-19 12:27:59 +01:00
nfscache.c nfsd: destroy percpu stats counters after reply cache shutdown 2024-11-19 12:27:58 +01:00
nfsctl.c nfsd: Fix null-ptr-deref in nfsd_fill_super() 2024-11-19 12:27:58 +01:00
nfsd.h NFSD: Decode NFSv4 birth time attribute 2024-11-19 12:27:59 +01:00
nfsfh.c NFSD: Remove CONFIG_NFSD_V3 2024-11-19 12:27:54 +01:00
nfsfh.h NFSD: Remove CONFIG_NFSD_V3 2024-11-19 12:27:54 +01:00
nfsproc.c nfsd: Retry once in nfsd_open on an -EOPENSTALE return 2024-11-19 12:27:52 +01:00
nfssvc.c NFSD: Remove CONFIG_NFSD_V3 2024-11-19 12:27:54 +01:00
nfsxdr.c SUNRPC: Change return value type of .pc_encode 2024-11-19 12:27:48 +01:00
pnfs.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
state.h NFSD: add courteous server support for thread with only delegation 2024-11-19 12:27:56 +01:00
stats.c nfsd: make nfsd_stats.th_cnt atomic_t 2024-11-19 12:27:50 +01:00
stats.h nfsd: make nfsd_stats.th_cnt atomic_t 2024-11-19 12:27:50 +01:00
trace.c NFSD: Add SPDX header for fs/nfsd/trace.c 2024-11-19 12:27:20 +01:00
trace.h NFSD: Clean up the show_nf_flags() macro 2024-11-19 12:27:58 +01:00
vfs.c NFSD: Clean up nfsd_open_verified() 2024-11-19 12:27:57 +01:00
vfs.h NFSD: Clean up nfsd_open_verified() 2024-11-19 12:27:57 +01:00
xdr.h SUNRPC: Change return value type of .pc_encode 2024-11-19 12:27:48 +01:00
xdr3.h SUNRPC: Change return value type of .pc_encode 2024-11-19 12:27:48 +01:00
xdr4.h NFSD: Instantiate a struct file when creating a regular NFSv4 file 2024-11-19 12:27:57 +01:00
xdr4cb.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00