From patchwork Thu Oct 24 13:23:44 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ard Biesheuvel X-Patchwork-Id: 177498 Delivered-To: patch@linaro.org Received: by 2002:ac9:3c86:0:0:0:0:0 with SMTP id w6csp2156256ocf; Thu, 24 Oct 2019 06:24:35 -0700 (PDT) X-Google-Smtp-Source: APXvYqwNpBjBewsd27mbq6e+CQu/7Hi8/G0vQO81scvBgFro9C292pbxJrUzGp4yyv9M1bweFeR0 X-Received: by 2002:a17:906:2cd2:: with SMTP id r18mr37686637ejr.282.1571923475674; Thu, 24 Oct 2019 06:24:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1571923475; cv=none; d=google.com; s=arc-20160816; b=uumLktA08UVhp+8NcXQIUWlxugYi9EsL50BeIAHYlDmjQqMhp4tVuybCiQ+gmljFNX I08lvDeaBATJamg6Do+luXTmpGaIWDxOog2f9QuPGeopLPGD29WrQvlncuRxa7dvRyjT ix2LXRwm1aLv07Vn8Dyl142PH0uLiKiwUpy1GVpy/iZ4CQEp9ILry06m38PBRyHIDSbO u0KmLz4ZoC/K30aUri1WmhPD6mnVI21SRM9MK1LeVGloHMBtmerQnbLNkcxCLIjvfnmM 5pxUuQM7goNOhbuKq3FxWa6Ali8oI51R9srRBExIvifH9wteMGKiNPtya3LLad/J+T4f 0f6g== 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=pIvf3uaGexOd3cBtkCmgOi+/J9vxhbC8kqb/606IHXY=; b=iQ/mp87Yr/yzbe4m+wSUSx4ghjOXz0PDSx+j3VMhRxDc2C8MulGFGSfVRPqbSnBbY7 4OXwBQrG8jwURt+uUYqOL4ZxZIPqjhjg7bwdG/slZqnB12ygzWI+BR7qogWdwF0Outlq aIn0L6sY2rtmjNZaKs+S6ePA+AKQtI7VmQIbEhb9PbGfHIAQ4ZYhPQdOzZDhIMFm+tUn hEKSF8CXw96Ap4uJsv288xdQJ2D382aUCOzeV5W/Ifl/+8nSI/2FHfeBBBAKQE2xxzdI FTs11JoHBzEhtzKvhGutt/epkHfdERTpdj8Wjtmmidm79LVhGofr9NU40i9UNhlJCq2z XsRQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=FhF56Pxn; 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 e5si14702710ejj.70.2019.10.24.06.24.35; Thu, 24 Oct 2019 06:24:35 -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=FhF56Pxn; 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 S1731935AbfJXNYe (ORCPT + 3 others); Thu, 24 Oct 2019 09:24:34 -0400 Received: from mail-wm1-f67.google.com ([209.85.128.67]:34395 "EHLO mail-wm1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2502434AbfJXNYe (ORCPT ); Thu, 24 Oct 2019 09:24:34 -0400 Received: by mail-wm1-f67.google.com with SMTP id v3so2001226wmh.1 for ; Thu, 24 Oct 2019 06:24:31 -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=pIvf3uaGexOd3cBtkCmgOi+/J9vxhbC8kqb/606IHXY=; b=FhF56Pxn4X3XQVxawn/+Eu+hcpuuhw0C9uevsNl8pV9C/b0nSJu6BuMkHF23q4KPHP oTVaS7ramu0vMoIUrzbPGj99cz/+em3Y8RUF0OJZbHaGBAfjMWUX+jy7li206eJNLk0G l33a4FEzF1w6/MabcLmZJCRjvHdwKPtZPYwgNXB7fJ9JILxo9PdF8DgmmaSxRWnzeUIU DDvwe1/4A4kzlNv/eL5Dxe+zp0FfhFV8tO3KDrngcRbD/B38M29QCnmQV+NvbuX5kyRZ wV4saxxqa1dSh3MwQf7bUIMUcWYJyB8DTpnEotJajuraygBur7fdbEfCbL1L/MrqTWL3 r08w== 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=pIvf3uaGexOd3cBtkCmgOi+/J9vxhbC8kqb/606IHXY=; b=AMIn8GRHT+vSK2XMBF6VriGs2PQMUhBim8Q2V4c43309ZAOQCJe6PDJgd1bednZhMo W4kCmAG7j1CAUkIfw/FovQDCbR+1yGpMZ+OaDEPfRQxfdOUVNGKqDpHMH0kfpE5WVirT ETTkdQ1S5SXoev9hbcbmRPb6HA/c/lFffDGxNZ5dugBcDcHcg0U49PXW30ZUbtjJG3iA 9+g8Hqx5XL03eG24VOVSvXlXOXENrG2WUhhvjr4yKBml5+62t9AelaCMpUYJrThhd8s/ 1Q+ai5XN91lCFgYUx6xfWBCzAyukxTAiolRLruPVr43MxxJx2xyb91VNifgzPHObmPze mhNQ== X-Gm-Message-State: APjAAAWXea4WqspTR4fm6rrDS/7g1LVaext5cXum6HSoEdSfWq6DE0Er /Wq1CDajknzbx4K9iA3jojPewYHUJlSrf7WS X-Received: by 2002:a7b:c94f:: with SMTP id i15mr5107043wml.8.1571923470209; Thu, 24 Oct 2019 06:24:30 -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 e3sm2346310wme.36.2019.10.24.06.24.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 24 Oct 2019 06:24:29 -0700 (PDT) From: Ard Biesheuvel To: linux-crypto@vger.kernel.org Cc: Ard Biesheuvel , Herbert Xu , "David S. Miller" , Eric Biggers , linux-arm-kernel@lists.infradead.org Subject: [PATCH v2 26/27] crypto: marvell/cesa - rename blkcipher to skcipher Date: Thu, 24 Oct 2019 15:23:44 +0200 Message-Id: <20191024132345.5236-27-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20191024132345.5236-1-ard.biesheuvel@linaro.org> References: <20191024132345.5236-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 The driver specific types contain some rudimentary references to the blkcipher API, which is deprecated and will be removed. To avoid confusion, rename these to skcipher. This is a cosmetic change only, as the code does not actually use the blkcipher API. Signed-off-by: Ard Biesheuvel --- drivers/crypto/marvell/cesa.h | 6 +++--- drivers/crypto/marvell/cipher.c | 14 +++++++------- 2 files changed, 10 insertions(+), 10 deletions(-) -- 2.20.1 diff --git a/drivers/crypto/marvell/cesa.h b/drivers/crypto/marvell/cesa.h index d63a6ee905c9..f1ed3b85c0d2 100644 --- a/drivers/crypto/marvell/cesa.h +++ b/drivers/crypto/marvell/cesa.h @@ -232,13 +232,13 @@ struct mv_cesa_sec_accel_desc { }; /** - * struct mv_cesa_blkcipher_op_ctx - cipher operation context + * struct mv_cesa_skcipher_op_ctx - cipher operation context * @key: cipher key * @iv: cipher IV * * Context associated to a cipher operation. */ -struct mv_cesa_blkcipher_op_ctx { +struct mv_cesa_skcipher_op_ctx { u32 key[8]; u32 iv[4]; }; @@ -265,7 +265,7 @@ struct mv_cesa_hash_op_ctx { struct mv_cesa_op_ctx { struct mv_cesa_sec_accel_desc desc; union { - struct mv_cesa_blkcipher_op_ctx blkcipher; + struct mv_cesa_skcipher_op_ctx skcipher; struct mv_cesa_hash_op_ctx hash; } ctx; }; diff --git a/drivers/crypto/marvell/cipher.c b/drivers/crypto/marvell/cipher.c index 84ceddfee76b..d8e8c857770c 100644 --- a/drivers/crypto/marvell/cipher.c +++ b/drivers/crypto/marvell/cipher.c @@ -209,7 +209,7 @@ mv_cesa_skcipher_complete(struct crypto_async_request *req) struct mv_cesa_req *basereq; basereq = &creq->base; - memcpy(skreq->iv, basereq->chain.last->op->ctx.blkcipher.iv, + memcpy(skreq->iv, basereq->chain.last->op->ctx.skcipher.iv, ivsize); } else { memcpy_fromio(skreq->iv, @@ -470,7 +470,7 @@ static int mv_cesa_des_op(struct skcipher_request *req, mv_cesa_update_op_cfg(tmpl, CESA_SA_DESC_CFG_CRYPTM_DES, CESA_SA_DESC_CFG_CRYPTM_MSK); - memcpy(tmpl->ctx.blkcipher.key, ctx->key, DES_KEY_SIZE); + memcpy(tmpl->ctx.skcipher.key, ctx->key, DES_KEY_SIZE); return mv_cesa_skcipher_queue_req(req, tmpl); } @@ -523,7 +523,7 @@ static int mv_cesa_cbc_des_op(struct skcipher_request *req, mv_cesa_update_op_cfg(tmpl, CESA_SA_DESC_CFG_CRYPTCM_CBC, CESA_SA_DESC_CFG_CRYPTCM_MSK); - memcpy(tmpl->ctx.blkcipher.iv, req->iv, DES_BLOCK_SIZE); + memcpy(tmpl->ctx.skcipher.iv, req->iv, DES_BLOCK_SIZE); return mv_cesa_des_op(req, tmpl); } @@ -575,7 +575,7 @@ static int mv_cesa_des3_op(struct skcipher_request *req, mv_cesa_update_op_cfg(tmpl, CESA_SA_DESC_CFG_CRYPTM_3DES, CESA_SA_DESC_CFG_CRYPTM_MSK); - memcpy(tmpl->ctx.blkcipher.key, ctx->key, DES3_EDE_KEY_SIZE); + memcpy(tmpl->ctx.skcipher.key, ctx->key, DES3_EDE_KEY_SIZE); return mv_cesa_skcipher_queue_req(req, tmpl); } @@ -628,7 +628,7 @@ struct skcipher_alg mv_cesa_ecb_des3_ede_alg = { static int mv_cesa_cbc_des3_op(struct skcipher_request *req, struct mv_cesa_op_ctx *tmpl) { - memcpy(tmpl->ctx.blkcipher.iv, req->iv, DES3_EDE_BLOCK_SIZE); + memcpy(tmpl->ctx.skcipher.iv, req->iv, DES3_EDE_BLOCK_SIZE); return mv_cesa_des3_op(req, tmpl); } @@ -694,7 +694,7 @@ static int mv_cesa_aes_op(struct skcipher_request *req, key = ctx->aes.key_enc; for (i = 0; i < ctx->aes.key_length / sizeof(u32); i++) - tmpl->ctx.blkcipher.key[i] = cpu_to_le32(key[i]); + tmpl->ctx.skcipher.key[i] = cpu_to_le32(key[i]); if (ctx->aes.key_length == 24) cfg |= CESA_SA_DESC_CFG_AES_LEN_192; @@ -755,7 +755,7 @@ static int mv_cesa_cbc_aes_op(struct skcipher_request *req, { mv_cesa_update_op_cfg(tmpl, CESA_SA_DESC_CFG_CRYPTCM_CBC, CESA_SA_DESC_CFG_CRYPTCM_MSK); - memcpy(tmpl->ctx.blkcipher.iv, req->iv, AES_BLOCK_SIZE); + memcpy(tmpl->ctx.skcipher.iv, req->iv, AES_BLOCK_SIZE); return mv_cesa_aes_op(req, tmpl); }