Received: by 2002:a25:b794:0:0:0:0:0 with SMTP id n20csp2983927ybh; Mon, 5 Aug 2019 10:01:50 -0700 (PDT) X-Google-Smtp-Source: APXvYqyFa6ew3EDY/u0MO6xW0ffiqDJVfVc0eInfSN4KhMOSrupbYlXlcpgJbeTYjh8h3jLkbd4Z X-Received: by 2002:a17:902:e2:: with SMTP id a89mr146429774pla.210.1565024510703; Mon, 05 Aug 2019 10:01:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1565024510; cv=none; d=google.com; s=arc-20160816; b=BQOwTYU8fymaKLiwcMghc9V+cv3IrsHBFS3WCVUMay1bA8HUKo0q3Vh/kIwV7X0ERf 1JNSVxj9SHdpH5HBHt+Wj+dLh7Ii6RH/Mrh/VIgWDQt7ggV0J/U0bXfRtcDoE7/R2r89 59BstLXFH0Uu6tyxBXQ+TIFDBJqZRltpzvyBG0UnqFfaqkraSE2Lg/CC3EoRUku5IvVx vthewwuFBhgGoUUsZnnUW8DLoOXSPsyOCz5is9fGubzQIaAPC6qvnjd0JeH7c8bSF2os qNSxmQ3JHNRRhoE1dFf/U++c2zEivfi+yqV/f+vHiOJbJLf4LfWoBwt5C5MQhMsiHa2a EyKg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature; bh=XCfq0cibkHau/c01ce7pT9k2NNgLItL6s6kRL+GZ0sg=; b=Zf/JpZlM7jxq2CFfBiWu6mqsu6M5pSFZksmc5YaYcvzC+wdfbCJPUzXOI7jQd+67k7 scWYAGl9BrfYI5Zvof78Y3WK1ALa7as5F6CROQSe10hwE2d0w3IGOHGZnrtHWVIveqAU z0zBMJovkZL+8zAddz7LTQNhW3N6Xphf0z2aXf5/XkpEnknPvPbRjIZaovu+p9RKChUS HsYjSHctK6WBjZR/edeln4VVPu+lfBV8TvG+8GR8JWL6MHXCBbJpO9vgeC4tEw8vfNsx dEaIKG/U+ezMeyK21bYZ0VCzFfSE2mBHugAG3y0jkIk3dsAfRWEf8ZME6BsIcbKyGE4/ Bkzg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ZxWYPB0J; 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 s7si39815151plq.246.2019.08.05.10.01.37; Mon, 05 Aug 2019 10:01:50 -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=ZxWYPB0J; 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 S1729469AbfHERBg (ORCPT + 99 others); Mon, 5 Aug 2019 13:01:36 -0400 Received: from mail-wm1-f65.google.com ([209.85.128.65]:36738 "EHLO mail-wm1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728871AbfHERBg (ORCPT ); Mon, 5 Aug 2019 13:01:36 -0400 Received: by mail-wm1-f65.google.com with SMTP id g67so69612330wme.1 for ; Mon, 05 Aug 2019 10:01:35 -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; bh=XCfq0cibkHau/c01ce7pT9k2NNgLItL6s6kRL+GZ0sg=; b=ZxWYPB0JbZ63jNF90t31kYWxWInvUzFns9iIdrBnjJ9VOvQ8O0i3pjYdJ08edr3C4r gkPcBsr7ZSmbb48Sd5i8Jf12Cg7lHXMPZgVaM2uW4lMFplB3jvxWSV3ZZQtZxO4Nlc6R FlkWEeDKxYt1iU9FXHlp6hCT0pvCJ9XATk6kYVM0NJ1VE/afZRGvU4RHZmXyVRzSimZV j7s/fCJJ3brDJeLzdcwt/tEc5raoavH4s1gKBTgp46IbIGrQ8yr49kyJpjd9N34VUjjJ dLiIm2kQ8ztoGzytlBLsXsIZOaEQg0PDHwdF/BiBJv+e3Xj5IEesR8Nx1Jr7rcmbbDKc wv2g== 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; bh=XCfq0cibkHau/c01ce7pT9k2NNgLItL6s6kRL+GZ0sg=; b=Zo+VxpOqL6DvOlpLBhGn0vW7ydKGhgCQLb4phSaVb0KgEi6xPvJRDOgXm12zAYKYiv McHzMPbgUAuLjiU8C3e/l+4JMCE+w3lfQHN++JRvQyPTNsU3eeLX+V0KvUeL1/cffe4f myQ52DLm+O9qv3itzbkv1+Q3y+TmGrY27JXac8ZChuPZKXSNKd+LDeJ6CT3so4Kt005W o3wv5UgzcZ3MwQ/9oZaTCpONjMdFr3PF9masRAL2E3avP82vFssx761IZLP4Dk32tu/D lI7Q4/uAcoe0cL2Oegh5uvGtlxVTKemkXnfThiWNDoPdFD3YHtDMdgiM3+Rg0XIEmExr L51A== X-Gm-Message-State: APjAAAUH+CCmubH+03uS96p+UrGub8Wgj4p6qZ62B6ycCCj8nA90DQzC o+ldDZURujRBJa57HW6AIhy/dLJSPzTP/g== X-Received: by 2002:a7b:c7cb:: with SMTP id z11mr17844972wmk.24.1565024494514; Mon, 05 Aug 2019 10:01:34 -0700 (PDT) Received: from localhost.localdomain ([2a02:587:a407:da00:582f:8334:9cd9:7241]) by smtp.gmail.com with ESMTPSA id j9sm95669383wrn.81.2019.08.05.10.01.29 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 05 Aug 2019 10:01:33 -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 v4 09/30] crypto: ccp/des - switch to new verification routines Date: Mon, 5 Aug 2019 20:00:16 +0300 Message-Id: <20190805170037.31330-10-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190805170037.31330-1-ard.biesheuvel@linaro.org> References: <20190805170037.31330-1-ard.biesheuvel@linaro.org> 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 | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/drivers/crypto/ccp/ccp-crypto-des3.c b/drivers/crypto/ccp/ccp-crypto-des3.c index 5f05f834c7cd..cbcdf1b5971f 100644 --- a/drivers/crypto/ccp/ccp-crypto-des3.c +++ b/drivers/crypto/ccp/ccp-crypto-des3.c @@ -14,7 +14,7 @@ #include #include #include -#include +#include #include "ccp-crypto.h" @@ -39,11 +39,10 @@ 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); - if (unlikely(err)) + err = crypto_des3_ede_verify_key(crypto_ablkcipher_tfm(tfm), key); + if (err) return err; /* It's not clear that there is any support for a keysize of 112. -- 2.17.1