Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/810129/?format=api
{ "id": 810129, "url": "http://patchwork.ozlabs.org/api/patches/810129/?format=api", "web_url": "http://patchwork.ozlabs.org/project/linux-cifs-client/patch/1504615144-29770-19-git-send-email-gilad@benyossef.com/", "project": { "id": 12, "url": "http://patchwork.ozlabs.org/api/projects/12/?format=api", "name": "Linux CIFS Client", "link_name": "linux-cifs-client", "list_id": "linux-cifs.vger.kernel.org", "list_email": "linux-cifs@vger.kernel.org", "web_url": "", "scm_url": "", "webscm_url": "", "list_archive_url": "", "list_archive_url_format": "", "commit_url_format": "" }, "msgid": "<1504615144-29770-19-git-send-email-gilad@benyossef.com>", "list_archive_url": null, "date": "2017-09-05T12:38:57", "name": "[v8,18/20] crypto: qce: move to generic async completion", "commit_ref": null, "pull_url": null, "state": "new", "archived": false, "hash": "df7bc555bde5f8264db3b6de35e0ba2446bccc03", "submitter": { "id": 11198, "url": "http://patchwork.ozlabs.org/api/people/11198/?format=api", "name": "Gilad Ben-Yossef", "email": "gilad@benyossef.com" }, "delegate": null, "mbox": "http://patchwork.ozlabs.org/project/linux-cifs-client/patch/1504615144-29770-19-git-send-email-gilad@benyossef.com/mbox/", "series": [ { "id": 1572, "url": "http://patchwork.ozlabs.org/api/series/1572/?format=api", "web_url": "http://patchwork.ozlabs.org/project/linux-cifs-client/list/?series=1572", "date": "2017-09-05T12:38:39", "name": "simplify crypto wait for async op", "version": 8, "mbox": "http://patchwork.ozlabs.org/series/1572/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/810129/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/810129/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "<linux-cifs-owner@vger.kernel.org>", "X-Original-To": "incoming@patchwork.ozlabs.org", "Delivered-To": "patchwork-incoming@bilbo.ozlabs.org", "Authentication-Results": "ozlabs.org;\n\tspf=none (mailfrom) smtp.mailfrom=vger.kernel.org\n\t(client-ip=209.132.180.67; helo=vger.kernel.org;\n\tenvelope-from=linux-cifs-owner@vger.kernel.org;\n\treceiver=<UNKNOWN>)", "Received": [ "from vger.kernel.org (vger.kernel.org [209.132.180.67])\n\tby ozlabs.org (Postfix) with ESMTP id 3xmmc76DjMz9sRV\n\tfor <incoming@patchwork.ozlabs.org>;\n\tTue, 5 Sep 2017 22:43:51 +1000 (AEST)", "(majordomo@vger.kernel.org) by vger.kernel.org via listexpand\n\tid S1752289AbdIEMnt (ORCPT <rfc822;incoming@patchwork.ozlabs.org>);\n\tTue, 5 Sep 2017 08:43:49 -0400", "from foss.arm.com ([217.140.101.70]:39922 \"EHLO foss.arm.com\"\n\trhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP\n\tid S1752282AbdIEMno (ORCPT <rfc822;linux-cifs@vger.kernel.org>);\n\tTue, 5 Sep 2017 08:43:44 -0400", "from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249])\n\tby usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 5E836168F;\n\tTue, 5 Sep 2017 05:43:43 -0700 (PDT)", "from gby.kfn.arm.com (unknown [10.45.48.140])\n\tby usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id\n\t35A013F3E1; Tue, 5 Sep 2017 05:43:33 -0700 (PDT)" ], "From": "Gilad Ben-Yossef <gilad@benyossef.com>", "To": "Herbert Xu <herbert@gondor.apana.org.au>,\n\t\"David S. Miller\" <davem@davemloft.net>,\n\tJonathan Corbet <corbet@lwn.net>, David Howells <dhowells@redhat.com>,\n\tTom Lendacky <thomas.lendacky@amd.com>, Gary Hook <gary.hook@amd.com>,\n\tBoris Brezillon <boris.brezillon@free-electrons.com>,\n\tArnaud Ebalard <arno@natisbad.org>,\n\tMatthias Brugger <matthias.bgg@gmail.com>,\n\tAlasdair Kergon <agk@redhat.com>,\n\tMike Snitzer <snitzer@redhat.com>, dm-devel@redhat.com,\n\tShaohua Li <shli@kernel.org>, Steve French <sfrench@samba.org>,\n\t\"Theodore Y. Ts'o\" <tytso@mit.edu>, Jaegeuk Kim <jaegeuk@kernel.org>,\n\tSteffen Klassert <steffen.klassert@secunet.com>,\n\tAlexey Kuznetsov <kuznet@ms2.inr.ac.ru>,\n\tHideaki YOSHIFUJI <yoshfuji@linux-ipv6.org>,\n\tMimi Zohar <zohar@linux.vnet.ibm.com>,\n\tDmitry Kasatkin <dmitry.kasatkin@gmail.com>,\n\tJames Morris <james.l.morris@oracle.com>,\n\t\"Serge E. Hallyn\" <serge@hallyn.com>, linux-crypto@vger.kernel.org,\n\tlinux-doc@vger.kernel.org, linux-kernel@vger.kernel.org,\n\tkeyrings@vger.kernel.org, linux-arm-kernel@lists.infradead.org,\n\tlinux-mediatek@lists.infradead.org, linux-raid@vger.kernel.org,\n\tlinux-cifs@vger.kernel.org, samba-technical@lists.samba.org,\n\tlinux-fscrypt@vger.kernel.org, netdev@vger.kernel.org,\n\tlinux-ima-devel@lists.sourceforge.net,\n\tlinux-ima-user@lists.sourceforge.net,\n\tlinux-security-module@vger.kernel.org", "Cc": "Ofir Drang <ofir.drang@arm.com>", "Subject": "[PATCH v8 18/20] crypto: qce: move to generic async completion", "Date": "Tue, 5 Sep 2017 15:38:57 +0300", "Message-Id": "<1504615144-29770-19-git-send-email-gilad@benyossef.com>", "X-Mailer": "git-send-email 2.1.4", "In-Reply-To": "<1504615144-29770-1-git-send-email-gilad@benyossef.com>", "References": "<1504615144-29770-1-git-send-email-gilad@benyossef.com>", "Sender": "linux-cifs-owner@vger.kernel.org", "Precedence": "bulk", "List-ID": "<linux-cifs.vger.kernel.org>", "X-Mailing-List": "linux-cifs@vger.kernel.org" }, "content": "The qce driver starts several async crypto ops and waits for their\ncompletions. Move it over to generic code doing the same.\n\nSigned-off-by: Gilad Ben-Yossef <gilad@benyossef.com>\n---\n drivers/crypto/qce/sha.c | 30 ++++--------------------------\n 1 file changed, 4 insertions(+), 26 deletions(-)", "diff": "diff --git a/drivers/crypto/qce/sha.c b/drivers/crypto/qce/sha.c\nindex 47e114a..53227d7 100644\n--- a/drivers/crypto/qce/sha.c\n+++ b/drivers/crypto/qce/sha.c\n@@ -349,28 +349,12 @@ static int qce_ahash_digest(struct ahash_request *req)\n \treturn qce->async_req_enqueue(tmpl->qce, &req->base);\n }\n \n-struct qce_ahash_result {\n-\tstruct completion completion;\n-\tint error;\n-};\n-\n-static void qce_digest_complete(struct crypto_async_request *req, int error)\n-{\n-\tstruct qce_ahash_result *result = req->data;\n-\n-\tif (error == -EINPROGRESS)\n-\t\treturn;\n-\n-\tresult->error = error;\n-\tcomplete(&result->completion);\n-}\n-\n static int qce_ahash_hmac_setkey(struct crypto_ahash *tfm, const u8 *key,\n \t\t\t\t unsigned int keylen)\n {\n \tunsigned int digestsize = crypto_ahash_digestsize(tfm);\n \tstruct qce_sha_ctx *ctx = crypto_tfm_ctx(&tfm->base);\n-\tstruct qce_ahash_result result;\n+\tstruct crypto_wait wait;\n \tstruct ahash_request *req;\n \tstruct scatterlist sg;\n \tunsigned int blocksize;\n@@ -405,9 +389,9 @@ static int qce_ahash_hmac_setkey(struct crypto_ahash *tfm, const u8 *key,\n \t\tgoto err_free_ahash;\n \t}\n \n-\tinit_completion(&result.completion);\n+\tcrypto_init_wait(&wait);\n \tahash_request_set_callback(req, CRYPTO_TFM_REQ_MAY_BACKLOG,\n-\t\t\t\t qce_digest_complete, &result);\n+\t\t\t\t crypto_req_done, &wait);\n \tcrypto_ahash_clear_flags(ahash_tfm, ~0);\n \n \tbuf = kzalloc(keylen + QCE_MAX_ALIGN_SIZE, GFP_KERNEL);\n@@ -420,13 +404,7 @@ static int qce_ahash_hmac_setkey(struct crypto_ahash *tfm, const u8 *key,\n \tsg_init_one(&sg, buf, keylen);\n \tahash_request_set_crypt(req, &sg, ctx->authkey, keylen);\n \n-\tret = crypto_ahash_digest(req);\n-\tif (ret == -EINPROGRESS || ret == -EBUSY) {\n-\t\tret = wait_for_completion_interruptible(&result.completion);\n-\t\tif (!ret)\n-\t\t\tret = result.error;\n-\t}\n-\n+\tret = crypto_wait_req(crypto_ahash_digest(req), &wait);\n \tif (ret)\n \t\tcrypto_ahash_set_flags(tfm, CRYPTO_TFM_RES_BAD_KEY_LEN);\n \n", "prefixes": [ "v8", "18/20" ] }