Re: [PATCH] geode: PTR_ERR return of wrong pointer in fallback_init_cip()
On Mon, Dec 07, 2009 at 03:14:33PM +0100, Roel Kluin wrote: Return the PTR_ERR of the correct pointer. Signed-off-by: Roel Kluin roel.kl...@gmail.com Patch applied. Thank you. -- 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: [PATCH 3/12] crypto: Correct size given to memset
On Wed, Dec 09, 2009 at 08:23:09PM +0100, Julia Lawall wrote: From: Julia Lawall ju...@diku.dk Memset should be given the size of the structure, not the size of the pointer. The semantic patch that makes this change is as follows: (http://coccinelle.lip6.fr/) // smpl @@ type T; T *x; expression E; @@ memset(x, E, sizeof( + * x)) // /smpl Signed-off-by: Julia Lawall ju...@diku.dk Luckily these functions aren't used by anything. Perhaps we should get rid of them altogether. Anyway, I've applied your patch. Thanks! -- 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
CRYPTO_TFM_REQ_MASK and CRYPTO_TFM_RES_MASK
Hi, Could someone explain what the masks CRYPTO_TFM_REQ_MASK and CRYPTO_TFM_RES_MASK do and why they must be manipulated before and after crypto_cipher_setkey(...)? Here is an example use (from crypto_pcbc_setkey): crypto_cipher_clear_flags(child, CRYPTO_TFM_REQ_MASK); crypto_cipher_set_flags(child, crypto_tfm_get_flags(parent) CRYPTO_TFM_REQ_MASK); err = crypto_cipher_setkey(child, key, keylen); crypto_tfm_set_flags(parent, crypto_cipher_get_flags(child) CRYPTO_TFM_RES_MASK); It would be very useful if someone added some comments to these definitions (found in linux/crypto.h): /* * Transform masks and values (for crt_flags). */ #define CRYPTO_TFM_REQ_MASK0x000fff00 #define CRYPTO_TFM_RES_MASK0xfff0 #define CRYPTO_TFM_REQ_WEAK_KEY0x0100 #define CRYPTO_TFM_REQ_MAY_SLEEP0x0200 #define CRYPTO_TFM_REQ_MAY_BACKLOG0x0400 #define CRYPTO_TFM_RES_WEAK_KEY0x0010 #define CRYPTO_TFM_RES_BAD_KEY_LEN 0x0020 #define CRYPTO_TFM_RES_BAD_KEY_SCHED 0x0040 #define CRYPTO_TFM_RES_BAD_BLOCK_LEN 0x0080 #define CRYPTO_TFM_RES_BAD_FLAGS 0x0100 Thanks, Dimitris -- 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_TFM_REQ_MASK and CRYPTO_TFM_RES_MASK
After sending the email, I realised what's happening... crypto_cipher_setkey seems to be used that way only when a child cipher is used by another (parent) cipher as a way to delegate work. It seems that crypto_cipher_setkey accepts a number of request flags CRYPTO_TFM_REQ_* which must be passed to the child object and after completion of crypto_cipher_setkey, it returns some results flags CRYPTO_TFM_RES_* back which must be passed to the parent object. So the flag manipulation before and after is because we are using an internal cipher object to delegate the work. Please correct me, if I am wrong. Dimitris Dimitrios Siganos wrote: Hi, Could someone explain what the masks CRYPTO_TFM_REQ_MASK and CRYPTO_TFM_RES_MASK do and why they must be manipulated before and after crypto_cipher_setkey(...)? Here is an example use (from crypto_pcbc_setkey): crypto_cipher_clear_flags(child, CRYPTO_TFM_REQ_MASK); crypto_cipher_set_flags(child, crypto_tfm_get_flags(parent) CRYPTO_TFM_REQ_MASK); err = crypto_cipher_setkey(child, key, keylen); crypto_tfm_set_flags(parent, crypto_cipher_get_flags(child) CRYPTO_TFM_RES_MASK); It would be very useful if someone added some comments to these definitions (found in linux/crypto.h): /* * Transform masks and values (for crt_flags). */ #define CRYPTO_TFM_REQ_MASK0x000fff00 #define CRYPTO_TFM_RES_MASK0xfff0 #define CRYPTO_TFM_REQ_WEAK_KEY0x0100 #define CRYPTO_TFM_REQ_MAY_SLEEP0x0200 #define CRYPTO_TFM_REQ_MAY_BACKLOG0x0400 #define CRYPTO_TFM_RES_WEAK_KEY0x0010 #define CRYPTO_TFM_RES_BAD_KEY_LEN 0x0020 #define CRYPTO_TFM_RES_BAD_KEY_SCHED 0x0040 #define CRYPTO_TFM_RES_BAD_BLOCK_LEN 0x0080 #define CRYPTO_TFM_RES_BAD_FLAGS 0x0100 Thanks, Dimitris -- 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 -- 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: [PATCH] xfrm: Fix truncation length of authentication algorithms installed via PF_KEY
From: Martin Willi mar...@strongswan.org Date: Wed, 9 Dec 2009 17:11:15 +0100 Commit 4447bb33f09444920a8f1d89e1540137429351b6 breaks installation of authentication algorithms via PF_KEY, as the state specific truncation length is not installed with the algorithms default truncation length. This patch initializes state properly to the default if installed via PF_KEY. Signed-off-by: Martin Willi mar...@strongswan.org Applied. Herbert, thanks for reviewing, I didn't miss your ACK. :-) -- 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