From: Jeff Layton <jlayton@primarydata.com>
To: trond.myklebust@primarydata.com
Cc: bfields@fieldses.org, linux-nfs@vger.kernel.org
Subject: [PATCH 7/7] sunrpc: remove "ec" argument from encrypt_v2 operation
Date: Sun, 13 Jul 2014 21:57:44 -0400 [thread overview]
Message-ID: <1405303064-9102-8-git-send-email-jlayton@primarydata.com> (raw)
In-Reply-To: <1405303064-9102-1-git-send-email-jlayton@primarydata.com>
It's always 0.
Signed-off-by: Jeff Layton <jlayton@primarydata.com>
---
include/linux/sunrpc/gss_krb5.h | 4 ++--
net/sunrpc/auth_gss/gss_krb5_crypto.c | 9 ++-------
net/sunrpc/auth_gss/gss_krb5_wrap.c | 2 +-
3 files changed, 5 insertions(+), 10 deletions(-)
diff --git a/include/linux/sunrpc/gss_krb5.h b/include/linux/sunrpc/gss_krb5.h
index 5af2931cf58d..df02a4188487 100644
--- a/include/linux/sunrpc/gss_krb5.h
+++ b/include/linux/sunrpc/gss_krb5.h
@@ -81,7 +81,7 @@ struct gss_krb5_enctype {
struct xdr_netobj *in,
struct xdr_netobj *out); /* complete key generation */
u32 (*encrypt_v2) (struct krb5_ctx *kctx, u32 offset,
- struct xdr_buf *buf, int ec,
+ struct xdr_buf *buf,
struct page **pages); /* v2 encryption function */
u32 (*decrypt_v2) (struct krb5_ctx *kctx, u32 offset,
struct xdr_buf *buf, u32 *headskip,
@@ -310,7 +310,7 @@ gss_krb5_aes_make_key(const struct gss_krb5_enctype *gk5e,
u32
gss_krb5_aes_encrypt(struct krb5_ctx *kctx, u32 offset,
- struct xdr_buf *buf, int ec,
+ struct xdr_buf *buf,
struct page **pages);
u32
diff --git a/net/sunrpc/auth_gss/gss_krb5_crypto.c b/net/sunrpc/auth_gss/gss_krb5_crypto.c
index 0f43e894bc0a..f5ed9f6ece06 100644
--- a/net/sunrpc/auth_gss/gss_krb5_crypto.c
+++ b/net/sunrpc/auth_gss/gss_krb5_crypto.c
@@ -641,7 +641,7 @@ out:
u32
gss_krb5_aes_encrypt(struct krb5_ctx *kctx, u32 offset,
- struct xdr_buf *buf, int ec, struct page **pages)
+ struct xdr_buf *buf, struct page **pages)
{
u32 err;
struct xdr_netobj hmac;
@@ -684,13 +684,8 @@ gss_krb5_aes_encrypt(struct krb5_ctx *kctx, u32 offset,
ecptr = buf->tail[0].iov_base;
}
- memset(ecptr, 'X', ec);
- buf->tail[0].iov_len += ec;
- buf->len += ec;
-
/* copy plaintext gss token header after filler (if any) */
- memcpy(ecptr + ec, buf->head[0].iov_base + offset,
- GSS_KRB5_TOK_HDR_LEN);
+ memcpy(ecptr, buf->head[0].iov_base + offset, GSS_KRB5_TOK_HDR_LEN);
buf->tail[0].iov_len += GSS_KRB5_TOK_HDR_LEN;
buf->len += GSS_KRB5_TOK_HDR_LEN;
diff --git a/net/sunrpc/auth_gss/gss_krb5_wrap.c b/net/sunrpc/auth_gss/gss_krb5_wrap.c
index c5cc0270a334..ccc10321d87d 100644
--- a/net/sunrpc/auth_gss/gss_krb5_wrap.c
+++ b/net/sunrpc/auth_gss/gss_krb5_wrap.c
@@ -477,7 +477,7 @@ gss_wrap_kerberos_v2(struct krb5_ctx *kctx, u32 offset,
*be64ptr = cpu_to_be64(kctx->seq_send64++);
spin_unlock(&krb5_seq_lock);
- err = (*kctx->gk5e->encrypt_v2)(kctx, offset, buf, 0, pages);
+ err = (*kctx->gk5e->encrypt_v2)(kctx, offset, buf, pages);
if (err)
return err;
--
1.9.3
next prev parent reply other threads:[~2014-07-14 1:58 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-07-14 1:57 [PATCH 0/7] sunrpc: sparse warning cleanups Jeff Layton
2014-07-14 1:57 ` [PATCH 1/7] sunrpc: remove __rcu annotation from struct gss_cl_ctx->gc_gss_ctx Jeff Layton
2014-07-14 14:23 ` Arnd Bergmann
2014-07-14 15:02 ` Jeff Layton
2014-07-14 15:29 ` Arnd Bergmann
2014-07-14 1:57 ` [PATCH 2/7] sunrpc: fix RCU handling of gc_ctx field Jeff Layton
2014-07-14 1:57 ` [PATCH 3/7] sunrpc: clean up endianness warnings in setup_token Jeff Layton
2014-07-15 17:08 ` Christoph Hellwig
2014-07-15 17:32 ` Jeff Layton
2014-07-14 1:57 ` [PATCH 4/7] sunrpc: xdr_get_next_encode_buffer can be static Jeff Layton
2014-07-15 17:02 ` Christoph Hellwig
2014-07-15 17:17 ` Jeff Layton
2014-07-14 1:57 ` [PATCH 5/7] sunrpc: clean up sparse endianness warnings in gss_krb5_seal.c Jeff Layton
2014-07-15 17:03 ` Christoph Hellwig
2014-07-14 1:57 ` [PATCH 6/7] sunrpc: clean up sparse endianness warnings in gss_krb5_wrap.c Jeff Layton
2014-07-15 17:04 ` Christoph Hellwig
2014-07-15 17:36 ` Jeff Layton
2014-07-16 8:13 ` Christoph Hellwig
2014-07-14 1:57 ` Jeff Layton [this message]
2014-07-15 17:05 ` [PATCH 7/7] sunrpc: remove "ec" argument from encrypt_v2 operation Christoph Hellwig
2014-07-15 17:33 ` Jeff Layton
2014-07-16 10:52 ` [PATCH v2 0/5] sunrpc: sparse warning cleanups Jeff Layton
2014-07-16 10:52 ` [PATCH v2 1/5] sunrpc: remove __rcu annotation from struct gss_cl_ctx->gc_gss_ctx Jeff Layton
2014-07-16 10:52 ` [PATCH v2 2/5] sunrpc: fix RCU handling of gc_ctx field Jeff Layton
2014-07-16 10:52 ` [PATCH v2 3/5] sunrpc: clean up sparse endianness warnings in gss_krb5_seal.c Jeff Layton
2014-07-16 10:52 ` [PATCH v2 4/5] sunrpc: clean up sparse endianness warnings in gss_krb5_wrap.c Jeff Layton
2014-07-16 10:52 ` [PATCH v2 5/5] sunrpc: remove "ec" argument from encrypt_v2 operation Jeff Layton
2014-07-30 17:56 ` [PATCH v2 0/5] sunrpc: sparse warning cleanups Jeff Layton
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1405303064-9102-8-git-send-email-jlayton@primarydata.com \
--to=jlayton@primarydata.com \
--cc=bfields@fieldses.org \
--cc=linux-nfs@vger.kernel.org \
--cc=trond.myklebust@primarydata.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).