{"id":815520,"url":"http://patchwork.ozlabs.org/api/patches/815520/?format=json","web_url":"http://patchwork.ozlabs.org/project/linuxppc-dev/patch/47fddd0f43aaedf31bc55da9ff3114079254452f.1505825623.git.christophe.leroy@c-s.fr/","project":{"id":2,"url":"http://patchwork.ozlabs.org/api/projects/2/?format=json","name":"Linux PPC development","link_name":"linuxppc-dev","list_id":"linuxppc-dev.lists.ozlabs.org","list_email":"linuxppc-dev@lists.ozlabs.org","web_url":"https://github.com/linuxppc/wiki/wiki","scm_url":"https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git","webscm_url":"https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git/","list_archive_url":"https://lore.kernel.org/linuxppc-dev/","list_archive_url_format":"https://lore.kernel.org/linuxppc-dev/{}/","commit_url_format":"https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git/commit/?id={}"},"msgid":"<47fddd0f43aaedf31bc55da9ff3114079254452f.1505825623.git.christophe.leroy@c-s.fr>","list_archive_url":"https://lore.kernel.org/linuxppc-dev/47fddd0f43aaedf31bc55da9ff3114079254452f.1505825623.git.christophe.leroy@c-s.fr/","date":"2017-09-19T12:59:01","name":"[1/6] crypto: talitos - Don't provide setkey for non hmac hashing algs.","commit_ref":null,"pull_url":null,"state":"not-applicable","archived":false,"hash":"c4d2b63d0178f9c51165ca3e3f4478df83131e83","submitter":{"id":5234,"url":"http://patchwork.ozlabs.org/api/people/5234/?format=json","name":"Christophe Leroy","email":"christophe.leroy@c-s.fr"},"delegate":null,"mbox":"http://patchwork.ozlabs.org/project/linuxppc-dev/patch/47fddd0f43aaedf31bc55da9ff3114079254452f.1505825623.git.christophe.leroy@c-s.fr/mbox/","series":[{"id":3874,"url":"http://patchwork.ozlabs.org/api/series/3874/?format=json","web_url":"http://patchwork.ozlabs.org/project/linuxppc-dev/list/?series=3874","date":"2017-09-19T12:58:59","name":"crypto: talitos - various fixes","version":1,"mbox":"http://patchwork.ozlabs.org/series/3874/mbox/"}],"comments":"http://patchwork.ozlabs.org/api/patches/815520/comments/","check":"pending","checks":"http://patchwork.ozlabs.org/api/patches/815520/checks/","tags":{},"related":[],"headers":{"Return-Path":"<linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org>","X-Original-To":["patchwork-incoming@ozlabs.org","linuxppc-dev@lists.ozlabs.org"],"Delivered-To":["patchwork-incoming@ozlabs.org","linuxppc-dev@lists.ozlabs.org"],"Received":["from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3])\n\t(using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits))\n\t(No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3xxNLW6rc0z9s7g\n\tfor <patchwork-incoming@ozlabs.org>;\n\tTue, 19 Sep 2017 23:01:55 +1000 (AEST)","from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3])\n\tby lists.ozlabs.org (Postfix) with ESMTP id 3xxNLW5rnwzDr8P\n\tfor <patchwork-incoming@ozlabs.org>;\n\tTue, 19 Sep 2017 23:01:55 +1000 (AEST)","from pegase1.c-s.fr (pegase1.c-s.fr [93.17.236.30])\n\t(using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits))\n\t(No client certificate requested)\n\tby lists.ozlabs.org (Postfix) with ESMTPS id 3xxNHF5Q9DzDqNh\n\tfor <linuxppc-dev@lists.ozlabs.org>;\n\tTue, 19 Sep 2017 22:59:05 +1000 (AEST)","from localhost (mailhub1-int [192.168.12.234])\n\tby localhost (Postfix) with ESMTP id 3xxNH13wjyz9ttBn;\n\tTue, 19 Sep 2017 14:58:53 +0200 (CEST)","from pegase1.c-s.fr ([192.168.12.234])\n\tby localhost (pegase1.c-s.fr [192.168.12.234]) (amavisd-new,\n\tport 10024)\n\twith ESMTP id oqDeyvqAHMf2; Tue, 19 Sep 2017 14:58:53 +0200 (CEST)","from messagerie.si.c-s.fr (messagerie.si.c-s.fr [192.168.25.192])\n\tby pegase1.c-s.fr (Postfix) with ESMTP id 3xxNH12TtNz9ttBd;\n\tTue, 19 Sep 2017 14:58:53 +0200 (CEST)","from localhost (localhost [127.0.0.1])\n\tby messagerie.si.c-s.fr (Postfix) with ESMTP id A7CBB8B827;\n\tTue, 19 Sep 2017 14:59:01 +0200 (CEST)","from messagerie.si.c-s.fr ([127.0.0.1])\n\tby localhost (messagerie.si.c-s.fr [127.0.0.1]) (amavisd-new,\n\tport 10023)\n\twith ESMTP id eRCNVS7dRoUb; Tue, 19 Sep 2017 14:59:01 +0200 (CEST)","from po15668-vm-win7.idsi0.si.c-s.fr (po15451.idsi0.si.c-s.fr\n\t[172.25.231.1])\n\tby messagerie.si.c-s.fr (Postfix) with ESMTP id 815FC8B810;\n\tTue, 19 Sep 2017 14:59:01 +0200 (CEST)","by po15668-vm-win7.idsi0.si.c-s.fr (Postfix, from userid 0)\n\tid 78AAD689A5; Tue, 19 Sep 2017 14:59:01 +0200 (CEST)"],"Authentication-Results":"ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=c-s.fr\n\t(client-ip=93.17.236.30; helo=pegase1.c-s.fr;\n\tenvelope-from=christophe.leroy@c-s.fr; receiver=<UNKNOWN>)","X-Virus-Scanned":["Debian amavisd-new at c-s.fr","amavisd-new at c-s.fr"],"Message-Id":"<47fddd0f43aaedf31bc55da9ff3114079254452f.1505825623.git.christophe.leroy@c-s.fr>","In-Reply-To":"<cover.1505825623.git.christophe.leroy@c-s.fr>","References":"<cover.1505825623.git.christophe.leroy@c-s.fr>","From":"Christophe Leroy <christophe.leroy@c-s.fr>","Subject":"[PATCH 1/6] crypto: talitos - Don't provide setkey for non hmac\n\thashing algs.","To":"Herbert Xu <herbert@gondor.apana.org.au>,\n\tDavid S. Miller <davem@davemloft.net>","Date":"Tue, 19 Sep 2017 14:59:01 +0200 (CEST)","X-BeenThere":"linuxppc-dev@lists.ozlabs.org","X-Mailman-Version":"2.1.24","Precedence":"list","List-Id":"Linux on PowerPC Developers Mail List\n\t<linuxppc-dev.lists.ozlabs.org>","List-Unsubscribe":"<https://lists.ozlabs.org/options/linuxppc-dev>,\n\t<mailto:linuxppc-dev-request@lists.ozlabs.org?subject=unsubscribe>","List-Archive":"<http://lists.ozlabs.org/pipermail/linuxppc-dev/>","List-Post":"<mailto:linuxppc-dev@lists.ozlabs.org>","List-Help":"<mailto:linuxppc-dev-request@lists.ozlabs.org?subject=help>","List-Subscribe":"<https://lists.ozlabs.org/listinfo/linuxppc-dev>,\n\t<mailto:linuxppc-dev-request@lists.ozlabs.org?subject=subscribe>","Cc":"linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org,\n\tlinux-crypto@vger.kernel.org","Errors-To":"linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org","Sender":"\"Linuxppc-dev\"\n\t<linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org>"},"content":"Today, md5sum fails with error -ENOKEY because a setkey\nfunction is set for non hmac hashing algs, see strace output below:\n\nmmap(NULL, 378880, PROT_READ, MAP_SHARED, 6, 0) = 0x77f50000\naccept(3, 0, NULL)                      = 7\nvmsplice(5, [{\"bin/\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\"..., 378880}], 1, SPLICE_F_MORE|SPLICE_F_GIFT) = 262144\nsplice(4, NULL, 7, NULL, 262144, SPLICE_F_MORE) = -1 ENOKEY (Required key not available)\nwrite(2, \"Generation of hash for file kcap\"..., 50) = 50\nmunmap(0x77f50000, 378880)              = 0\n\nThis patch ensures that setkey() function is set only\nfor hmac hashing.\n\nSigned-off-by: Christophe Leroy <christophe.leroy@c-s.fr>\n---\n drivers/crypto/talitos.c | 3 ++-\n 1 file changed, 2 insertions(+), 1 deletion(-)","diff":"diff --git a/drivers/crypto/talitos.c b/drivers/crypto/talitos.c\nindex 79791c690858..5cc160078286 100644\n--- a/drivers/crypto/talitos.c\n+++ b/drivers/crypto/talitos.c\n@@ -3057,7 +3057,8 @@ static struct talitos_crypto_alg *talitos_alg_alloc(struct device *dev,\n \t\tt_alg->algt.alg.hash.final = ahash_final;\n \t\tt_alg->algt.alg.hash.finup = ahash_finup;\n \t\tt_alg->algt.alg.hash.digest = ahash_digest;\n-\t\tt_alg->algt.alg.hash.setkey = ahash_setkey;\n+\t\tif (!strncmp(alg->cra_name, \"hmac\", 4))\n+\t\t\tt_alg->algt.alg.hash.setkey = ahash_setkey;\n \t\tt_alg->algt.alg.hash.import = ahash_import;\n \t\tt_alg->algt.alg.hash.export = ahash_export;\n \n","prefixes":["1/6"]}