From patchwork Wed May 5 20:26:08 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Corentin Labbe X-Patchwork-Id: 431304 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER, INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id B2941C433B4 for ; Wed, 5 May 2021 20:26:30 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 86AF2613FE for ; Wed, 5 May 2021 20:26:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235007AbhEEU1Z (ORCPT ); Wed, 5 May 2021 16:27:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33530 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234960AbhEEU1Z (ORCPT ); Wed, 5 May 2021 16:27:25 -0400 Received: from mail-wr1-x433.google.com (mail-wr1-x433.google.com [IPv6:2a00:1450:4864:20::433]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7599AC061761 for ; Wed, 5 May 2021 13:26:27 -0700 (PDT) Received: by mail-wr1-x433.google.com with SMTP id l14so3219604wrx.5 for ; Wed, 05 May 2021 13:26:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=S273ylil1PBH+oZMCXQ1Btaew0sXCYLtOcO/7ouch+o=; b=Bp6HZMSaLNoIULe4qbu9CLZlGZ7utjPsMXEQtuOG8/BtcvADcx19+D/9ww7KNqF+7D M2n4Cqq4ih3tGNbo+PgFTs0taaA9Lt6AwnZLPhEj/2mJbsrsYAiE/RrCugW52xwX68Fu hYK511GB88qex+LnAw07rP3R+dluaG4oJdjUVJDMkSSS2CX80QwZb0HKA9d60K9HKzs7 9hZNNnHfxeIhQZ9zd0EL1PabJh8kjYxdFoxfsBHr0EFRLCVbEa0U3pv/yKgyYsI/yul+ YeifOi1qU/6UP0n2Vitst52NyhU514Z2fzc2vLNgTrVqOmJFHOhbfJDUuUrRYbx++G5L ae1A== 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=S273ylil1PBH+oZMCXQ1Btaew0sXCYLtOcO/7ouch+o=; b=W8D3A8QHIKVtVPmH7Ifo5Gt3Q8ScvqbHcdJ8S4f5QaJ3zAkX2TLLVVFFSUhTDYD8uT kpOukM/2n2SNDd7XCnTDHs/1Ptue7ev8oefI4R68cbAYAbLcvrzN4aFkNB1koAVtjXA0 6D/XHDEAgrZOZs8qZl6gBAPtbthru4QqMoWGj96sgYVQjICoz5SxzGnpae4R7HyAF1Vi br0DzqF6OsKOkAF91NlTE4xK4LtEXH0ujDzbyrywqepYWM9n3i1MOJoZKDHDKVL9Sh99 IxikgY8TOvL2oDbWpcOR+8c7G4NcFT2PwLbK9MDtee/qDXRrMjNhnzxfYCBHCobI5Ios lpjQ== X-Gm-Message-State: AOAM5306XlJUPKiaOJg35I8hRXWpYW9di0vNIKBZdufkYjUZ7OcPwxCb ySrwFsS1zM6RvPO9bgvc/pCORg== X-Google-Smtp-Source: ABdhPJxACmwt02PG410uR0gx8Unli3fyhvkP/Vj4uJ7iNpjW4OQhnE9zZ1GjnCbbKd0+5wCmoamg/A== X-Received: by 2002:a5d:4e06:: with SMTP id p6mr880333wrt.378.1620246386091; Wed, 05 May 2021 13:26:26 -0700 (PDT) Received: from localhost.localdomain (laubervilliers-658-1-213-31.w90-63.abo.wanadoo.fr. [90.63.244.31]) by smtp.googlemail.com with ESMTPSA id a15sm497245wrr.53.2021.05.05.13.26.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 05 May 2021 13:26:25 -0700 (PDT) From: Corentin Labbe To: chohnstaedt@innominate.com, davem@davemloft.net, herbert@gondor.apana.org.au Cc: linux-crypto@vger.kernel.org, linux-kernel@vger.kernel.org, Corentin Labbe Subject: [PATCH 01/11] crypto: ixp4xx: dma_unmap the correct address Date: Wed, 5 May 2021 20:26:08 +0000 Message-Id: <20210505202618.2663889-2-clabbe@baylibre.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210505202618.2663889-1-clabbe@baylibre.com> References: <20210505202618.2663889-1-clabbe@baylibre.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org Testing ixp4xx_crypto with CONFIG_DMA_API_DEBUG lead to the following error: DMA-API: platform ixp4xx_crypto.0: device driver tries to free DMA memory it has not allocated [device address=0x0000000000000000] [size=24 bytes] This is due to dma_unmap using the wrong address. Fixes: 0d44dc59b2b4 ("crypto: ixp4xx - Fix handling of chained sg buffers") Signed-off-by: Corentin Labbe --- drivers/crypto/ixp4xx_crypto.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/crypto/ixp4xx_crypto.c b/drivers/crypto/ixp4xx_crypto.c index 0616e369522e..ed3deaa5ed2b 100644 --- a/drivers/crypto/ixp4xx_crypto.c +++ b/drivers/crypto/ixp4xx_crypto.c @@ -330,7 +330,7 @@ static void free_buf_chain(struct device *dev, struct buffer_desc *buf, buf1 = buf->next; phys1 = buf->phys_next; - dma_unmap_single(dev, buf->phys_next, buf->buf_len, buf->dir); + dma_unmap_single(dev, buf->phys_addr, buf->buf_len, buf->dir); dma_pool_free(buffer_pool, buf, phys); buf = buf1; phys = phys1; From patchwork Wed May 5 20:26:09 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Corentin Labbe X-Patchwork-Id: 431303 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER, INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id BE56EC43461 for ; Wed, 5 May 2021 20:26:30 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 9BF3C61401 for ; Wed, 5 May 2021 20:26:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234960AbhEEU10 (ORCPT ); Wed, 5 May 2021 16:27:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33542 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234987AbhEEU1Z (ORCPT ); Wed, 5 May 2021 16:27:25 -0400 Received: from mail-wm1-x334.google.com (mail-wm1-x334.google.com [IPv6:2a00:1450:4864:20::334]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0E81FC06174A for ; Wed, 5 May 2021 13:26:28 -0700 (PDT) Received: by mail-wm1-x334.google.com with SMTP id n84so2181015wma.0 for ; Wed, 05 May 2021 13:26:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=geSaV6u3XqnSyXvPUEqcEIkcIHLSdxJiGRaPxg2uuDM=; b=2CYr0rnZRPnS5emc9+jzaU3nBdpUQiMsCZINuwplZ1aNmCXhl7qL1YezNJyUFcfOoQ fiAbbwHdjI8w18qPAH3Q1Idw5bcXAw+2enxtWgB4Fet3v6yVCrggBFvyv/sEkeCixBmj bjE6BFRRSo6msfmEnzCmeD2qkaV+MLrYU+MZnQ963AKCRgPP6x/BgPk17tYWePzaQeuy ldfvs/Nkw5Xbr/VC9SyfJlrKgcGNE1RI3dFFbV9wvQvN0D9yKp6g38dnFENlcAfBr0Xp Legpoxrvo7tw1viDkUR1N9tJS+Xw2vq+2cfj8inow2ffYj9Z7dtpZd8IiKh+/NxUfmOQ 8eDg== 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=geSaV6u3XqnSyXvPUEqcEIkcIHLSdxJiGRaPxg2uuDM=; b=S/Z5n39mjHWdIpXcsejcRDF3x2vq6RcU/PD/+K8qjW0GW+XFinQR/rzgiH8aAYzAwd RocXp56MLEOYWhxAKPc6bc0WGCUY26ybsh/dcnlJV0jGJuFcXQyS0hYwFz5tcRAUF/GX dk+th3cJpehYVeWLsruM2tnhm0ZGfY+x2raXcxDa3rjWzqpydRTdz4ASp7S7IXg0l2LN q8wSNSobV7Jpl8GtKAm9oROPnw2cH2nkEYYFh+e/17tuRv5Ko9atETzI3MXwj8Zuq8Su /kxZcQ61EB1JU8u168T/VpiVWAoF4Sd/vfje5W74MS6KMKcZ8pJiL/VbMPZA1jbwuFcB TYWw== X-Gm-Message-State: AOAM530+sXlYDpCHLpeHSAq9PtJj8qahimMU/WEYabTeIPsabYu9DCF7 4nrEbuCECFVY11i7zNPzfwsLGA== X-Google-Smtp-Source: ABdhPJz4jwSCHfYQdFcvocO9Uyyjdfg6thYq+WyJkC1A6vR1jLLoHo3E3+t+8qjoQLRGH/E0pY1pfQ== X-Received: by 2002:a1c:7209:: with SMTP id n9mr553944wmc.60.1620246386839; Wed, 05 May 2021 13:26:26 -0700 (PDT) Received: from localhost.localdomain (laubervilliers-658-1-213-31.w90-63.abo.wanadoo.fr. [90.63.244.31]) by smtp.googlemail.com with ESMTPSA id a15sm497245wrr.53.2021.05.05.13.26.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 05 May 2021 13:26:26 -0700 (PDT) From: Corentin Labbe To: chohnstaedt@innominate.com, davem@davemloft.net, herbert@gondor.apana.org.au Cc: linux-crypto@vger.kernel.org, linux-kernel@vger.kernel.org, Corentin Labbe Subject: [PATCH 02/11] crypto: ixp4xx: update IV after requests Date: Wed, 5 May 2021 20:26:09 +0000 Message-Id: <20210505202618.2663889-3-clabbe@baylibre.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210505202618.2663889-1-clabbe@baylibre.com> References: <20210505202618.2663889-1-clabbe@baylibre.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org Crypto selftests fail on ixp4xx since it do not update IV after skcipher requests. Fixes: 81bef0150074 ("crypto: ixp4xx - Hardware crypto support for IXP4xx CPUs") Signed-off-by: Corentin Labbe --- drivers/crypto/ixp4xx_crypto.c | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/drivers/crypto/ixp4xx_crypto.c b/drivers/crypto/ixp4xx_crypto.c index ed3deaa5ed2b..f577ee4afd06 100644 --- a/drivers/crypto/ixp4xx_crypto.c +++ b/drivers/crypto/ixp4xx_crypto.c @@ -149,6 +149,8 @@ struct crypt_ctl { struct ablk_ctx { struct buffer_desc *src; struct buffer_desc *dst; + u8 iv[MAX_IVLEN]; + bool encrypt; }; struct aead_ctx { @@ -381,6 +383,20 @@ static void one_packet(dma_addr_t phys) case CTL_FLAG_PERFORM_ABLK: { struct skcipher_request *req = crypt->data.ablk_req; struct ablk_ctx *req_ctx = skcipher_request_ctx(req); + struct crypto_skcipher *tfm = crypto_skcipher_reqtfm(req); + unsigned int ivsize = crypto_skcipher_ivsize(tfm); + unsigned int offset; + + if (ivsize > 0) { + offset = req->cryptlen - ivsize; + if (req_ctx->encrypt) { + scatterwalk_map_and_copy(req->iv, req->dst, + offset, ivsize, 0); + } else { + memcpy(req->iv, req_ctx->iv, ivsize); + memzero_explicit(req_ctx->iv, ivsize); + } + } if (req_ctx->dst) { free_buf_chain(dev, req_ctx->dst, crypt->dst_buf); @@ -876,6 +892,7 @@ static int ablk_perform(struct skcipher_request *req, int encrypt) struct ablk_ctx *req_ctx = skcipher_request_ctx(req); struct buffer_desc src_hook; struct device *dev = &pdev->dev; + unsigned int offset; gfp_t flags = req->base.flags & CRYPTO_TFM_REQ_MAY_SLEEP ? GFP_KERNEL : GFP_ATOMIC; @@ -885,6 +902,7 @@ static int ablk_perform(struct skcipher_request *req, int encrypt) return -EAGAIN; dir = encrypt ? &ctx->encrypt : &ctx->decrypt; + req_ctx->encrypt = encrypt; crypt = get_crypt_desc(); if (!crypt) @@ -900,6 +918,10 @@ static int ablk_perform(struct skcipher_request *req, int encrypt) BUG_ON(ivsize && !req->iv); memcpy(crypt->iv, req->iv, ivsize); + if (ivsize > 0 && !encrypt) { + offset = req->cryptlen - ivsize; + scatterwalk_map_and_copy(req_ctx->iv, req->src, offset, ivsize, 0); + } if (req->src != req->dst) { struct buffer_desc dst_hook; crypt->mode |= NPE_OP_NOT_IN_PLACE; From patchwork Wed May 5 20:26:11 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Corentin Labbe X-Patchwork-Id: 431302 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER, INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 16039C43460 for ; Wed, 5 May 2021 20:26:37 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id EA38C61057 for ; Wed, 5 May 2021 20:26:36 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235444AbhEEU1c (ORCPT ); Wed, 5 May 2021 16:27:32 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33548 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235254AbhEEU11 (ORCPT ); Wed, 5 May 2021 16:27:27 -0400 Received: from mail-wr1-x432.google.com (mail-wr1-x432.google.com [IPv6:2a00:1450:4864:20::432]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 981FEC061574 for ; Wed, 5 May 2021 13:26:29 -0700 (PDT) Received: by mail-wr1-x432.google.com with SMTP id l13so3203073wru.11 for ; Wed, 05 May 2021 13:26:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=qNHcmRakO4ShV9Tx/kw4hZ3DZlWxxa2CciC+xe4iDkw=; b=ZGHzV3C0LweoW7LZFx17Cue7cb1oRbtXcybhex81gLaPOYS/x3q8xHNV0ndBEBh+u6 6T+rhqzodln3fzWoMJCk5sbQdTEgJhJFvG+vh4JAJCFTHsD1NJkvFTBjjZyAChFNL+ry tFw6uJb65nh9atC93vEo6A3SXrJv/3xoeUIqetLTsuwEipPxLzLTwrU8qYRABT8DomCu 7T+WUVGDJbkj/wsaXIu/LK/hyRdIvaS8i54dN+2ARwlIPjTH4M+kVINXl0YApaBDF1w0 VhXRwq8+sNUQeulqSExfio9FKyhu87k6oAn41DRHYf9qkI7qrct2oZsXIMLhI/WPTJA7 AW3g== 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=qNHcmRakO4ShV9Tx/kw4hZ3DZlWxxa2CciC+xe4iDkw=; b=oejdqMvxV6JqOF+QTknQXnNjKsEtGh5WrT++2Yf0n1mlZZ0VuW6R7oRlO1XJX9Ctli ebWYoEmbymNHWISYgoB0zOkxYX3ndlbHCyhZuUKUcOilvA2Ca1n8Wjxj5+49psikJsdu x23w0JtqeSji+gWK2id92x09c+op0juUf7p0ek1pNjMxpskgtxa5SPBZLEDF0Sv5hzgX raDXQOlakztqoDOrCTH6oPO/5BOrYz1CBZ+8SsmmkeuFCsUgy7BFGGjCzGstqsJMdfZ2 iejxpFTyABcbK0DapgG9lxUry/kyzb8McjzLtZLF/r3R/o6+95XV75Wf7H/fpMbvFnjb a2Tw== X-Gm-Message-State: AOAM532UQ+DyY01nV7+LFLYJJRXNLZIAzsZJ2NhdHH5vUGBE/oVRCzLN TBrOtBe5z/nfznvT06GhGAGlwA== X-Google-Smtp-Source: ABdhPJx3HAtoecZ3LrqPdXeOVl4Y6DnFRP713ydPKXezA4AaHQl/5MlcA4VJMRR2hH6IWyu1opcTTg== X-Received: by 2002:a5d:4e0b:: with SMTP id p11mr903183wrt.220.1620246388414; Wed, 05 May 2021 13:26:28 -0700 (PDT) Received: from localhost.localdomain (laubervilliers-658-1-213-31.w90-63.abo.wanadoo.fr. [90.63.244.31]) by smtp.googlemail.com with ESMTPSA id a15sm497245wrr.53.2021.05.05.13.26.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 05 May 2021 13:26:28 -0700 (PDT) From: Corentin Labbe To: chohnstaedt@innominate.com, davem@davemloft.net, herbert@gondor.apana.org.au Cc: linux-crypto@vger.kernel.org, linux-kernel@vger.kernel.org, Corentin Labbe Subject: [PATCH 04/11] crypto: ixp4xx: convert unsigned to unsigned int Date: Wed, 5 May 2021 20:26:11 +0000 Message-Id: <20210505202618.2663889-5-clabbe@baylibre.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210505202618.2663889-1-clabbe@baylibre.com> References: <20210505202618.2663889-1-clabbe@baylibre.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org Fixes all issues reported by checkpatch about "unsigned", lets convert them to unsigned int. Signed-off-by: Corentin Labbe --- drivers/crypto/ixp4xx_crypto.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/drivers/crypto/ixp4xx_crypto.c b/drivers/crypto/ixp4xx_crypto.c index 8bbf2ead6e79..17de9e60adad 100644 --- a/drivers/crypto/ixp4xx_crypto.c +++ b/drivers/crypto/ixp4xx_crypto.c @@ -136,7 +136,7 @@ struct crypt_ctl { u32 crypto_ctx; /* NPE Crypto Param structure address */ /* Used by Host: 4*4 bytes*/ - unsigned ctl_flags; + unsigned int ctl_flags; union { struct skcipher_request *ablk_req; struct aead_request *aead_req; @@ -184,7 +184,7 @@ struct ixp_ctx { u8 enckey[MAX_KEYLEN]; u8 salt[MAX_IVLEN]; u8 nonce[CTR_RFC3686_NONCE_SIZE]; - unsigned salted; + unsigned int salted; atomic_t configuring; struct completion completion; struct crypto_skcipher *fallback_tfm; @@ -695,8 +695,8 @@ static int register_chain_var(struct crypto_tfm *tfm, u8 xpad, u32 target, return 0; } -static int setup_auth(struct crypto_tfm *tfm, int encrypt, unsigned authsize, - const u8 *key, int key_len, unsigned digest_len) +static int setup_auth(struct crypto_tfm *tfm, int encrypt, unsigned int authsize, + const u8 *key, int key_len, unsigned int digest_len) { u32 itarget, otarget, npe_ctx_addr; unsigned char *cinfo; @@ -823,12 +823,12 @@ static int setup_cipher(struct crypto_tfm *tfm, int encrypt, } static struct buffer_desc *chainup_buffers(struct device *dev, - struct scatterlist *sg, unsigned nbytes, + struct scatterlist *sg, unsigned int nbytes, struct buffer_desc *buf, gfp_t flags, enum dma_data_direction dir) { for (; nbytes > 0; sg = sg_next(sg)) { - unsigned len = min(nbytes, sg->length); + unsigned int len = min(nbytes, sg->length); struct buffer_desc *next_buf; dma_addr_t next_buf_phys; void *ptr; @@ -930,7 +930,7 @@ static int ablk_perform(struct skcipher_request *req, int encrypt) { struct crypto_skcipher *tfm = crypto_skcipher_reqtfm(req); struct ixp_ctx *ctx = crypto_skcipher_ctx(tfm); - unsigned ivsize = crypto_skcipher_ivsize(tfm); + unsigned int ivsize = crypto_skcipher_ivsize(tfm); struct ix_sa_dir *dir; struct crypt_ctl *crypt; unsigned int nbytes = req->cryptlen; @@ -1045,8 +1045,8 @@ static int aead_perform(struct aead_request *req, int encrypt, { struct crypto_aead *tfm = crypto_aead_reqtfm(req); struct ixp_ctx *ctx = crypto_aead_ctx(tfm); - unsigned ivsize = crypto_aead_ivsize(tfm); - unsigned authsize = crypto_aead_authsize(tfm); + unsigned int ivsize = crypto_aead_ivsize(tfm); + unsigned int authsize = crypto_aead_authsize(tfm); struct ix_sa_dir *dir; struct crypt_ctl *crypt; unsigned int cryptlen; @@ -1157,7 +1157,7 @@ static int aead_perform(struct aead_request *req, int encrypt, static int aead_setup(struct crypto_aead *tfm, unsigned int authsize) { struct ixp_ctx *ctx = crypto_aead_ctx(tfm); - unsigned digest_len = crypto_aead_maxauthsize(tfm); + unsigned int digest_len = crypto_aead_maxauthsize(tfm); int ret; if (!ctx->enckey_len && !ctx->authkey_len) From patchwork Wed May 5 20:26:14 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Corentin Labbe X-Patchwork-Id: 431301 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER, INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6D01AC433ED for ; Wed, 5 May 2021 20:26:45 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 4E5E9613D6 for ; Wed, 5 May 2021 20:26:45 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235520AbhEEU1k (ORCPT ); Wed, 5 May 2021 16:27:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33584 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235083AbhEEU1b (ORCPT ); Wed, 5 May 2021 16:27:31 -0400 Received: from mail-wr1-x42a.google.com (mail-wr1-x42a.google.com [IPv6:2a00:1450:4864:20::42a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1406BC06138D for ; Wed, 5 May 2021 13:26:32 -0700 (PDT) Received: by mail-wr1-x42a.google.com with SMTP id l13so3203175wru.11 for ; Wed, 05 May 2021 13:26:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=TsTr8xhyvOq2/KUMVDYhNF2zkO3qagBOj+gKv7W+VAE=; b=xwhYVR3pXtNBDDAdWPckdTbhc5SdSF3gpi71wNopA7snaNRwF0AJMIdZMpCIXIBdpd 01HVLi77gO/8O5MqHXuCxsinWxrIH4ny3UpahG3+YeIks5nGfDodRRLuRvJveqYzS+LX QyB1aX0tKGnEhFmKnVTrO/8iGDbbElMyKb19z0ZF9GKqE9Ahb5yyNwnFXHiANMS/p5qL Mvpdds1lJEE/mwRVhaaTckHWQQ0slAT3pp6/oC6deyNLoNSPWJbqfrOcFWXAN/6jM6oe VeHCy39MoUH9PXf64zgrwhYEfz0iGEn/NBQCbgeKa8GjBKL/CKIHw4hr58TU1QA3UpvH QA2g== 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=TsTr8xhyvOq2/KUMVDYhNF2zkO3qagBOj+gKv7W+VAE=; b=jZbPGGPSfyTnklSmotIt8Aa/govxQ0kN895cTPTNkfx0lNV7AsBdWzvEYDrke3gkbu aiVPPNGVmLLCbqpyC7BA2CP+KCeRjyeXtTlHj0/8M6cyCH2vIuuoMCW58fBineQ4W7oN 04NA9Pm5HHN7iflTGr5e0Xm9Zi21xhVQHeSyHHZv+qi3XsWNehFox8mwiG96M2t2jfxg nZUmm73J2HoM2MKxyqL6GN2tGFWb2mr510tokLhJ20bKwzHApWS8FkgV5kCm019txPms DkLI1LzmePk6MxjK2YJB0jt+DioDNNOVEZofm9hOduuT03omg4UTI5XlV8PX4kMyM+px Vi5A== X-Gm-Message-State: AOAM531fONxyyUEBX7KTe/NLxlWNmBJAlmWwxY+nrUxYc+7yqyg1x8GP XZHtCvMf/XJN8CPNf4Jo78gg0A== X-Google-Smtp-Source: ABdhPJzJwSWhqGP8eX2CBd79ELjEJRHC/2Mz/y4/G3T2FEYUUPGebl79MKevNoKTcP0DX7ZqC1c+zg== X-Received: by 2002:adf:efc3:: with SMTP id i3mr875780wrp.243.1620246390870; Wed, 05 May 2021 13:26:30 -0700 (PDT) Received: from localhost.localdomain (laubervilliers-658-1-213-31.w90-63.abo.wanadoo.fr. [90.63.244.31]) by smtp.googlemail.com with ESMTPSA id a15sm497245wrr.53.2021.05.05.13.26.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 05 May 2021 13:26:30 -0700 (PDT) From: Corentin Labbe To: chohnstaedt@innominate.com, davem@davemloft.net, herbert@gondor.apana.org.au Cc: linux-crypto@vger.kernel.org, linux-kernel@vger.kernel.org, Corentin Labbe Subject: [PATCH 07/11] crypto: ixp4xx: Do not initialize static to NULL Date: Wed, 5 May 2021 20:26:14 +0000 Message-Id: <20210505202618.2663889-8-clabbe@baylibre.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210505202618.2663889-1-clabbe@baylibre.com> References: <20210505202618.2663889-1-clabbe@baylibre.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org This patch fixes all checkpatch report about static init. Signed-off-by: Corentin Labbe --- drivers/crypto/ixp4xx_crypto.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/crypto/ixp4xx_crypto.c b/drivers/crypto/ixp4xx_crypto.c index 5b8ffa4db45d..954696a39875 100644 --- a/drivers/crypto/ixp4xx_crypto.c +++ b/drivers/crypto/ixp4xx_crypto.c @@ -221,10 +221,10 @@ static const struct ix_hash_algo hash_alg_sha1 = { }; static struct npe *npe_c; -static struct dma_pool *buffer_pool = NULL; -static struct dma_pool *ctx_pool = NULL; +static struct dma_pool *buffer_pool; +static struct dma_pool *ctx_pool; -static struct crypt_ctl *crypt_virt = NULL; +static struct crypt_ctl *crypt_virt; static dma_addr_t crypt_phys; static int support_aes = 1; @@ -275,7 +275,7 @@ static DEFINE_SPINLOCK(desc_lock); static struct crypt_ctl *get_crypt_desc(void) { int i; - static int idx = 0; + static int idx; unsigned long flags; spin_lock_irqsave(&desc_lock, flags); From patchwork Wed May 5 20:26:16 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Corentin Labbe X-Patchwork-Id: 431300 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER, INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id E5BC1C43460 for ; Wed, 5 May 2021 20:26:50 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id C9C95613D6 for ; Wed, 5 May 2021 20:26:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235421AbhEEU1n (ORCPT ); Wed, 5 May 2021 16:27:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33596 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235434AbhEEU1c (ORCPT ); Wed, 5 May 2021 16:27:32 -0400 Received: from mail-wm1-x32d.google.com (mail-wm1-x32d.google.com [IPv6:2a00:1450:4864:20::32d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EB633C06174A for ; Wed, 5 May 2021 13:26:33 -0700 (PDT) Received: by mail-wm1-x32d.google.com with SMTP id n84so2181136wma.0 for ; Wed, 05 May 2021 13:26:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=fXYl2Kd9Z6DQd+07hwt5I3DejWQEV84aSXZywdSKmBg=; b=gQwq39oS6hiFY8oCq851HXtNpZypSZVJ8gFMcTbUbVPYtJAh888yMkV2QWPTtn5bpV JfGNOSS06+ggZrmcvIM7RXycCFkDUkx6fi5tfNvAjN7eSl9Jsof+tVxVSyWVWVTPq/BJ QVXusoJK5qVqDGxkz15LRFUHu+eDjHSK4eZyklRF+tHvSXP8rxnP+EzEy8nE/yHVZ9Cp ba1nPjfTV/xzb/2hkdzWr8SqsA9yB2kAhoQ+NiN03TM4mL9Gsd2OkYa0kuPiIKfbu1Cy J2MxyQd2YudzAXStRG4aaoDf+/ysQsB+JVQLvn2gDPobWkPdoWLX1QDw9uIHqoiACVCe dt0A== 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=fXYl2Kd9Z6DQd+07hwt5I3DejWQEV84aSXZywdSKmBg=; b=GmTGzA5DcVnCFvg0/oZcvOB8k/40r8ISgrGrIDnembPckQU0fsgagUESl+3NBcLltB KVs5AQKw32OTSz3YGQ4SbosqSHzHh/iTikcMVyJtIwde+bLIUyvZCLj/UVZbfsSKPTGR aDTBWXrrhtkmTUzjr/La/lproXe4L0IUfktZvSLEIXRsbGXN4kThSfRv29HoloNLLLdK de8je2/vb+bOP1Och9fiBMrwyB0eNYdC1+XSQFHc8MBDrc+Rp/lyESbAtQp9Ubzby9c8 FxK09lCmdIWNjnPBjkjsJ+zpV1GXGWUtpSWituBEL2IWhxFswPc93GKDW552B8oeKQUL HgEA== X-Gm-Message-State: AOAM530yPa2U8/v3JitFGfhnBnxYqLZ+XSwIgQuvgLlaV32+NVnpFxVF KwkYg8bfWkitg7d993BgDrFn1g== X-Google-Smtp-Source: ABdhPJxYOjVF2q+jc2hsn/yko6RJPWYwLB+DbB/5M0S2mjv83OOsGwHbZ3doiTE9fozjnpqAepUPMA== X-Received: by 2002:a7b:c303:: with SMTP id k3mr558273wmj.100.1620246392503; Wed, 05 May 2021 13:26:32 -0700 (PDT) Received: from localhost.localdomain (laubervilliers-658-1-213-31.w90-63.abo.wanadoo.fr. [90.63.244.31]) by smtp.googlemail.com with ESMTPSA id a15sm497245wrr.53.2021.05.05.13.26.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 05 May 2021 13:26:32 -0700 (PDT) From: Corentin Labbe To: chohnstaedt@innominate.com, davem@davemloft.net, herbert@gondor.apana.org.au Cc: linux-crypto@vger.kernel.org, linux-kernel@vger.kernel.org, Corentin Labbe Subject: [PATCH 09/11] crypto: ixp4xx: Correct functions alignment Date: Wed, 5 May 2021 20:26:16 +0000 Message-Id: <20210505202618.2663889-10-clabbe@baylibre.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210505202618.2663889-1-clabbe@baylibre.com> References: <20210505202618.2663889-1-clabbe@baylibre.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org This patch fixes all alignment issues reported by checkpatch. Signed-off-by: Corentin Labbe --- drivers/crypto/ixp4xx_crypto.c | 65 ++++++++++++++++++---------------- 1 file changed, 35 insertions(+), 30 deletions(-) diff --git a/drivers/crypto/ixp4xx_crypto.c b/drivers/crypto/ixp4xx_crypto.c index 03ae9c3a8d97..b38650b0fea1 100644 --- a/drivers/crypto/ixp4xx_crypto.c +++ b/drivers/crypto/ixp4xx_crypto.c @@ -354,8 +354,8 @@ static void finish_scattered_hmac(struct crypt_ctl *crypt) int decryptlen = req->assoclen + req->cryptlen - authsize; if (req_ctx->encrypt) { - scatterwalk_map_and_copy(req_ctx->hmac_virt, - req->dst, decryptlen, authsize, 1); + scatterwalk_map_and_copy(req_ctx->hmac_virt, req->dst, + decryptlen, authsize, 1); } dma_pool_free(buffer_pool, req_ctx->hmac_virt, crypt->icv_rev_aes); } @@ -412,7 +412,7 @@ static void one_packet(dma_addr_t phys) case CTL_FLAG_GEN_ICV: ctx = crypto_tfm_ctx(crypt->data.tfm); dma_pool_free(ctx_pool, crypt->regist_ptr, - crypt->regist_buf->phys_addr); + crypt->regist_buf->phys_addr); dma_pool_free(buffer_pool, crypt->regist_buf, crypt->src_buf); if (atomic_dec_and_test(&ctx->configuring)) complete(&ctx->completion); @@ -494,14 +494,13 @@ static int init_ixp_crypto(struct device *dev) * so assure it is large enough */ BUILD_BUG_ON(SHA1_DIGEST_SIZE > sizeof(struct buffer_desc)); - buffer_pool = dma_pool_create("buffer", dev, - sizeof(struct buffer_desc), 32, 0); + buffer_pool = dma_pool_create("buffer", dev, sizeof(struct buffer_desc), + 32, 0); ret = -ENOMEM; if (!buffer_pool) goto err; - ctx_pool = dma_pool_create("context", dev, - NPE_CTX_LEN, 16, 0); + ctx_pool = dma_pool_create("context", dev, NPE_CTX_LEN, 16, 0); if (!ctx_pool) goto err; @@ -546,9 +545,8 @@ static void release_ixp_crypto(struct device *dev) npe_release(npe_c); if (crypt_virt) - dma_free_coherent(dev, - NPE_QLEN * sizeof(struct crypt_ctl), - crypt_virt, crypt_phys); + dma_free_coherent(dev, NPE_QLEN * sizeof(struct crypt_ctl), + crypt_virt, crypt_phys); } static void reset_sa_dir(struct ix_sa_dir *dir) @@ -641,7 +639,8 @@ static void exit_tfm_aead(struct crypto_aead *tfm) } static int register_chain_var(struct crypto_tfm *tfm, u8 xpad, u32 target, - int init_len, u32 ctx_addr, const u8 *key, int key_len) + int init_len, u32 ctx_addr, const u8 *key, + int key_len) { struct ixp_ctx *ctx = crypto_tfm_ctx(tfm); struct crypt_ctl *crypt; @@ -735,11 +734,11 @@ static int setup_auth(struct crypto_tfm *tfm, int encrypt, unsigned int authsize dir->npe_mode |= NPE_OP_HASH_VERIFY; ret = register_chain_var(tfm, HMAC_OPAD_VALUE, otarget, - init_len, npe_ctx_addr, key, key_len); + init_len, npe_ctx_addr, key, key_len); if (ret) return ret; return register_chain_var(tfm, HMAC_IPAD_VALUE, itarget, - init_len, npe_ctx_addr, key, key_len); + init_len, npe_ctx_addr, key, key_len); } static int gen_rev_aes_key(struct crypto_tfm *tfm) @@ -770,8 +769,8 @@ static int gen_rev_aes_key(struct crypto_tfm *tfm) return 0; } -static int setup_cipher(struct crypto_tfm *tfm, int encrypt, - const u8 *key, int key_len) +static int setup_cipher(struct crypto_tfm *tfm, int encrypt, const u8 *key, + int key_len) { u8 *cinfo; u32 cipher_cfg; @@ -791,9 +790,15 @@ static int setup_cipher(struct crypto_tfm *tfm, int encrypt, } if (cipher_cfg & MOD_AES) { switch (key_len) { - case 16: keylen_cfg = MOD_AES128; break; - case 24: keylen_cfg = MOD_AES192; break; - case 32: keylen_cfg = MOD_AES256; break; + case 16: + keylen_cfg = MOD_AES128; + break; + case 24: + keylen_cfg = MOD_AES192; + break; + case 32: + keylen_cfg = MOD_AES256; + break; default: return -EINVAL; } @@ -855,7 +860,7 @@ static struct buffer_desc *chainup_buffers(struct device *dev, } static int ablk_setkey(struct crypto_skcipher *tfm, const u8 *key, - unsigned int key_len) + unsigned int key_len) { struct ixp_ctx *ctx = crypto_skcipher_ctx(tfm); int ret; @@ -892,7 +897,7 @@ static int ablk_des3_setkey(struct crypto_skcipher *tfm, const u8 *key, } static int ablk_rfc3686_setkey(struct crypto_skcipher *tfm, const u8 *key, - unsigned int key_len) + unsigned int key_len) { struct ixp_ctx *ctx = crypto_skcipher_ctx(tfm); @@ -901,7 +906,7 @@ static int ablk_rfc3686_setkey(struct crypto_skcipher *tfm, const u8 *key, return -EINVAL; memcpy(ctx->nonce, key + (key_len - CTR_RFC3686_NONCE_SIZE), - CTR_RFC3686_NONCE_SIZE); + CTR_RFC3686_NONCE_SIZE); key_len -= CTR_RFC3686_NONCE_SIZE; return ablk_setkey(tfm, key, key_len); @@ -979,7 +984,7 @@ static int ablk_perform(struct skcipher_request *req, int encrypt) * for more than one dst buffer, I think. */ req_ctx->dst = NULL; if (!chainup_buffers(dev, req->dst, nbytes, &dst_hook, - flags, DMA_FROM_DEVICE)) + flags, DMA_FROM_DEVICE)) goto free_buf_dest; src_direction = DMA_TO_DEVICE; req_ctx->dst = dst_hook.next; @@ -988,8 +993,8 @@ static int ablk_perform(struct skcipher_request *req, int encrypt) req_ctx->dst = NULL; } req_ctx->src = NULL; - if (!chainup_buffers(dev, req->src, nbytes, &src_hook, - flags, src_direction)) + if (!chainup_buffers(dev, req->src, nbytes, &src_hook, flags, + src_direction)) goto free_buf_src; req_ctx->src = src_hook.next; @@ -1042,7 +1047,7 @@ static int ablk_rfc3686_crypt(struct skcipher_request *req) } static int aead_perform(struct aead_request *req, int encrypt, - int cryptoffset, int eff_cryptlen, u8 *iv) + int cryptoffset, int eff_cryptlen, u8 *iv) { struct crypto_aead *tfm = crypto_aead_reqtfm(req); struct ixp_ctx *ctx = crypto_aead_ctx(tfm); @@ -1130,12 +1135,12 @@ static int aead_perform(struct aead_request *req, int encrypt, /* The 12 hmac bytes are scattered, * we need to copy them into a safe buffer */ req_ctx->hmac_virt = dma_pool_alloc(buffer_pool, flags, - &crypt->icv_rev_aes); + &crypt->icv_rev_aes); if (unlikely(!req_ctx->hmac_virt)) goto free_buf_dst; if (!encrypt) { scatterwalk_map_and_copy(req_ctx->hmac_virt, - req->src, cryptlen, authsize, 0); + req->src, cryptlen, authsize, 0); } req_ctx->encrypt = encrypt; } else { @@ -1176,11 +1181,11 @@ static int aead_setup(struct crypto_aead *tfm, unsigned int authsize) if (ret) goto out; ret = setup_auth(&tfm->base, 0, authsize, ctx->authkey, - ctx->authkey_len, digest_len); + ctx->authkey_len, digest_len); if (ret) goto out; ret = setup_auth(&tfm->base, 1, authsize, ctx->authkey, - ctx->authkey_len, digest_len); + ctx->authkey_len, digest_len); out: if (!atomic_dec_and_test(&ctx->configuring)) wait_for_completion(&ctx->completion); @@ -1197,7 +1202,7 @@ static int aead_setauthsize(struct crypto_aead *tfm, unsigned int authsize) } static int aead_setkey(struct crypto_aead *tfm, const u8 *key, - unsigned int keylen) + unsigned int keylen) { struct ixp_ctx *ctx = crypto_aead_ctx(tfm); struct crypto_authenc_keys keys; From patchwork Wed May 5 20:26:18 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Corentin Labbe X-Patchwork-Id: 431299 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER, INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9D620C433B4 for ; Wed, 5 May 2021 20:27:04 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 7DFA1613C7 for ; Wed, 5 May 2021 20:27:04 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235676AbhEEU17 (ORCPT ); Wed, 5 May 2021 16:27:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33582 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235489AbhEEU1j (ORCPT ); Wed, 5 May 2021 16:27:39 -0400 Received: from mail-wm1-x32a.google.com (mail-wm1-x32a.google.com [IPv6:2a00:1450:4864:20::32a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 612DEC061761 for ; Wed, 5 May 2021 13:26:35 -0700 (PDT) Received: by mail-wm1-x32a.google.com with SMTP id 4-20020a05600c26c4b0290146e1feccd8so1848540wmv.1 for ; Wed, 05 May 2021 13:26:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=jqRopQ6j7EZnfvlaFLYECgDSQLjyHwxQifGupas3xpc=; b=IBzjfiGOwr7Vh+9cvh0LuRB/HoU+/qiYi+BJe/wg4GgeuPXzdJoBXQ9ZdU+VM+6tsS m07ZhkvuSB/sYXBiGPbS9uiAz+21sog+VlBNX0pPQf3+b7U1iEVBKGM0FHPxdgwjI6oT HOsoj6aTaHdObd/TQELspiShcFTC6uuStMg2yjcXzdu6jnYtR4cKzssOxrXpJgoRHa8T dAqI2YampChMPN3sqaZ3osAL94v9YgZ1jFE7XAYySfnH+MYzxyxZ+7AOJWA/Lw23Nu9o nrgPMx5Kpc+OpgOd9+qN2YzGYYEphZHpXVaVW6jZaQGsoqVgscgDKJf1IedgviTysoAs Oteg== 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=jqRopQ6j7EZnfvlaFLYECgDSQLjyHwxQifGupas3xpc=; b=Xo+QY3LmJYA/dZ4kuajkFfRcQ47mGI4mQ5oIwOYb6MxGdbG8nSHfZ3E+WoWcwjfIMa xf4mC/2I6l6oUWL0EcKYMz9PLqz4WxnLF1z4HZ5a4hef1mBzhNiEvMsBKpIHPD9Gy+Nm y9ZCLxU3inzGBqL8aLzDY5yVn5u2W78xLCstYkgZ57vqgGVFaxJvOV7b9EnOhj2XZcaL W+8I8FLwnMJJalgVRDng7SKRXGYNwzKJqyhIKawp6IfP6/d8HgifCzn5vn1HekElewbk xXbIP+zula9CkKYCZ8itxIpIoh02YMwW4ZP7oqkKV8XLoxTGrrzHLRwH4+ReyD2r/u6Z yyOA== X-Gm-Message-State: AOAM530ivxHNCB0ZUaJkMBMD+PxVgayA911QCaE7hTkK/8+gqaa5fE0K xi9BjLn8ZcoRlRPl/s1jMfeSqQ== X-Google-Smtp-Source: ABdhPJxHe5r2fcydaLYlL9LtVPJpAD710+mO6YJtzdc3PMfnyVf43O+5uE0C+fz1Z7JzTrmgPYxArg== X-Received: by 2002:a1c:7c15:: with SMTP id x21mr534437wmc.186.1620246394181; Wed, 05 May 2021 13:26:34 -0700 (PDT) Received: from localhost.localdomain (laubervilliers-658-1-213-31.w90-63.abo.wanadoo.fr. [90.63.244.31]) by smtp.googlemail.com with ESMTPSA id a15sm497245wrr.53.2021.05.05.13.26.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 05 May 2021 13:26:33 -0700 (PDT) From: Corentin Labbe To: chohnstaedt@innominate.com, davem@davemloft.net, herbert@gondor.apana.org.au Cc: linux-crypto@vger.kernel.org, linux-kernel@vger.kernel.org, Corentin Labbe Subject: [PATCH 11/11] MAINTAINERS: add myself as maintainer of ixp4xx_crypto Date: Wed, 5 May 2021 20:26:18 +0000 Message-Id: <20210505202618.2663889-12-clabbe@baylibre.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210505202618.2663889-1-clabbe@baylibre.com> References: <20210505202618.2663889-1-clabbe@baylibre.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org No maintainer exists for ixp4xx_crypto, since I have access to a board with it, I propose to maintain it. Signed-off-by: Corentin Labbe --- MAINTAINERS | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index 351617dd019e..b8b8618ecb41 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -9254,6 +9254,12 @@ F: Documentation/admin-guide/media/ipu3_rcb.svg F: Documentation/userspace-api/media/v4l/pixfmt-meta-intel-ipu3.rst F: drivers/staging/media/ipu3/ +INTEL IXP4XX CRYPTO SUPPORT +M: Corentin Labbe +L: linux-crypto@vger.kernel.org +S: Maintained +F: drivers/crypto/ixp4xx_crypto.c + INTEL IXP4XX QMGR, NPE, ETHERNET and HSS SUPPORT M: Krzysztof Halasa S: Maintained