@@ -69,10 +69,12 @@ struct skcipher_async_req {
};
#define GET_SREQ(areq, ctx) (struct skcipher_async_req *)((char *)areq + \
- crypto_skcipher_reqsize(crypto_skcipher_reqtfm(&ctx->req)))
+ crypto_skcipher_reqsize(crypto_skcipher_reqtfm(&ctx->req)) + \
+ sizeof(struct skcipher_request))
#define GET_REQ_SIZE(ctx) \
- crypto_skcipher_reqsize(crypto_skcipher_reqtfm(&ctx->req))
+ crypto_skcipher_reqsize(crypto_skcipher_reqtfm(&ctx->req)) + \
+ sizeof(struct skcipher_request)
#define GET_IV_SIZE(ctx) \
crypto_skcipher_ivsize(crypto_skcipher_reqtfm(&ctx->req))
The private context space that was allocated for the async request was too small. It accidentally worked fine (at least with the qat driver) because the qat driveri, by mistake, allocated too much. The problem started to show up since the qat driver issue has been fixed in commit: 7768fb2ee. We also need another version of this patch applicable to the code before skcipher conversion that adds sizeof(struct ablkcipher_request) Cc: <stable@vger.kernel.org> # 4.4.x- Signed-off-by: Tadeusz Struk <tadeusz.struk@intel.com> --- crypto/algif_skcipher.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) -- To unsubscribe from this list: send the line "unsubscribe linux-crypto" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html