提交 d162372a 编写于 作者: C Chuck Lever 提交者: Trond Myklebust

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: NChuck Lever <chuck.lever@oracle.com>
Signed-off-by: NTrond Myklebust <trond.myklebust@hammerspace.com>
上级 8d6bda7f
...@@ -1724,8 +1724,9 @@ gss_validate(struct rpc_task *task, struct xdr_stream *xdr) ...@@ -1724,8 +1724,9 @@ gss_validate(struct rpc_task *task, struct xdr_stream *xdr)
goto out; goto out;
} }
static int gss_wrap_req_integ(struct rpc_cred *cred, struct gss_cl_ctx *ctx, static noinline_for_stack int
struct rpc_task *task, struct xdr_stream *xdr) 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; struct rpc_rqst *rqstp = task->tk_rqstp;
struct xdr_buf integ_buf, *snd_buf = &rqstp->rq_snd_buf; struct xdr_buf integ_buf, *snd_buf = &rqstp->rq_snd_buf;
...@@ -1816,8 +1817,9 @@ alloc_enc_pages(struct rpc_rqst *rqstp) ...@@ -1816,8 +1817,9 @@ alloc_enc_pages(struct rpc_rqst *rqstp)
return -EAGAIN; return -EAGAIN;
} }
static int gss_wrap_req_priv(struct rpc_cred *cred, struct gss_cl_ctx *ctx, static noinline_for_stack int
struct rpc_task *task, struct xdr_stream *xdr) 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; struct rpc_rqst *rqstp = task->tk_rqstp;
struct xdr_buf *snd_buf = &rqstp->rq_snd_buf; struct xdr_buf *snd_buf = &rqstp->rq_snd_buf;
...@@ -1947,7 +1949,7 @@ gss_unwrap_resp_auth(struct rpc_cred *cred) ...@@ -1947,7 +1949,7 @@ gss_unwrap_resp_auth(struct rpc_cred *cred)
* proc_req_arg_t arg; * proc_req_arg_t arg;
* }; * };
*/ */
static int static noinline_for_stack int
gss_unwrap_resp_integ(struct rpc_task *task, struct rpc_cred *cred, gss_unwrap_resp_integ(struct rpc_task *task, struct rpc_cred *cred,
struct gss_cl_ctx *ctx, struct rpc_rqst *rqstp, struct gss_cl_ctx *ctx, struct rpc_rqst *rqstp,
struct xdr_stream *xdr) struct xdr_stream *xdr)
...@@ -2021,7 +2023,7 @@ gss_unwrap_resp_integ(struct rpc_task *task, struct rpc_cred *cred, ...@@ -2021,7 +2023,7 @@ gss_unwrap_resp_integ(struct rpc_task *task, struct rpc_cred *cred,
goto out; goto out;
} }
static int static noinline_for_stack int
gss_unwrap_resp_priv(struct rpc_task *task, struct rpc_cred *cred, gss_unwrap_resp_priv(struct rpc_task *task, struct rpc_cred *cred,
struct gss_cl_ctx *ctx, struct rpc_rqst *rqstp, struct gss_cl_ctx *ctx, struct rpc_rqst *rqstp,
struct xdr_stream *xdr) struct xdr_stream *xdr)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册