From: Tadeusz Struk <tadeusz.struk@intel.com>
To: herbert@gondor.apana.org.au
Cc: linux-crypto@vger.kernel.org, stable@vger.kernel.org,
tadeusz.struk@intel.com
Subject: [PATCH 3/3] crypto: algif_skcipher - increase private contex space for async request
Date: Wed, 27 Jan 2016 09:14:06 -0800 [thread overview]
Message-ID: <20160127171406.32579.69197.stgit@tstruk-mobl1> (raw)
In-Reply-To: <20160127171350.32579.49931.stgit@tstruk-mobl1>
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(-)
diff --git a/crypto/algif_skcipher.c b/crypto/algif_skcipher.c
index 78529ce..298605d 100644
--- a/crypto/algif_skcipher.c
+++ b/crypto/algif_skcipher.c
@@ -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))
prev parent reply other threads:[~2016-01-27 17:14 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-01-27 17:13 [PATCH 0/3] crypto: afalg_skcipher - fixes after skcipher conversion Tadeusz Struk
2016-01-27 17:13 ` [PATCH 1/3] crypto: skcipher - return the correct request to the user Tadeusz Struk
2016-01-28 4:53 ` Herbert Xu
2016-01-27 17:14 ` [PATCH 2/3] crypto: algif_skcipher - fix async callback after skcipher convertion Tadeusz Struk
2016-01-28 4:56 ` Herbert Xu
2016-01-27 17:14 ` Tadeusz Struk [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20160127171406.32579.69197.stgit@tstruk-mobl1 \
--to=tadeusz.struk@intel.com \
--cc=herbert@gondor.apana.org.au \
--cc=linux-crypto@vger.kernel.org \
--cc=stable@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox