Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp34238rwb; Wed, 9 Nov 2022 19:26:11 -0800 (PST) X-Google-Smtp-Source: AMsMyM6skLNwdZU5X7ZdGbQkepcvy+uBOP6MTiCXfNPM+FGu/aOYfbnquVEmjsgY2+A5zclL/myV X-Received: by 2002:a17:907:930:b0:7ae:37aa:4042 with SMTP id au16-20020a170907093000b007ae37aa4042mr26743231ejc.363.1668050771184; Wed, 09 Nov 2022 19:26:11 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668050771; cv=none; d=google.com; s=arc-20160816; b=NCmRn+ibuF24BFBoh41lSPH0+KKK6KOjYazp+iw7NHmW6KxIsyGFaCvXqRyH1ji5di TXaIIGPRbxCdRhOg6ON0zLhcGFgFAu9uAOFq2XEtOWbaX4qkf1RQr1ayJmr/8tYAtOzx zeaCRWvLrOk/9uzubkIVAIOigrROgFnrUgU5flZeXIVaQCV1mPA57Mdjm3Z4R3QrvbJJ XxoI+rNk9hkm+ePcQa5YPr/PE5sdo9FNJFARuyrlIRTAF2YgSLXGlstiH7/VsFmCf5Ay xM8cBeV1jlTr56rxc+WckUn+ERjfaFcQSsRS03CICoeG9CVTaYF+g+jXSbwA6+rouKR5 LExQ== 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; bh=wvEioF97QsqvHayr7TxHq2zNihdofdGaf9Hr0fZDp7o=; b=yMK6Fxr5P8GxwVkWjL1Fh3iXLZkLW6nmFUP2a4G8CECowzkgk3pRMiEARDV4XYu5lz 1CvS4SbzPu8eU1NE9KI9C5bGWaFFwa4q85Ltb+Lw2XxPyjtak3bwJyg+EcdfarUkyOxD JmiFdu+G5c1atb8RjVMBCQ2kQ8s6nVu488pf+JPMmzcfe4JqXPsEFnEdD0RgiTFPl5sI yBpF018oINkiOZERcWazbL3XEOIdxCgER/KpEndwWoUYLvVBX4KohIw7AfQ+S3guv3fF OAh8jSujN8e6PWb6q6Z3Nya1TqlzZ0sT1c9j/d/1b1ebbvddQBgCEvyVciXEMuu8f37n JRLw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id z11-20020a056402274b00b0045d3ed38ae1si18866860edd.16.2022.11.09.19.25.38; Wed, 09 Nov 2022 19:26:10 -0800 (PST) Received-SPF: pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232282AbiKJDTS (ORCPT + 99 others); Wed, 9 Nov 2022 22:19:18 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36056 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230120AbiKJDTS (ORCPT ); Wed, 9 Nov 2022 22:19:18 -0500 Received: from formenos.hmeau.com (helcar.hmeau.com [216.24.177.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 077B8286E4 for ; Wed, 9 Nov 2022 19:19:14 -0800 (PST) Received: from loth.rohan.me.apana.org.au ([192.168.167.2]) by formenos.hmeau.com with smtp (Exim 4.94.2 #2 (Debian)) id 1osy5G-00CP95-UH; Thu, 10 Nov 2022 11:19:08 +0800 Received: by loth.rohan.me.apana.org.au (sSMTP sendmail emulation); Thu, 10 Nov 2022 11:19:07 +0800 Date: Thu, 10 Nov 2022 11:19:07 +0800 From: Herbert Xu To: Taehee Yoo Cc: linux-crypto@vger.kernel.org, davem@davemloft.net, tglx@linutronix.de, mingo@redhat.com, bp@alien8.de, dave.hansen@linux.intel.com, hpa@zytor.com, kirill.shutemov@linux.intel.com, richard@nod.at, viro@zeniv.linux.org.uk, sathyanarayanan.kuppuswamy@linux.intel.com, jpoimboe@kernel.org, elliott@hpe.com, x86@kernel.org, jussi.kivilinna@iki.fi Subject: Re: [PATCH v3 1/4] crypto: aria: add keystream array into struct aria_ctx Message-ID: References: <20221106143627.30920-1-ap420073@gmail.com> <20221106143627.30920-2-ap420073@gmail.com> <51ed3735-24f0-eef0-0ca6-908c4581d143@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <51ed3735-24f0-eef0-0ca6-908c4581d143@gmail.com> X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org On Wed, Nov 09, 2022 at 10:16:58PM +0900, Taehee Yoo wrote: . > I have encountered kernel panic(stack-out-of-bounds) while using the reqctx > instead of the tfm. > > cryptd is used when simd drivers are used. > cryptd_skcipher_encrypt() internally doesn't allocate a request ctx of a > child, instead, it uses stack memory with SYNC_SKCIPHER_REQUEST_ON_STACK. > It retains only 384 bytes for child request ctx even if a child set a large > reqsize value with crypto_skcipher_set_reqsize(). > aria-avx2 needs 512 bytes and aria-avx512 needs 1024 bytes. > So, stack-out-of-bounds occurs. That's not good. Let me look into this. Thanks, -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt