Commit d162372a authored by Chuck Lever's avatar Chuck Lever Committed by Trond Myklebust
Browse files

SUNRPC: Trim stack utilization in the wrap and unwrap paths



By preventing compiler inlining of the integrity and privacy
helpers, stack utilization for the common case (authentication only)
goes way down.

Signed-off-by: default avatarChuck Lever <chuck.lever@oracle.com>
Signed-off-by: default avatarTrond Myklebust <trond.myklebust@hammerspace.com>
parent 8d6bda7f
Loading
Loading
Loading
Loading
+8 −6
Original line number Diff line number Diff line
@@ -1724,7 +1724,8 @@ bad_mic:
	goto out;
}

static int gss_wrap_req_integ(struct rpc_cred *cred, struct gss_cl_ctx *ctx,
static noinline_for_stack int
gss_wrap_req_integ(struct rpc_cred *cred, struct gss_cl_ctx *ctx,
		   struct rpc_task *task, struct xdr_stream *xdr)
{
	struct rpc_rqst *rqstp = task->tk_rqstp;
@@ -1816,7 +1817,8 @@ out:
	return -EAGAIN;
}

static int gss_wrap_req_priv(struct rpc_cred *cred, struct gss_cl_ctx *ctx,
static noinline_for_stack int
gss_wrap_req_priv(struct rpc_cred *cred, struct gss_cl_ctx *ctx,
		  struct rpc_task *task, struct xdr_stream *xdr)
{
	struct rpc_rqst *rqstp = task->tk_rqstp;
@@ -1947,7 +1949,7 @@ gss_unwrap_resp_auth(struct rpc_cred *cred)
 *		proc_req_arg_t arg;
 *	};
 */
static int
static noinline_for_stack int
gss_unwrap_resp_integ(struct rpc_task *task, struct rpc_cred *cred,
		      struct gss_cl_ctx *ctx, struct rpc_rqst *rqstp,
		      struct xdr_stream *xdr)
@@ -2021,7 +2023,7 @@ bad_mic:
	goto out;
}

static int
static noinline_for_stack int
gss_unwrap_resp_priv(struct rpc_task *task, struct rpc_cred *cred,
		     struct gss_cl_ctx *ctx, struct rpc_rqst *rqstp,
		     struct xdr_stream *xdr)