From: Sebastian Andrzej Siewior <sebastian@breakpoint.cc>
To: Herbert Xu <herbert@gondor.apana.org.au>
Cc: Sebastian Andrzej Siewior <sebastian@breakpoint.cc>,
Roel Kluin <roel.kluin@gmail.com>,
"David S. Miller" <davem@davemloft.net>,
linux-crypto@vger.kernel.org,
Andrew Morton <akpm@linux-foundation.org>,
LKML <linux-kernel@vger.kernel.org>,
Sergey Mironov <ierton@gmail.com>,
Martin Schwidefsky <schwidefsky@de.ibm.com>
Subject: [PATCH 1/2] crypto/s390_aes: access .cip instead of .blk in cipher mode
Date: Thu, 7 Jan 2010 22:16:18 +0100 [thread overview]
Message-ID: <20100107211618.GA20258@Chamillionaire.breakpoint.cc> (raw)
In-Reply-To: <20100107005028.GA32421@gondor.apana.org.au>
>From aff6860829e06f8f7ba5f4a8160a6612e1a6eca7 Mon Sep 17 00:00:00 2001
From: Roel Kluin <roel.kluin@gmail.com>
Date: Thu, 7 Jan 2010 21:55:50 +0100
The fallback code in cipher mode touch the union fallback.blk instead
of fallback.cip. This is wrong because we use the cipher and not the
blockcipher. This did not show any side effects yet because both types /
structs contain the same element right now.
[bigeasy@breakpoint: different commit message, split the patch in two and
rebase ]
Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Signed-off-by: Sebastian Andrzej Siewior <sebastian@breakpoint.cc>
---
arch/s390/crypto/aes_s390.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/arch/s390/crypto/aes_s390.c b/arch/s390/crypto/aes_s390.c
index 6be4503..58f4673 100644
--- a/arch/s390/crypto/aes_s390.c
+++ b/arch/s390/crypto/aes_s390.c
@@ -78,14 +78,14 @@ static int setkey_fallback_cip(struct crypto_tfm *tfm, const u8 *in_key,
struct s390_aes_ctx *sctx = crypto_tfm_ctx(tfm);
int ret;
- sctx->fallback.blk->base.crt_flags &= ~CRYPTO_TFM_REQ_MASK;
- sctx->fallback.blk->base.crt_flags |= (tfm->crt_flags &
+ sctx->fallback.cip->base.crt_flags &= ~CRYPTO_TFM_REQ_MASK;
+ sctx->fallback.cip->base.crt_flags |= (tfm->crt_flags &
CRYPTO_TFM_REQ_MASK);
ret = crypto_cipher_setkey(sctx->fallback.cip, in_key, key_len);
if (ret) {
tfm->crt_flags &= ~CRYPTO_TFM_RES_MASK;
- tfm->crt_flags |= (sctx->fallback.blk->base.crt_flags &
+ tfm->crt_flags |= (sctx->fallback.cip->base.crt_flags &
CRYPTO_TFM_RES_MASK);
}
return ret;
--
1.6.6
next prev parent reply other threads:[~2010-01-07 21:16 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-12-07 13:28 [PATCH] geode: PTR_ERR return of wrong pointer in fallback_init_cip() Roel Kluin
2009-12-07 13:40 ` Sebastian Andrzej Siewior
2009-12-07 14:14 ` Roel Kluin
2009-12-11 15:03 ` Herbert Xu
2010-01-06 18:07 ` Sebastian Andrzej Siewior
2010-01-07 0:50 ` Herbert Xu
2010-01-07 21:16 ` Sebastian Andrzej Siewior [this message]
2010-01-07 21:17 ` [PATCH 2/2] crypto/geode_aes: access .cip instead of .blk in cipher mode Sebastian Andrzej Siewior
2010-01-08 3:19 ` Herbert Xu
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=20100107211618.GA20258@Chamillionaire.breakpoint.cc \
--to=sebastian@breakpoint.cc \
--cc=akpm@linux-foundation.org \
--cc=davem@davemloft.net \
--cc=herbert@gondor.apana.org.au \
--cc=ierton@gmail.com \
--cc=linux-crypto@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=roel.kluin@gmail.com \
--cc=schwidefsky@de.ibm.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