From: Horia Geanta Date: Thu, 2 Aug 2012 14:16:37 +0000 (+0300) Subject: crypto: talitos - fix icv management on outbound direction X-Git-Tag: omap-for-v3.7-rc1/fixes-cpufreq-signed~19^2~37 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=60542505b0bccbc5e2e518c9dd6bee9a30546061;p=pandora-kernel.git crypto: talitos - fix icv management on outbound direction For IPsec encryption, in the case when: -the input buffer is fragmented (edesc->src_nents > 0) -the output buffer is not fragmented (edesc->dst_nents = 0) the ICV is not output in the link table, but after the encrypted payload. Copying the ICV must be avoided in this case; consequently the condition edesc->dma_len > 0 must be more specific, i.e. must depend on the type of the output buffer - fragmented or not. Testing was performed by modifying testmgr to support src != dst, since currently native kernel IPsec does in-place encryption (src == dst). Signed-off-by: Horia Geanta Signed-off-by: Herbert Xu --- Reading git-diff-tree failed