From patchwork Thu Jun 27 12:02:53 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ard Biesheuvel X-Patchwork-Id: 167940 Delivered-To: patch@linaro.org Received: by 2002:a92:4782:0:0:0:0:0 with SMTP id e2csp2249536ilk; Thu, 27 Jun 2019 05:03:41 -0700 (PDT) X-Google-Smtp-Source: APXvYqy7NecJketf3qUOnGFgSkiwxi7R6SzSKmooEjK8tQr/h8AHO1iaz+JaClsVqIJSnDLqpgN6 X-Received: by 2002:a17:902:9041:: with SMTP id w1mr4405223plz.132.1561637021533; Thu, 27 Jun 2019 05:03:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1561637021; cv=none; d=google.com; s=arc-20160816; b=UIXeNQA7GuNV1Cx/7rrb8bUGfjZJs4du6Fc2HDK7LDRRzU2K+xbZYCxtcx7/HDuUNk Rm6fKelXrU9IzKVQbUPk7lxgLRY24GKKeXs//Q/cJQawHwPuVkGfriAV1ggXaig6Jgce cNPNns10V8GrpGdVDvemHvTv2uVO3nZoNlm56boxEOuv/prPnVldCn7UgIiL1pAXMHJa 0eSiX1G58bAvRu3m8+N2CVkHDqQP9tg9DivvaG3P+LOskZ2g349A9ic8n7ReZ4EEtvlW 36eZyMjJq6bkHUoAZSDOaWeYGLrC4E2rJ/VMOwB1KLUiCfHOBN/qjtnOpxqdn3BRB3Gk H6oA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=lHSDR9hXz2RwY61iATw9G3CVofBqY/r65kgmZpFGRhg=; b=CtPx9Gl9ZZv44UZwhXCjXp9HPUM13G1a3w3F3Rl+crYr8Bdrc7g9p+yV+BWAEpL10c CYi2woAYVFfc+nOEmJPSMCwUIKJOftNvw7YpWuIO20XFrff44V+DjoqSYBkMbJ29eJbe ucmZoORYAJg8H4nVE7m8j4cKEpH6DFG3mOpKLfXUbX+0Xlfbh3OWEoHmIVtjXQ1CouLM 5WcTLnGzaz1GN4COEiTLZNgiR0KQ7VGttx+f2npOxG9sXi1QNapRzkGoiKht8eaQjyL5 RfC+4WFpfjegjFeyLSdMjwyo6xTLvH6mUlRiTLTl3E52Hbt05rlOXa0W9Kmz3NaXq22H byWw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=lxl9PrJn; spf=pass (google.com: best guess record for domain of linux-crypto-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m39si2229121plg.155.2019.06.27.05.03.41; Thu, 27 Jun 2019 05:03:41 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-crypto-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=lxl9PrJn; spf=pass (google.com: best guess record for domain of linux-crypto-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726757AbfF0MDk (ORCPT + 3 others); Thu, 27 Jun 2019 08:03:40 -0400 Received: from mail-wr1-f65.google.com ([209.85.221.65]:45076 "EHLO mail-wr1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726682AbfF0MDi (ORCPT ); Thu, 27 Jun 2019 08:03:38 -0400 Received: by mail-wr1-f65.google.com with SMTP id f9so2222286wre.12 for ; Thu, 27 Jun 2019 05:03:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=lHSDR9hXz2RwY61iATw9G3CVofBqY/r65kgmZpFGRhg=; b=lxl9PrJnhI5+1RKLQdy37HaAxqgTejXCmY77oXYc9yYiUbVPn49XRaatmT+GGeI7du s5aPFueXIDzd9HvnqxGNEspbrLMasMqHr1k1p6jpQNZgEt3mFabaWX/n1DR75ppSHif+ Fy2LrQJIEl6XOqNF2YfJtN2ghAX0m1XfM7teupYfSZ/cGfcjI566xG3HUrJBzACTpEU1 DqoSNy/av/IqQjyBr05PVtLvVQ+erHXjthP3HG48zW0gX3gMvSBWKiVK/bXCA14Jrq0c rFtoQUqamSfQ9+i/Np1nrdnlroxrOMP4Xd3FQrEfMYsdiIvIue1mlUFTb993je4CIrJF nCwA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=lHSDR9hXz2RwY61iATw9G3CVofBqY/r65kgmZpFGRhg=; b=UNHRkhb4ubSnx2VSg7mf5dmF8RqyEzzboVu730KCEdYIFyfD5PrKE7MAM6SpzfNmo5 OuwoEkECYWTufrLEt6srJX1p7+2jjWU7yFp6Z8st/m7jYNIps90pbsLoc0ylnyAdishQ e1hPDWvtaBKZyyafZS+PnhxiZYtxqIDOf850VNU7bJQ1a/wNsPbB4M0N9dL4K8X5syy1 peAECNziOMvUeqQAyTaQRT9EdSldRuX6sabJFvIPOKAxfPHl9zNX645Ir9PPrjMv3nKe 2/8tEvc50HV4WZB8V1Ea+sPObSPttKYoukpJ+okTgiYjmjdk48Cu3GGe4NONM/v34XoJ Scbg== X-Gm-Message-State: APjAAAVxL3kMTPv7wzZa15dt/fIJYHObV58GbnYaeJTQG7iTuBy1OLzW c1byDldxZbBU55MF6NuLN5UHvgJmeBNH8A== X-Received: by 2002:a5d:400f:: with SMTP id n15mr3117881wrp.312.1561637016060; Thu, 27 Jun 2019 05:03:36 -0700 (PDT) Received: from localhost.localdomain (laubervilliers-657-1-83-120.w92-154.abo.wanadoo.fr. [92.154.90.120]) by smtp.gmail.com with ESMTPSA id z126sm7732431wmb.32.2019.06.27.05.03.35 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Thu, 27 Jun 2019 05:03:35 -0700 (PDT) From: Ard Biesheuvel To: linux-crypto@vger.kernel.org Cc: herbert@gondor.apana.org.au, ebiggers@kernel.org, horia.geanta@nxp.com, Ard Biesheuvel Subject: [PATCH v2 09/30] crypto: ccp/des - switch to new verification routines Date: Thu, 27 Jun 2019 14:02:53 +0200 Message-Id: <20190627120314.7197-10-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190627120314.7197-1-ard.biesheuvel@linaro.org> References: <20190627120314.7197-1-ard.biesheuvel@linaro.org> MIME-Version: 1.0 Sender: linux-crypto-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org Signed-off-by: Ard Biesheuvel --- drivers/crypto/ccp/ccp-crypto-des3.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) -- 2.20.1 diff --git a/drivers/crypto/ccp/ccp-crypto-des3.c b/drivers/crypto/ccp/ccp-crypto-des3.c index 91482ffcac59..0ca0469d7a1e 100644 --- a/drivers/crypto/ccp/ccp-crypto-des3.c +++ b/drivers/crypto/ccp/ccp-crypto-des3.c @@ -17,7 +17,7 @@ #include #include #include -#include +#include #include "ccp-crypto.h" @@ -42,10 +42,9 @@ static int ccp_des3_setkey(struct crypto_ablkcipher *tfm, const u8 *key, struct ccp_ctx *ctx = crypto_tfm_ctx(crypto_ablkcipher_tfm(tfm)); struct ccp_crypto_ablkcipher_alg *alg = ccp_crypto_ablkcipher_alg(crypto_ablkcipher_tfm(tfm)); - u32 *flags = &tfm->base.crt_flags; int err; - err = __des3_verify_key(flags, key); + err = crypto_des3_ede_verify_key(crypto_ablkcipher_tfm(tfm), key); if (unlikely(err)) return err;