On Wed, May 15, 2019 at 04:27:51PM +0000, Horia Geanta wrote: > On 5/15/2019 4:13 PM, Sascha Hauer wrote: > > The debugging hex dumps in skcipher_encrypt_done() and > > skcipher_decrypt_done() are printed while the request is still DMA > > mapped. This results in bogus hex dumps with things like mixtures > > between plain text and cipher text. Unmap first before printing. > > > The description is not accurate. > req->iv is no longer DMA mapped since commit 115957bb3e59 ("crypto: caam - fix > IV DMA mapping and updating"), so this is not related to IV DMA unmapping vs. > print order. > > Currently: > -for encryption, printed req->iv contains the input IV; copy of output IV into > req->iv is done further below > -for decryption, printed req->iv should be correct, since output IV is copied > into req->iv in skcipher_decrypt(), before accelerator runs > > Could you please resubmit with updated message? Just did that. Thanks Sascha -- Pengutronix e.K. | | Industrial Linux Solutions | http://www.pengutronix.de/ | Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |