Linux-NFS Archive on lore.kernel.org
 help / color / Atom feed
* [PATCH v1 00/61] Update NFSD XDR functions
@ 2020-11-13 15:02 Chuck Lever
  2020-11-13 15:02 ` [PATCH v1 01/61] NFSD: Fix returned READDIR offset cookie Chuck Lever
                   ` (60 more replies)
  0 siblings, 61 replies; 70+ messages in thread
From: Chuck Lever @ 2020-11-13 15:02 UTC (permalink / raw)
  To: linux-nfs

The purpose of this series is to convert the NFSD XDR encoder and
decoder functions to use the struct xdr_stream API. This is largely
a refactor/clean-up, but there are some long-term benefits:

- More robust input sanitization in the NFSD decoders
- Ability to use common kernel library functions with XDR stream
  APIs: for example GSS-API
- Align the code itself with the RFCs so it is easier to learn,
  understand, and verify our XDR implementation
- Removal of as much explicit manipulation of pages as possible to
  help make the transition to xdr->bvecs smoother

With this initial posting, I'm starting with just the NFSv4 decoder 
face lift to make it easier to review. However, these posted patches
and more are available in a topic branch in my git repo:

 git://git.linux-nfs.org/projects/cel/cel-2.6.git nfsd-xdr_stream

---

Chuck Lever (61):
      NFSD: Fix returned READDIR offset cookie
      SUNRPC: Add xdr_set_scratch_page() and xdr_reset_scratch_buffer()
      SUNRPC: Prepare for xdr_stream-style decoding on the server-side
      NFSD: Add common helpers to decode void args and encode void results
      NFSD: Replace the internals of the READ_BUF() macro
      NFSD: Replace READ* macros in nfsd4_decode_access()
      NFSD: Replace READ* macros in nfsd4_decode_close()
      NFSD: Replace READ* macros in nfsd4_decode_commit()
      NFSD: Replace READ* macros in nfsd4_decode_create()
      NFSD: Replace READ* macros in nfsd4_decode_bitmap()
      NFSD: Replace READ* macros in nfsd4_decode_link()
      NFSD: Relocate nfsd4_decode_opaque()
      NFSD: Replace READ* macros in nfsd4_decode_lock()
      NFSD: Replace READ* macros in nfsd4_decode_lockt()
      NFSD: Replace READ* macros in nfsd4_decode_locku()
      NFSD: Replace READ* macros in nfsd4_decode_lookup()
      NFSD: Replace READ* macros in nfsd4_decode_time()
      NFSD: Replace READ* macros in nfsd4_decode_fattr()
      NFSD: Replace READ* macros in nfsd4_decode_open()
      NFSD: Replace READ* macros in nfsd4_decode_open_confirm()
      NFSD: Replace READ* macros in nfsd4_decode_open_downgrade()
      NFSD: Replace READ* macros in nfsd4_decode_putfh()
      NFSD: Replace READ* macros in nfsd4_decode_read()
      NFSD: Replace READ* macros in nfsd4_decode_readdir()
      NFSD: Replace READ* macros in nfsd4_decode_remove()
      NFSD: Replace READ* macros in nfsd4_decode_rename()
      NFSD: Replace READ* macros in nfsd4_decode_renew()
      NFSD: Replace READ* macros in nfsd4_decode_secinfo()
      NFSD: Replace READ* macros in nfsd4_decode_setclientid()
      NFSD: Replace READ* macros in nfsd4_decode_setclientid_confirm()
      NFSD: Replace READ* macros in nfsd4_decode_verify()
      NFSD: Replace READ* macros in nfsd4_decode_write()
      NFSD: Replace READ* macros in nfsd4_decode_release_lockowner()
      NFSD: Replace READ* macros in nfsd4_decode_cb_sec()
      NFSD: Replace READ* macros in nfsd4_decode_backchannel_ctl()
      NFSD: Replace READ* macros in nfsd4_decode_bind_conn_to_session()
      NFSD: Add a separate decoder to handle state_protect_ops
      NFSD: Add a separate decoder for ssv_sp_parms
      NFSD: Add a helper to decode state_protect4_a
      NFSD: Replace READ* macros in nfsd4_decode_exchange_id()
      NFSD: Replace READ* macros in nfsd4_decode_create_session()
      NFSD: Replace READ* macros in nfsd4_decode_destroy_session()
      NFSD: Replace READ* macros in nfsd4_decode_free_stateid()
      NFSD: Replace READ* macros in nfsd4_decode_getdeviceinfo()
      NFSD: Replace READ* macros in nfsd4_decode_layoutcommit()
      NFSD: Replace READ* macros in nfsd4_decode_layoutget()
      NFSD: Replace READ* macros in nfsd4_decode_layoutreturn()
      NFSD: Replace READ* macros in nfsd4_decode_secinfo_no_name()
      NFSD: Replace READ* macros in nfsd4_decode_sequence()
      NFSD: Replace READ* macros in nfsd4_decode_test_stateid()
      NFSD: Replace READ* macros in nfsd4_decode_destroy_clientid()
      NFSD: Replace READ* macros in nfsd4_decode_reclaim_complete()
      NFSD: Replace READ* macros in nfsd4_decode_fallocate()
      NFSD: Replace READ* macros in nfsd4_decode_clone()
      NFSD: Replace READ* macros in nfsd4_decode_copy()
      NFSD: Replace READ* macros in nfsd4_decode_seek()
      NFSD: Replace READ* macros in nfsd4_decode_xattr_name()
      NFSD: Replace READ* macros in nfsd4_decode_setxattr()
      NFSD: Replace READ* macros in nfsd4_decode_listxattrs()
      NFSD: Replace READ* macros in nfsd4_decode_compound()
      NFSD: Remove macros that are no longer used


 fs/nfs/blocklayout/blocklayout.c          |    2 +-
 fs/nfs/blocklayout/dev.c                  |    2 +-
 fs/nfs/dir.c                              |    2 +-
 fs/nfs/filelayout/filelayout.c            |    2 +-
 fs/nfs/filelayout/filelayoutdev.c         |    2 +-
 fs/nfs/flexfilelayout/flexfilelayout.c    |    2 +-
 fs/nfs/flexfilelayout/flexfilelayoutdev.c |    2 +-
 fs/nfs/nfs42xdr.c                         |    2 +-
 fs/nfs/nfs4xdr.c                          |    6 +-
 fs/nfsd/nfs2acl.c                         |   21 +-
 fs/nfsd/nfs3acl.c                         |    8 +-
 fs/nfsd/nfs3proc.c                        |   10 +-
 fs/nfsd/nfs3xdr.c                         |   11 -
 fs/nfsd/nfs4proc.c                        |   24 +-
 fs/nfsd/nfs4state.c                       |    2 +-
 fs/nfsd/nfs4xdr.c                         | 2253 +++++++++++----------
 fs/nfsd/nfsd.h                            |    8 +
 fs/nfsd/nfsproc.c                         |   25 +-
 fs/nfsd/nfssvc.c                          |   27 +-
 fs/nfsd/nfsxdr.c                          |   10 -
 fs/nfsd/xdr.h                             |    2 -
 fs/nfsd/xdr3.h                            |    2 -
 fs/nfsd/xdr4.h                            |   28 +-
 include/linux/sunrpc/svc.h                |   16 +
 include/linux/sunrpc/xdr.h                |   71 +-
 include/uapi/linux/nfs4.h                 |    1 +
 net/sunrpc/auth_gss/gss_rpc_xdr.c         |    2 +-
 net/sunrpc/svc.c                          |    5 +
 net/sunrpc/xdr.c                          |   72 +-
 29 files changed, 1451 insertions(+), 1169 deletions(-)

--
Chuck Lever


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

end of thread, back to index

Thread overview: 70+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-13 15:02 [PATCH v1 00/61] Update NFSD XDR functions Chuck Lever
2020-11-13 15:02 ` [PATCH v1 01/61] NFSD: Fix returned READDIR offset cookie Chuck Lever
2020-11-13 15:02 ` [PATCH v1 02/61] SUNRPC: Add xdr_set_scratch_page() and xdr_reset_scratch_buffer() Chuck Lever
2020-11-13 15:02 ` [PATCH v1 03/61] SUNRPC: Prepare for xdr_stream-style decoding on the server-side Chuck Lever
2020-11-13 15:02 ` [PATCH v1 04/61] NFSD: Add common helpers to decode void args and encode void results Chuck Lever
2020-11-13 15:02 ` [PATCH v1 05/61] NFSD: Replace the internals of the READ_BUF() macro Chuck Lever
2020-11-13 15:02 ` [PATCH v1 06/61] NFSD: Replace READ* macros in nfsd4_decode_access() Chuck Lever
2020-11-14  9:28   ` Christoph Hellwig
2020-11-14 18:26     ` Chuck Lever
2020-11-14 18:45       ` Christoph Hellwig
2020-11-14 18:48         ` Chuck Lever
2020-11-14 18:49           ` Christoph Hellwig
2020-11-13 15:03 ` [PATCH v1 07/61] NFSD: Replace READ* macros in nfsd4_decode_close() Chuck Lever
2020-11-14  9:29   ` Christoph Hellwig
2020-11-14 18:30     ` Chuck Lever
2020-11-14 18:47       ` Christoph Hellwig
2020-11-13 15:03 ` [PATCH v1 08/61] NFSD: Replace READ* macros in nfsd4_decode_commit() Chuck Lever
2020-11-13 15:03 ` [PATCH v1 09/61] NFSD: Replace READ* macros in nfsd4_decode_create() Chuck Lever
2020-11-13 15:03 ` [PATCH v1 10/61] NFSD: Replace READ* macros in nfsd4_decode_bitmap() Chuck Lever
2020-11-13 15:03 ` [PATCH v1 11/61] NFSD: Replace READ* macros in nfsd4_decode_link() Chuck Lever
2020-11-13 15:03 ` [PATCH v1 12/61] NFSD: Relocate nfsd4_decode_opaque() Chuck Lever
2020-11-13 15:03 ` [PATCH v1 13/61] NFSD: Replace READ* macros in nfsd4_decode_lock() Chuck Lever
2020-11-13 15:03 ` [PATCH v1 14/61] NFSD: Replace READ* macros in nfsd4_decode_lockt() Chuck Lever
2020-11-13 15:03 ` [PATCH v1 15/61] NFSD: Replace READ* macros in nfsd4_decode_locku() Chuck Lever
2020-11-13 15:03 ` [PATCH v1 16/61] NFSD: Replace READ* macros in nfsd4_decode_lookup() Chuck Lever
2020-11-13 15:03 ` [PATCH v1 17/61] NFSD: Replace READ* macros in nfsd4_decode_time() Chuck Lever
2020-11-13 15:03 ` [PATCH v1 18/61] NFSD: Replace READ* macros in nfsd4_decode_fattr() Chuck Lever
2020-11-13 15:04 ` [PATCH v1 19/61] NFSD: Replace READ* macros in nfsd4_decode_open() Chuck Lever
2020-11-13 15:04 ` [PATCH v1 20/61] NFSD: Replace READ* macros in nfsd4_decode_open_confirm() Chuck Lever
2020-11-13 15:04 ` [PATCH v1 21/61] NFSD: Replace READ* macros in nfsd4_decode_open_downgrade() Chuck Lever
2020-11-13 15:04 ` [PATCH v1 22/61] NFSD: Replace READ* macros in nfsd4_decode_putfh() Chuck Lever
2020-11-13 15:04 ` [PATCH v1 23/61] NFSD: Replace READ* macros in nfsd4_decode_read() Chuck Lever
2020-11-13 15:04 ` [PATCH v1 24/61] NFSD: Replace READ* macros in nfsd4_decode_readdir() Chuck Lever
2020-11-13 15:04 ` [PATCH v1 25/61] NFSD: Replace READ* macros in nfsd4_decode_remove() Chuck Lever
2020-11-13 15:04 ` [PATCH v1 26/61] NFSD: Replace READ* macros in nfsd4_decode_rename() Chuck Lever
2020-11-13 15:04 ` [PATCH v1 27/61] NFSD: Replace READ* macros in nfsd4_decode_renew() Chuck Lever
2020-11-13 15:04 ` [PATCH v1 28/61] NFSD: Replace READ* macros in nfsd4_decode_secinfo() Chuck Lever
2020-11-13 15:04 ` [PATCH v1 29/61] NFSD: Replace READ* macros in nfsd4_decode_setclientid() Chuck Lever
2020-11-13 15:05 ` [PATCH v1 30/61] NFSD: Replace READ* macros in nfsd4_decode_setclientid_confirm() Chuck Lever
2020-11-13 15:05 ` [PATCH v1 31/61] NFSD: Replace READ* macros in nfsd4_decode_verify() Chuck Lever
2020-11-13 15:05 ` [PATCH v1 32/61] NFSD: Replace READ* macros in nfsd4_decode_write() Chuck Lever
2020-11-13 15:05 ` [PATCH v1 33/61] NFSD: Replace READ* macros in nfsd4_decode_release_lockowner() Chuck Lever
2020-11-13 15:05 ` [PATCH v1 34/61] NFSD: Replace READ* macros in nfsd4_decode_cb_sec() Chuck Lever
2020-11-13 15:05 ` [PATCH v1 35/61] NFSD: Replace READ* macros in nfsd4_decode_backchannel_ctl() Chuck Lever
2020-11-13 15:05 ` [PATCH v1 36/61] NFSD: Replace READ* macros in nfsd4_decode_bind_conn_to_session() Chuck Lever
2020-11-13 15:05 ` [PATCH v1 37/61] NFSD: Add a separate decoder to handle state_protect_ops Chuck Lever
2020-11-13 15:05 ` [PATCH v1 38/61] NFSD: Add a separate decoder for ssv_sp_parms Chuck Lever
2020-11-13 15:05 ` [PATCH v1 39/61] NFSD: Add a helper to decode state_protect4_a Chuck Lever
2020-11-13 15:05 ` [PATCH v1 40/61] NFSD: Replace READ* macros in nfsd4_decode_exchange_id() Chuck Lever
2020-11-13 15:05 ` [PATCH v1 41/61] NFSD: Replace READ* macros in nfsd4_decode_create_session() Chuck Lever
2020-11-13 15:06 ` [PATCH v1 42/61] NFSD: Replace READ* macros in nfsd4_decode_destroy_session() Chuck Lever
2020-11-13 15:06 ` [PATCH v1 43/61] NFSD: Replace READ* macros in nfsd4_decode_free_stateid() Chuck Lever
2020-11-13 15:06 ` [PATCH v1 44/61] NFSD: Replace READ* macros in nfsd4_decode_getdeviceinfo() Chuck Lever
2020-11-13 15:06 ` [PATCH v1 45/61] NFSD: Replace READ* macros in nfsd4_decode_layoutcommit() Chuck Lever
2020-11-13 15:06 ` [PATCH v1 46/61] NFSD: Replace READ* macros in nfsd4_decode_layoutget() Chuck Lever
2020-11-13 15:06 ` [PATCH v1 47/61] NFSD: Replace READ* macros in nfsd4_decode_layoutreturn() Chuck Lever
2020-11-13 15:06 ` [PATCH v1 48/61] NFSD: Replace READ* macros in nfsd4_decode_secinfo_no_name() Chuck Lever
2020-11-13 15:06 ` [PATCH v1 49/61] NFSD: Replace READ* macros in nfsd4_decode_sequence() Chuck Lever
2020-11-13 15:06 ` [PATCH v1 50/61] NFSD: Replace READ* macros in nfsd4_decode_test_stateid() Chuck Lever
2020-11-13 15:06 ` [PATCH v1 51/61] NFSD: Replace READ* macros in nfsd4_decode_destroy_clientid() Chuck Lever
2020-11-13 15:06 ` [PATCH v1 52/61] NFSD: Replace READ* macros in nfsd4_decode_reclaim_complete() Chuck Lever
2020-11-13 15:07 ` [PATCH v1 53/61] NFSD: Replace READ* macros in nfsd4_decode_fallocate() Chuck Lever
2020-11-13 15:07 ` [PATCH v1 54/61] NFSD: Replace READ* macros in nfsd4_decode_clone() Chuck Lever
2020-11-13 15:07 ` [PATCH v1 55/61] NFSD: Replace READ* macros in nfsd4_decode_copy() Chuck Lever
2020-11-13 15:07 ` [PATCH v1 56/61] NFSD: Replace READ* macros in nfsd4_decode_seek() Chuck Lever
2020-11-13 15:07 ` [PATCH v1 57/61] NFSD: Replace READ* macros in nfsd4_decode_xattr_name() Chuck Lever
2020-11-13 15:07 ` [PATCH v1 58/61] NFSD: Replace READ* macros in nfsd4_decode_setxattr() Chuck Lever
2020-11-13 15:07 ` [PATCH v1 59/61] NFSD: Replace READ* macros in nfsd4_decode_listxattrs() Chuck Lever
2020-11-13 15:07 ` [PATCH v1 60/61] NFSD: Replace READ* macros in nfsd4_decode_compound() Chuck Lever
2020-11-13 15:07 ` [PATCH v1 61/61] NFSD: Remove macros that are no longer used Chuck Lever

Linux-NFS Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-nfs/0 linux-nfs/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-nfs linux-nfs/ https://lore.kernel.org/linux-nfs \
		linux-nfs@vger.kernel.org
	public-inbox-index linux-nfs

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-nfs


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git