Re: crypto: sha-s390 - Switch to shash
On Tue, 2009-02-03 at 12:48 +1100, Herbert Xu wrote: On Mon, Feb 02, 2009 at 06:01:07PM +, Jan Glauber wrote: The patch is not yet in cryptodev, so I applied it on top of cryptodev. Compiling it gives me the following error: CC [M] arch/s390/crypto/sha256_s390.o arch/s390/crypto/sha_common.c: In function ‘s390_sha_update’: arch/s390/crypto/sha_common.c:23: error: implicit declaration of function ‘crypto_shash_blocksize’ make[1]: *** [arch/s390/crypto/sha_common.o] Error 1 Thanks for testing! It turns out that this was the first in-tree user for crypto_shash_blocksize so I'll need to add it. With this little typo-patch shash works fine on s390. Cheers, Jan --- ./arch/s390/crypto/sha256_s390.c.shash 2009-02-03 13:43:47.0 +0100 +++ ./arch/s390/crypto/sha256_s390.c2009-02-03 13:43:53.0 +0100 @@ -26,7 +26,7 @@ static int sha256_init(struct shash_desc *desc) { - struct s390_sha_ctx *sctx = shash_desc_ctx(tfm); + struct s390_sha_ctx *sctx = shash_desc_ctx(desc); sctx-state[0] = SHA256_H0; sctx-state[1] = SHA256_H1; -- To unsubscribe from this list: send the line unsubscribe linux-crypto in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: crypto: sha-s390 - Switch to shash
On Tue, Feb 03, 2009 at 03:16:22PM +, Jan Glauber wrote: With this little typo-patch shash works fine on s390. I'll fold this into the patch before pushing. Thanks for testing! -- Visit Openswan at http://www.openswan.org/ Email: Herbert Xu ~{PmVHI~} herb...@gondor.apana.org.au Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt -- To unsubscribe from this list: send the line unsubscribe linux-crypto in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: crypto: sha-s390 - Switch to shash
On Mon, 2009-02-02 at 13:20 +0100, Martin Schwidefsky wrote: On Wed, 2009-01-28 at 14:56 +1100, Herbert Xu wrote: On Mon, Jan 19, 2009 at 09:55:17AM +1100, Herbert Xu wrote: Could you let me if this patch breaks s390? commit 0fe7dddf02811152d7e58747bfe419ec0f43ea4e Author: Herbert Xu herb...@gondor.apana.org.au Date: Sun Jan 18 20:33:33 2009 +1100 crypto: sha-s390 - Switch to shash This patch converts the S390 sha algorithms to the new shash interface. Signed-off-by: Herbert Xu herb...@gondor.apana.org.au I'm going to throw this into cryptodev and if it breaks, please yell. Just back from my vacation. Jan will check if the patch breaks anything, we'll complain if it does.. The patch is not yet in cryptodev, so I applied it on top of cryptodev. Compiling it gives me the following error: CC [M] arch/s390/crypto/sha256_s390.o arch/s390/crypto/sha_common.c: In function ‘s390_sha_update’: arch/s390/crypto/sha_common.c:23: error: implicit declaration of function ‘crypto_shash_blocksize’ make[1]: *** [arch/s390/crypto/sha_common.o] Error 1 --jan -- To unsubscribe from this list: send the line unsubscribe linux-crypto in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: crypto: sha-s390 - Switch to shash
On Wed, 2009-01-28 at 14:56 +1100, Herbert Xu wrote: On Mon, Jan 19, 2009 at 09:55:17AM +1100, Herbert Xu wrote: Could you let me if this patch breaks s390? commit 0fe7dddf02811152d7e58747bfe419ec0f43ea4e Author: Herbert Xu herb...@gondor.apana.org.au Date: Sun Jan 18 20:33:33 2009 +1100 crypto: sha-s390 - Switch to shash This patch converts the S390 sha algorithms to the new shash interface. Signed-off-by: Herbert Xu herb...@gondor.apana.org.au I'm going to throw this into cryptodev and if it breaks, please yell. Just back from my vacation. Jan will check if the patch breaks anything, we'll complain if it does.. -- blue skies, Martin. Reality continues to ruin my life. - Calvin. -- To unsubscribe from this list: send the line unsubscribe linux-crypto in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: crypto: sha-s390 - Switch to shash
On Mon, Feb 02, 2009 at 06:01:07PM +, Jan Glauber wrote: The patch is not yet in cryptodev, so I applied it on top of cryptodev. Compiling it gives me the following error: CC [M] arch/s390/crypto/sha256_s390.o arch/s390/crypto/sha_common.c: In function ‘s390_sha_update’: arch/s390/crypto/sha_common.c:23: error: implicit declaration of function ‘crypto_shash_blocksize’ make[1]: *** [arch/s390/crypto/sha_common.o] Error 1 Thanks for testing! It turns out that this was the first in-tree user for crypto_shash_blocksize so I'll need to add it. crypto: shash - Add crypto_shash_blocksize This function is needed by algorithms that don't know their own block size, e.g., in s390 where the code is common between multiple versions of SHA. Signed-off-by: Herbert Xu herb...@gondor.apana.org.au diff --git a/include/crypto/hash.h b/include/crypto/hash.h index cd16d6e..b71c86b 100644 --- a/include/crypto/hash.h +++ b/include/crypto/hash.h @@ -231,6 +231,11 @@ static inline unsigned int crypto_shash_alignmask( return crypto_tfm_alg_alignmask(crypto_shash_tfm(tfm)); } +static inline unsigned int crypto_shash_blocksize(struct crypto_shash *tfm) +{ + return crypto_tfm_alg_blocksize(crypto_shash_tfm(tfm)); +} + static inline struct shash_alg *__crypto_shash_alg(struct crypto_alg *alg) { return container_of(alg, struct shash_alg, base); Cheers, -- Visit Openswan at http://www.openswan.org/ Email: Herbert Xu ~{PmVHI~} herb...@gondor.apana.org.au Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt -- To unsubscribe from this list: send the line unsubscribe linux-crypto in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html