[cryptodev:master 81/86] htmldocs: include/linux/crypto.h:614: warning: Function parameter or member 'stats.aead' not described in 'crypto_alg'
tree: https://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git master head: 88d905e20b11f7ad841e3afddaf1d59b6693c4a1 commit: 17c18f9e33282a170458cb5ea20759bfcb0da7d8 [81/86] crypto: user - Split stats in multiple structures reproduce: make htmldocs All warnings (new ones prefixed by >>): WARNING: convert(1) not found, for SVG to PDF conversion install ImageMagick (https://www.imagemagick.org) kernel/resource.c:337: warning: Function parameter or member 'start' not described in 'find_next_iomem_res' kernel/resource.c:337: warning: Function parameter or member 'end' not described in 'find_next_iomem_res' kernel/resource.c:337: warning: Function parameter or member 'flags' not described in 'find_next_iomem_res' kernel/resource.c:337: warning: Function parameter or member 'desc' not described in 'find_next_iomem_res' kernel/resource.c:337: warning: Function parameter or member 'first_lvl' not described in 'find_next_iomem_res' kernel/resource.c:337: warning: Function parameter or member 'res' not described in 'find_next_iomem_res' kernel/resource.c:409: warning: Function parameter or member 'arg' not described in 'walk_iomem_res_desc' kernel/resource.c:409: warning: Function parameter or member 'func' not described in 'walk_iomem_res_desc' kernel/resource.c:409: warning: Function parameter or member 'arg' not described in 'walk_iomem_res_desc' kernel/resource.c:409: warning: Function parameter or member 'func' not described in 'walk_iomem_res_desc' include/linux/rcutree.h:1: warning: no structured comments found kernel/rcu/tree.c:684: warning: Excess function parameter 'irq' description in 'rcu_nmi_exit' include/linux/srcu.h:175: warning: Function parameter or member 'p' not described in 'srcu_dereference_notrace' include/linux/srcu.h:175: warning: Function parameter or member 'sp' not described in 'srcu_dereference_notrace' include/linux/gfp.h:1: warning: no structured comments found >> include/linux/crypto.h:614: warning: Function parameter or member >> 'stats.aead' not described in 'crypto_alg' >> include/linux/crypto.h:614: warning: Function parameter or member >> 'stats.akcipher' not described in 'crypto_alg' >> include/linux/crypto.h:614: warning: Function parameter or member >> 'stats.cipher' not described in 'crypto_alg' >> include/linux/crypto.h:614: warning: Function parameter or member >> 'stats.compress' not described in 'crypto_alg' >> include/linux/crypto.h:614: warning: Function parameter or member >> 'stats.hash' not described in 'crypto_alg' >> include/linux/crypto.h:614: warning: Function parameter or member >> 'stats.rng' not described in 'crypto_alg' >> include/linux/crypto.h:614: warning: Function parameter or member >> 'stats.kpp' not described in 'crypto_alg' include/net/cfg80211.h:2838: warning: cannot understand function prototype: 'struct cfg80211_ftm_responder_stats ' include/net/cfg80211.h:2838: warning: cannot understand function prototype: 'struct cfg80211_ftm_responder_stats ' include/net/cfg80211.h:2838: warning: cannot understand function prototype: 'struct cfg80211_ftm_responder_stats ' include/net/cfg80211.h:2838: warning: cannot understand function prototype: 'struct cfg80211_ftm_responder_stats ' include/net/cfg80211.h:2838: warning: cannot understand function prototype: 'struct cfg80211_ftm_responder_stats ' include/net/cfg80211.h:2838: warning: cannot understand function prototype: 'struct cfg80211_ftm_responder_stats ' include/net/cfg80211.h:2838: warning: cannot understand function prototype: 'struct cfg80211_ftm_responder_stats ' include/net/cfg80211.h:2838: warning: cannot understand function prototype: 'struct cfg80211_ftm_responder_stats ' include/net/cfg80211.h:2838: warning: cannot understand function prototype: 'struct cfg80211_ftm_responder_stats ' include/net/cfg80211.h:2838: warning: cannot understand function prototype: 'struct cfg80211_ftm_responder_stats ' include/net/cfg80211.h:2838: warning: cannot understand function prototype: 'struct cfg80211_ftm_responder_stats ' include/net/cfg80211.h:2838: warning: cannot understand function prototype: 'struct cfg80211_ftm_responder_stats ' include/net/cfg80211.h:2838: warning: cannot understand function prototype: 'struct cfg80211_ftm_responder_stats ' include/net/cfg80211.h:4439: warning: Function parameter or member 'wext.ibss' not described in 'wireless_dev' include/net/cfg80211.h:4439: warning: Function parameter or member 'wext.connect' not described in 'wireless_dev' include/net/cfg80211.h:4439: warning: Function parameter or member 'wext.keys' not described in 'wireless_dev' include/net/cfg80211.h:4439: warning: Function parameter or member 'wext.ie' not described in 'wireless_dev' include/net/cfg80211.h:4439: warning: Function parameter or member 'wext.ie_len' not described in 'wireless_dev' include/net/cfg80211.h:4439: warning: Function
[PATCH] crypto: caam - fix setting IV after decrypt
The crypto API wants the updated IV in req->info after decryption. The updated IV used to be copied correctly to req->info after running the decryption job. Since 115957bb3e59 this is done before running the job so instead of the updated IV only the unmodified input IV is given back to the crypto API. This was observed running the gcm(aes) selftest which internally uses ctr(aes) implemented by the CAAM engine. Fixes: 115957bb3e59 ("crypto: caam - fix IV DMA mapping and updating") Signed-off-by: Sascha Hauer Cc: sta...@vger.kernel.org --- drivers/crypto/caam/caamalg.c | 17 + 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/drivers/crypto/caam/caamalg.c b/drivers/crypto/caam/caamalg.c index 869f092432de..c05c7938439c 100644 --- a/drivers/crypto/caam/caamalg.c +++ b/drivers/crypto/caam/caamalg.c @@ -917,10 +917,10 @@ static void skcipher_decrypt_done(struct device *jrdev, u32 *desc, u32 err, { struct skcipher_request *req = context; struct skcipher_edesc *edesc; -#ifdef DEBUG struct crypto_skcipher *skcipher = crypto_skcipher_reqtfm(req); int ivsize = crypto_skcipher_ivsize(skcipher); +#ifdef DEBUG dev_err(jrdev, "%s %d: err 0x%x\n", __func__, __LINE__, err); #endif @@ -937,6 +937,14 @@ static void skcipher_decrypt_done(struct device *jrdev, u32 *desc, u32 err, edesc->dst_nents > 1 ? 100 : req->cryptlen, 1); skcipher_unmap(jrdev, edesc, req); + + /* +* The crypto API expects us to set the IV (req->iv) to the last +* ciphertext block. +*/ + scatterwalk_map_and_copy(req->iv, req->src, req->cryptlen - ivsize, +ivsize, 0); + kfree(edesc); skcipher_request_complete(req, err); @@ -1588,13 +1596,6 @@ static int skcipher_decrypt(struct skcipher_request *req) if (IS_ERR(edesc)) return PTR_ERR(edesc); - /* -* The crypto API expects us to set the IV (req->iv) to the last -* ciphertext block. -*/ - scatterwalk_map_and_copy(req->iv, req->src, req->cryptlen - ivsize, -ivsize, 0); - /* Create and submit job descriptor*/ init_skcipher_job(req, edesc, false); desc = edesc->hw_desc; -- 2.19.1