]> git.baikalelectronics.ru Git - kernel.git/commit
crypto: ccm - move cbcmac input off the stack
authorArd Biesheuvel <ard.biesheuvel@linaro.org>
Mon, 27 Feb 2017 15:30:56 +0000 (15:30 +0000)
committerHerbert Xu <herbert@gondor.apana.org.au>
Tue, 28 Feb 2017 09:29:17 +0000 (17:29 +0800)
commit2e96d467c329774e2ffbdae968af92daaad8d2a0
tree20685fb789a0da94779dc6a97dc3c37eb4286d35
parentd3d710b70fb0b2c4d613e8a3dd441840f0f9c4eb
crypto: ccm - move cbcmac input off the stack

Commit b3b5567a941f ("crypto: ccm - switch to separate cbcmac driver")
refactored the CCM driver to allow separate implementations of the
underlying MAC to be provided by a platform. However, in doing so, it
moved some data from the linear region to the stack, which violates the
SG constraints when the stack is virtually mapped.

So move idata/odata back to the request ctx struct, of which we can
reasonably expect that it has been allocated using kmalloc() et al.

Reported-by: Johannes Berg <johannes@sipsolutions.net>
Fixes: b3b5567a941f ("crypto: ccm - switch to separate cbcmac driver")
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Tested-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
crypto/ccm.c