summaryrefslogtreecommitdiffstats
path: root/samples/bpf
diff options
context:
space:
mode:
authorHoria Geantă <horia.geanta@nxp.com>2018-03-28 15:39:18 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2018-06-16 09:18:23 +0200
commit9136b00c6f5d37c7878b05035a89f3d0dec0d9d0 (patch)
tree7be6174bb127dc15dbc715c3d82a683d23a5a431 /samples/bpf
parent4f2fa31f93c7c58a7598644d402773503b31ec3b (diff)
downloadtalos-obmc-linux-9136b00c6f5d37c7878b05035a89f3d0dec0d9d0.tar.gz
talos-obmc-linux-9136b00c6f5d37c7878b05035a89f3d0dec0d9d0.zip
crypto: caam - fix IV DMA mapping and updating
commit 115957bb3e59fcb226ce76b97af14533f239e0ac upstream. There are two IV-related issues: (1) crypto API does not guarantee to provide an IV buffer that is DMAable, thus it's incorrect to DMA map it (2) for in-place decryption, since ciphertext is overwritten with plaintext, updated req->info will contain the last block of plaintext (instead of the last block of ciphertext) While these two issues could be fixed separately, it's straightforward to fix both in the same time - by allocating extra space in the ablkcipher_edesc for the IV that will be fed to the crypto engine; this allows for fixing (2) by saving req->src[last_block] in req->info directly, i.e. without allocating another temporary buffer. A side effect of the fix is that it's no longer possible to have the IV and req->src contiguous. Code checking for this case is removed. Cc: <stable@vger.kernel.org> # 4.13+ Fixes: 854b06f76879 ("crypto: caam - properly set IV after {en,de}crypt") Link: http://lkml.kernel.org/r/20170113084620.GF22022@gondor.apana.org.au Reported-by: Gilad Ben-Yossef <gilad@benyossef.com> Signed-off-by: Horia Geantă <horia.geanta@nxp.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'samples/bpf')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud