Received: by 2002:a05:7412:419a:b0:f3:1519:9f41 with SMTP id i26csp3592335rdh; Mon, 27 Nov 2023 19:58:27 -0800 (PST) X-Google-Smtp-Source: AGHT+IHdy8CtSE0Hed8RsQydmezz6a/L1FF+dTTxAe98QhHB1dxLSXRL4DG4+YTjj8YOt20fqjFW X-Received: by 2002:a05:6808:23d2:b0:3a7:2690:94d5 with SMTP id bq18-20020a05680823d200b003a7269094d5mr18289827oib.8.1701143906919; Mon, 27 Nov 2023 19:58:26 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701143906; cv=none; d=google.com; s=arc-20160816; b=MxC0ZGRkhqoklIJ+dGY6+U0jd1594uoAtTE86iXaP9xO7v4HzAJjDEt20EV6JMvimI ytu228FpAXSNlJkZQKQps7kMiYjV3U+f5bvpKkVE+RcRmO0q471XYyX/MJLNdpnVVjyT 55X32g5PcwIRFtO2Hu04HjjnBKRG3UKZFQhehxWBPwdhttwX693rsayq9Elc+CV5qNT2 Ktr7oVJTyNz63dp+4CfeZATO0/P4KDK928LnJfhjubOGVcXOtNpX/LiQm7g/SGurNbhT Uo0qvA6JcnMJ4ZaQWVBxyB2IvvGaA/Dimc0q+3zbYDAlIjxH8ghK6dj3lcBYdzijIPXE OYnQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=deXWQQWPTGWnCuRx3Zih5R4dSc6OweLTkUxLVl5+3l4=; fh=zbDRpcBgg9Y8vPgjc5rEEysmrqOVa145mcP3uY0f1po=; b=FZjGckKwIiAm+TB0CtqkDwS0Pfv4ITX9ceqpIo66VGdKYcFqMvH0ccO1Gfg01g51qB NC6SCfWaYgvdy+NhWh+X+OqQEtIWLeI4283PsNrZLnbgqe8EhG0wyxBMkteutsBNnXs+ NoaH4Fq9EKenEJIIDlgToM2el/n2ZoRBCeR5469xbg48pBB5giPupDaJvmIP6IGXaogX a2UPob90hfszcL15M2Yr0/HgNoEKoFRKPETBlcbJwoV6fZUG4mbMSxU1X8ny4KNlvtXa gfvD1ud+0pktJVSZfweisO+Z761OMEKT/IXLg080DUNRwBVkgFRX2Qpm4UiWEyzgl/YR yqCw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Szevbdpq; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from fry.vger.email (fry.vger.email. [2620:137:e000::3:8]) by mx.google.com with ESMTPS id be14-20020a656e4e000000b005a9fde46f98si12936673pgb.52.2023.11.27.19.58.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Nov 2023 19:58:26 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) client-ip=2620:137:e000::3:8; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Szevbdpq; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by fry.vger.email (Postfix) with ESMTP id 79B2B8061575; Mon, 27 Nov 2023 19:58:24 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at fry.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234470AbjK1D6L (ORCPT + 99 others); Mon, 27 Nov 2023 22:58:11 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44718 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229789AbjK1D6K (ORCPT ); Mon, 27 Nov 2023 22:58:10 -0500 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 440DAC1 for ; Mon, 27 Nov 2023 19:58:17 -0800 (PST) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 808A6C433C9; Tue, 28 Nov 2023 03:58:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1701143896; bh=klY2qd5BBTUFI2nKApEyF/o8Si9A4Wtb/ZgzMzwBObU=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=SzevbdpqhmhpmwTwMiKkHq1bskohNUwuQfXQeOf7Ch/TVNVhZeVRK1CT1GjSQOmoF C6bhekI0ZJVb1FVTvBskim8XI7ZODFyyf8iuS9eeCnyBMmkcu6VE3HnRAoAE2TH7UZ KI7oVZ+kXnp8gby6MaWucK8q7ZgmwCim2keIlGrl1Dsknz9XJTTDbEJ7gWc/puMijd 9q4ekHg9SVrHHlIiSPuty/WEaZ94iY0t6L7lU3fe+8Bfkn6FnNxVFpZKnpXnbDh2Q/ 4W0BjIlI4QU7x0Mt+wRtDzeFPZ8ka7d7mEsacC6BpgevdejvAbOXC9Kheb/q5UpD2O LQi7JQFnaXHAw== Date: Mon, 27 Nov 2023 19:58:14 -0800 From: Eric Biggers To: Jerry Shih Cc: paul.walmsley@sifive.com, palmer@dabbelt.com, aou@eecs.berkeley.edu, herbert@gondor.apana.org.au, davem@davemloft.net, conor.dooley@microchip.com, ardb@kernel.org, heiko@sntech.de, phoebe.chen@sifive.com, hongrong.hsu@sifive.com, linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org, linux-crypto@vger.kernel.org Subject: Re: [PATCH v2 05/13] crypto: simd - Update `walksize` in simd skcipher Message-ID: <20231128035814.GH1463@sol.localdomain> References: <20231127070703.1697-1-jerry.shih@sifive.com> <20231127070703.1697-6-jerry.shih@sifive.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20231127070703.1697-6-jerry.shih@sifive.com> X-Spam-Status: No, score=-1.2 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on fry.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (fry.vger.email [0.0.0.0]); Mon, 27 Nov 2023 19:58:24 -0800 (PST) On Mon, Nov 27, 2023 at 03:06:55PM +0800, Jerry Shih wrote: > The `walksize` assignment is missed in simd skcipher. > > Signed-off-by: Jerry Shih > --- > crypto/cryptd.c | 1 + > crypto/simd.c | 1 + > 2 files changed, 2 insertions(+) > > diff --git a/crypto/cryptd.c b/crypto/cryptd.c > index bbcc368b6a55..253d13504ccb 100644 > --- a/crypto/cryptd.c > +++ b/crypto/cryptd.c > @@ -405,6 +405,7 @@ static int cryptd_create_skcipher(struct crypto_template *tmpl, > (alg->base.cra_flags & CRYPTO_ALG_INTERNAL); > inst->alg.ivsize = crypto_skcipher_alg_ivsize(alg); > inst->alg.chunksize = crypto_skcipher_alg_chunksize(alg); > + inst->alg.walksize = crypto_skcipher_alg_walksize(alg); > inst->alg.min_keysize = crypto_skcipher_alg_min_keysize(alg); > inst->alg.max_keysize = crypto_skcipher_alg_max_keysize(alg); > > diff --git a/crypto/simd.c b/crypto/simd.c > index edaa479a1ec5..ea0caabf90f1 100644 > --- a/crypto/simd.c > +++ b/crypto/simd.c > @@ -181,6 +181,7 @@ struct simd_skcipher_alg *simd_skcipher_create_compat(const char *algname, > > alg->ivsize = ialg->ivsize; > alg->chunksize = ialg->chunksize; > + alg->walksize = ialg->walksize; > alg->min_keysize = ialg->min_keysize; > alg->max_keysize = ialg->max_keysize; What are the consequences of this bug? I wonder if it actually matters? The "inner" algorithm is the one that actually gets used for the "walk", right? - Eric