linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH RFC 0/6] NFSD size, offset, and count sanity
@ 2022-01-27 16:08 Chuck Lever
  2022-01-27 16:08 ` [PATCH RFC 1/6] NFSD: Fix NFSv4 SETATTR's handling of large file sizes Chuck Lever
                   ` (6 more replies)
  0 siblings, 7 replies; 11+ messages in thread
From: Chuck Lever @ 2022-01-27 16:08 UTC (permalink / raw)
  To: linux-nfs, linux-fsdevel

Dan Aloni reported a problem with the way NFSD's READ implementation
deals with the very upper end of file sizes, and I got interested in
how some of the other operations handled it. I found some issues,
and have started a (growing) pile of patches to deal with them.

Since at least the SETATTR case appears to cause a crash on some
filesystems, I think several of these are 5.17-rc fodder (i.e.,
priority bug fixes). I see that NLM also has potential problems with
how the max file size is handled, but since locking doesn't involve
the page cache, I think fixes in that area can be delayed a bit.

Dan's still working on the READ issue. I need some input on whether
I understand the problem correctly and whether the NFS status codes
I've chosen to use are going to be reasonable or a problem for NFS
clients. I've attempted to stay within the bound of the NFS specs,
but sometimes the spec doesn't provide a mechanism in the protocol
to indicate that the client passed us a bogus size/offset/count.

---

Chuck Lever (6):
      NFSD: Fix NFSv4 SETATTR's handling of large file sizes
      NFSD: Fix NFSv3 SETATTR's handling of large file sizes
      NFSD: COMMIT operations must not return NFS?ERR_INVAL
      NFSD: Replace directory offset placeholder
      NFSD: Remove NFS_OFFSET_MAX
      NFSD: Clamp WRITE offsets


 fs/nfsd/nfs3proc.c  | 32 +++++++++++++++++++++------
 fs/nfsd/nfs3xdr.c   |  4 ++--
 fs/nfsd/nfs4proc.c  |  7 +++++-
 fs/nfsd/nfs4xdr.c   |  2 +-
 fs/nfsd/vfs.c       | 53 ++++++++++++++++++++++++++++++---------------
 fs/nfsd/vfs.h       |  4 ++--
 include/linux/nfs.h |  8 -------
 7 files changed, 72 insertions(+), 38 deletions(-)

--
Chuck Lever

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2022-02-09 22:49 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-01-27 16:08 [PATCH RFC 0/6] NFSD size, offset, and count sanity Chuck Lever
2022-01-27 16:08 ` [PATCH RFC 1/6] NFSD: Fix NFSv4 SETATTR's handling of large file sizes Chuck Lever
2022-01-28  0:36   ` Dave Chinner
2022-01-28  1:48     ` Chuck Lever III
2022-02-09 21:55       ` Dave Chinner
2022-01-27 16:08 ` [PATCH RFC 2/6] NFSD: Fix NFSv3 " Chuck Lever
2022-01-27 16:08 ` [PATCH RFC 3/6] NFSD: COMMIT operations must not return NFS?ERR_INVAL Chuck Lever
2022-01-27 16:08 ` [PATCH RFC 4/6] NFSD: Replace directory offset placeholder Chuck Lever
2022-01-27 16:08 ` [PATCH RFC 5/6] NFSD: Remove NFS_OFFSET_MAX Chuck Lever
2022-01-27 16:09 ` [PATCH RFC 6/6] NFSD: Clamp WRITE offsets Chuck Lever
2022-01-27 18:13 ` [PATCH RFC 0/6] NFSD size, offset, and count sanity Frank Filz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).