* [PATCH] geode: Fix cip/blk confusion
@ 2010-01-29 13:32 Roel Kluin
2010-01-29 14:51 ` Sebastian Andrzej Siewior
0 siblings, 1 reply; 6+ messages in thread
From: Roel Kluin @ 2010-01-29 13:32 UTC (permalink / raw)
To: Herbert Xu, Sebastian Andrzej Siewior, David S. Miller,
linux-crypto, Andrew Morton, LKML, Sergey Mironov,
Martin Schwidefsky
crypto_cipher cip members were set where crypto_cipher blk members should
have been, also the PTR_ERR of the wrong pointer was returned.
Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
---
This was already discussed in december/januari but I still cannot find it in
mainline, was it lost?
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;
diff --git a/drivers/crypto/geode-aes.c b/drivers/crypto/geode-aes.c
index 4801162..c7a5a43 100644
--- a/drivers/crypto/geode-aes.c
+++ b/drivers/crypto/geode-aes.c
@@ -135,13 +135,13 @@ static int geode_setkey_cip(struct crypto_tfm *tfm, const u8 *key,
/*
* The requested key size is not supported by HW, do a fallback
*/
- op->fallback.blk->base.crt_flags &= ~CRYPTO_TFM_REQ_MASK;
- op->fallback.blk->base.crt_flags |= (tfm->crt_flags & CRYPTO_TFM_REQ_MASK);
+ op->fallback.cip->base.crt_flags &= ~CRYPTO_TFM_REQ_MASK;
+ op->fallback.cip->base.crt_flags |= (tfm->crt_flags & CRYPTO_TFM_REQ_MASK);
ret = crypto_cipher_setkey(op->fallback.cip, key, len);
if (ret) {
tfm->crt_flags &= ~CRYPTO_TFM_RES_MASK;
- tfm->crt_flags |= (op->fallback.blk->base.crt_flags & CRYPTO_TFM_RES_MASK);
+ tfm->crt_flags |= (op->fallback.cip->base.crt_flags & CRYPTO_TFM_RES_MASK);
}
return ret;
}
@@ -263,7 +263,7 @@ static int fallback_init_cip(struct crypto_tfm *tfm)
if (IS_ERR(op->fallback.cip)) {
printk(KERN_ERR "Error allocating fallback algo %s\n", name);
- return PTR_ERR(op->fallback.blk);
+ return PTR_ERR(op->fallback.cip);
}
return 0;
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH] geode: Fix cip/blk confusion
2010-01-29 13:32 [PATCH] geode: Fix cip/blk confusion Roel Kluin
@ 2010-01-29 14:51 ` Sebastian Andrzej Siewior
2010-01-29 15:20 ` roel kluin
0 siblings, 1 reply; 6+ messages in thread
From: Sebastian Andrzej Siewior @ 2010-01-29 14:51 UTC (permalink / raw)
To: Roel Kluin
Cc: Herbert Xu, David S. Miller, linux-crypto, Andrew Morton, LKML,
Sergey Mironov, Martin Schwidefsky
* Roel Kluin | 2010-01-29 14:32:56 [+0100]:
>This was already discussed in december/januari but I still cannot find it in
>mainline, was it lost?
Isn't this patch [0] and [1] in Herbert's tree? If so Herbert is
probably going to merge in the next merge window because it is not
urgend enough.
[0] http://git.kernel.org/?p=linux/kernel/git/herbert/cryptodev-2.6.git;a=commit;h=faad98f29606d9d3c6bddae7c88693be37d2fb43
[1] http://git.kernel.org/?p=linux/kernel/git/herbert/cryptodev-2.6.git;a=commit;h=d7ac769068df87ca8c7f72d99cf67ead16739f18
Sebastian
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] geode: Fix cip/blk confusion
2010-01-29 14:51 ` Sebastian Andrzej Siewior
@ 2010-01-29 15:20 ` roel kluin
2010-01-29 20:30 ` Herbert Xu
0 siblings, 1 reply; 6+ messages in thread
From: roel kluin @ 2010-01-29 15:20 UTC (permalink / raw)
To: Sebastian Andrzej Siewior
Cc: Herbert Xu, David S. Miller, linux-crypto, Andrew Morton, LKML,
Sergey Mironov, Martin Schwidefsky
On Fri, Jan 29, 2010 at 3:51 PM, Sebastian Andrzej Siewior
<sebastian@breakpoint.cc> wrote:
> * Roel Kluin | 2010-01-29 14:32:56 [+0100]:
>
>>This was already discussed in december/januari but I still cannot find it in
>>mainline, was it lost?
>
> Isn't this patch [0] and [1] in Herbert's tree? If so Herbert is
> probably going to merge in the next merge window because it is not
> urgend enough.
>
> [0] http://git.kernel.org/?p=linux/kernel/git/herbert/cryptodev-2.6.git;a=commit;h=faad98f29606d9d3c6bddae7c88693be37d2fb43
> [1] http://git.kernel.org/?p=linux/kernel/git/herbert/cryptodev-2.6.git;a=commit;h=d7ac769068df87ca8c7f72d99cf67ead16739f18
Yes that are the patches, however, I think my previous patch missed one
blk to cip conversion in geode_setkey_cip():
ret = crypto_cipher_setkey(op->fallback.cip, key, len);
if (ret) {
tfm->crt_flags &= ~CRYPTO_TFM_RES_MASK;
- tfm->crt_flags |= (op->fallback.blk->base.crt_flags &
CRYPTO_TFM_RES_MASK);
+ tfm->crt_flags |= (op->fallback.cip->base.crt_flags &
CRYPTO_TFM_RES_MASK);
}
return ret;
}
Roel
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] geode: Fix cip/blk confusion
2010-01-29 15:20 ` roel kluin
@ 2010-01-29 20:30 ` Herbert Xu
2010-01-30 15:48 ` Roel Kluin
0 siblings, 1 reply; 6+ messages in thread
From: Herbert Xu @ 2010-01-29 20:30 UTC (permalink / raw)
To: roel kluin
Cc: Sebastian Andrzej Siewior, David S. Miller, linux-crypto,
Andrew Morton, LKML, Sergey Mironov, Martin Schwidefsky
On Fri, Jan 29, 2010 at 04:20:02PM +0100, roel kluin wrote:
>
> Yes that are the patches, however, I think my previous patch missed one
> blk to cip conversion in geode_setkey_cip():
Please send an incremental patch. Thanks!
--
Visit Openswan at http://www.openswan.org/
Email: Herbert Xu ~{PmV>HI~} <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] geode: Fix cip/blk confusion
2010-01-29 20:30 ` Herbert Xu
@ 2010-01-30 15:48 ` Roel Kluin
2010-02-04 0:39 ` Herbert Xu
0 siblings, 1 reply; 6+ messages in thread
From: Roel Kluin @ 2010-01-30 15:48 UTC (permalink / raw)
To: Herbert Xu
Cc: Sebastian Andrzej Siewior, David S. Miller, linux-crypto,
Andrew Morton, LKML, Sergey Mironov, Martin Schwidefsky
a crypto_cipher cip member was set where a crypto_cipher blk members
should have been.
Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
---
>> I think my previous patch missed one
>> blk to cip conversion in geode_setkey_cip():
>
> Please send an incremental patch. Thanks!
Ok, here's the missing part
diff --git a/drivers/crypto/geode-aes.c b/drivers/crypto/geode-aes.c
index 03e71b1..c7a5a43 100644
--- a/drivers/crypto/geode-aes.c
+++ b/drivers/crypto/geode-aes.c
@@ -141,7 +141,7 @@ static int geode_setkey_cip(struct crypto_tfm *tfm, const u8 *key,
ret = crypto_cipher_setkey(op->fallback.cip, key, len);
if (ret) {
tfm->crt_flags &= ~CRYPTO_TFM_RES_MASK;
- tfm->crt_flags |= (op->fallback.blk->base.crt_flags & CRYPTO_TFM_RES_MASK);
+ tfm->crt_flags |= (op->fallback.cip->base.crt_flags & CRYPTO_TFM_RES_MASK);
}
return ret;
}
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH] geode: Fix cip/blk confusion
2010-01-30 15:48 ` Roel Kluin
@ 2010-02-04 0:39 ` Herbert Xu
0 siblings, 0 replies; 6+ messages in thread
From: Herbert Xu @ 2010-02-04 0:39 UTC (permalink / raw)
To: Roel Kluin
Cc: Sebastian Andrzej Siewior, David S. Miller, linux-crypto,
Andrew Morton, LKML, Sergey Mironov, Martin Schwidefsky
On Sat, Jan 30, 2010 at 04:48:19PM +0100, Roel Kluin wrote:
> a crypto_cipher cip member was set where a crypto_cipher blk members
> should have been.
>
> Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Patch applied. Thank you.
--
Visit Openswan at http://www.openswan.org/
Email: Herbert Xu ~{PmV>HI~} <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2010-02-04 0:40 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-01-29 13:32 [PATCH] geode: Fix cip/blk confusion Roel Kluin
2010-01-29 14:51 ` Sebastian Andrzej Siewior
2010-01-29 15:20 ` roel kluin
2010-01-29 20:30 ` Herbert Xu
2010-01-30 15:48 ` Roel Kluin
2010-02-04 0:39 ` Herbert Xu
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox