Linux NFS development
 help / color / mirror / Atom feed
* [PATCH v1 00/27] Server-side RPC reply header parsing overhaul
@ 2023-01-08 16:28 Chuck Lever
  2023-01-08 16:28 ` [PATCH v1 01/27] SUNRPC: Clean up svcauth_gss_release() Chuck Lever
                   ` (27 more replies)
  0 siblings, 28 replies; 39+ messages in thread
From: Chuck Lever @ 2023-01-08 16:28 UTC (permalink / raw)
  To: linux-nfs

The purpose of this series is to replace the svc_put* macros in the
Linux kernel server's RPC reply header construction code with
xdr_stream helpers. I've measured no change in CPU utilization after
the overhaul.

Memory safety: Buffer bounds checking after encoding each XDR item
is more memory-safe than the current mechanism. Subsequent memory
safety improvements to the common xdr_stream helpers will benefit
all who use them.

Audit friendliness: The new code has additional comments and other
clean-up to help align it with the relevant RPC protocol
specifications. The use of common helpers also makes the encoders
easier to audit and maintain.

I've split the full series in half to make it easier to review. The
patches posted here are the second half, handling RPC reply header
encoding.

Note that another benefit of this work is that we are taking one or
two more strides closer to greater commonality between the client
and server implementations of RPCSEC GSS.

---

Chuck Lever (27):
      SUNRPC: Clean up svcauth_gss_release()
      SUNRPC: Rename automatic variables in svcauth_gss_wrap_resp_integ()
      SUNRPC: Record gss_get_mic() errors in svcauth_gss_wrap_integ()
      SUNRPC: Replace checksum construction in svcauth_gss_wrap_integ()
      SUNRPC: Convert svcauth_gss_wrap_integ() to use xdr_stream()
      SUNRPC: Rename automatic variables in svcauth_gss_wrap_resp_priv()
      SUNRPC: Record gss_wrap() errors in svcauth_gss_wrap_priv()
      SUNRPC: Add @head and @tail variables in svcauth_gss_wrap_priv()
      SUNRPC: Convert svcauth_gss_wrap_priv() to use xdr_stream()
      SUNRPC: Check rq_auth_stat when preparing to wrap a response
      SUNRPC: Remove the rpc_stat variable in svc_process_common()
      SUNRPC: Add XDR encoding helper for opaque_auth
      SUNRPC: Push svcxdr_init_encode() into svc_process_common()
      SUNRPC: Move svcxdr_init_encode() into ->accept methods
      SUNRPC: Use xdr_stream to encode Reply verifier in svcauth_null_accept()
      SUNRPC: Use xdr_stream to encode Reply verifier in svcauth_unix_accept()
      SUNRPC: Use xdr_stream to encode Reply verifier in svcauth_tls_accept()
      SUNRPC: Convert unwrap data paths to use xdr_stream for replies
      SUNRPC: Use xdr_stream to encode replies in server-side GSS upcall helpers
      SUNRPC: Use xdr_stream for encoding GSS reply verifiers
      SUNRPC: Hoist init_encode out of svc_authenticate()
      SUNRPC: Convert RPC Reply header encoding to use xdr_stream
      SUNRPC: Final clean-up of svc_process_common()
      SUNRPC: Remove no-longer-used helper functions
      SUNRPC: Refactor RPC server dispatch method
      SUNRPC: Set rq_accept_statp inside ->accept methods
      SUNRPC: Go back to using gsd->body_start


 fs/lockd/svc.c                    |   5 +-
 fs/nfs/callback_xdr.c             |   6 +-
 fs/nfsd/nfscache.c                |   4 +-
 fs/nfsd/nfsd.h                    |   2 +-
 fs/nfsd/nfssvc.c                  |  10 +-
 include/linux/sunrpc/svc.h        | 116 +++----
 include/linux/sunrpc/xdr.h        |  23 ++
 include/trace/events/rpcgss.h     |  22 ++
 net/sunrpc/auth_gss/svcauth_gss.c | 505 +++++++++++++++---------------
 net/sunrpc/svc.c                  |  91 +++---
 net/sunrpc/svcauth_unix.c         |  40 ++-
 net/sunrpc/xdr.c                  |  29 ++
 12 files changed, 451 insertions(+), 402 deletions(-)

--
Chuck Lever


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

end of thread, other threads:[~2023-05-16 22:28 UTC | newest]

Thread overview: 39+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-01-08 16:28 [PATCH v1 00/27] Server-side RPC reply header parsing overhaul Chuck Lever
2023-01-08 16:28 ` [PATCH v1 01/27] SUNRPC: Clean up svcauth_gss_release() Chuck Lever
2023-01-10 14:01   ` Jeff Layton
2023-01-08 16:28 ` [PATCH v1 02/27] SUNRPC: Rename automatic variables in svcauth_gss_wrap_resp_integ() Chuck Lever
2023-01-08 16:28 ` [PATCH v1 03/27] SUNRPC: Record gss_get_mic() errors in svcauth_gss_wrap_integ() Chuck Lever
2023-01-08 16:28 ` [PATCH v1 04/27] SUNRPC: Replace checksum construction " Chuck Lever
2023-01-08 16:28 ` [PATCH v1 05/27] SUNRPC: Convert svcauth_gss_wrap_integ() to use xdr_stream() Chuck Lever
2023-01-08 16:29 ` [PATCH v1 06/27] SUNRPC: Rename automatic variables in svcauth_gss_wrap_resp_priv() Chuck Lever
2023-01-08 16:29 ` [PATCH v1 07/27] SUNRPC: Record gss_wrap() errors in svcauth_gss_wrap_priv() Chuck Lever
2023-01-08 16:29 ` [PATCH v1 08/27] SUNRPC: Add @head and @tail variables " Chuck Lever
2023-01-08 16:29 ` [PATCH v1 09/27] SUNRPC: Convert svcauth_gss_wrap_priv() to use xdr_stream() Chuck Lever
2023-01-08 16:29 ` [PATCH v1 10/27] SUNRPC: Check rq_auth_stat when preparing to wrap a response Chuck Lever
2023-01-08 16:29 ` [PATCH v1 11/27] SUNRPC: Remove the rpc_stat variable in svc_process_common() Chuck Lever
2023-01-08 16:29 ` [PATCH v1 12/27] SUNRPC: Add XDR encoding helper for opaque_auth Chuck Lever
2023-01-08 16:29 ` [PATCH v1 13/27] SUNRPC: Push svcxdr_init_encode() into svc_process_common() Chuck Lever
2023-01-08 16:29 ` [PATCH v1 14/27] SUNRPC: Move svcxdr_init_encode() into ->accept methods Chuck Lever
2023-01-08 16:29 ` [PATCH v1 15/27] SUNRPC: Use xdr_stream to encode Reply verifier in svcauth_null_accept() Chuck Lever
2023-01-08 16:30 ` [PATCH v1 16/27] SUNRPC: Use xdr_stream to encode Reply verifier in svcauth_unix_accept() Chuck Lever
2023-01-08 16:30 ` [PATCH v1 17/27] SUNRPC: Use xdr_stream to encode Reply verifier in svcauth_tls_accept() Chuck Lever
2023-01-08 16:30 ` [PATCH v1 18/27] SUNRPC: Convert unwrap data paths to use xdr_stream for replies Chuck Lever
2023-01-08 16:30 ` [PATCH v1 19/27] SUNRPC: Use xdr_stream to encode replies in server-side GSS upcall helpers Chuck Lever
2023-01-08 16:30 ` [PATCH v1 20/27] SUNRPC: Use xdr_stream for encoding GSS reply verifiers Chuck Lever
2023-01-08 16:30 ` [PATCH v1 21/27] SUNRPC: Hoist init_encode out of svc_authenticate() Chuck Lever
2023-01-08 16:30 ` [PATCH v1 22/27] SUNRPC: Convert RPC Reply header encoding to use xdr_stream Chuck Lever
2023-01-08 16:30 ` [PATCH v1 23/27] SUNRPC: Final clean-up of svc_process_common() Chuck Lever
2023-01-08 16:30 ` [PATCH v1 24/27] SUNRPC: Remove no-longer-used helper functions Chuck Lever
2023-01-08 16:30 ` [PATCH v1 25/27] SUNRPC: Refactor RPC server dispatch method Chuck Lever
2023-01-08 16:31 ` [PATCH v1 26/27] SUNRPC: Set rq_accept_statp inside ->accept methods Chuck Lever
2023-05-02 11:01   ` Jiri Slaby
2023-05-02 14:14     ` Chuck Lever III
2023-05-02 21:29       ` NeilBrown
2023-05-16 19:23       ` Jeff Layton
2023-05-16 19:25         ` Chuck Lever III
2023-05-16 21:25           ` Jeff Layton
2023-05-16 21:27             ` Chuck Lever III
2023-05-16 22:28               ` Jeff Layton
2023-01-08 16:31 ` [PATCH v1 27/27] SUNRPC: Go back to using gsd->body_start Chuck Lever
2023-01-10 14:53 ` [PATCH v1 00/27] Server-side RPC reply header parsing overhaul Jeff Layton
2023-01-10 15:16   ` Chuck Lever III

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox