From mboxrd@z Thu Jan 1 00:00:00 1970 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=-2.6 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=no 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 7EA87C433DF for ; Tue, 30 Jun 2020 07:53:12 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 50F6F207F9 for ; Tue, 30 Jun 2020 07:53:12 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=ti.com header.i=@ti.com header.b="NYlxzaWh" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728372AbgF3HxL (ORCPT ); Tue, 30 Jun 2020 03:53:11 -0400 Received: from lelv0142.ext.ti.com ([198.47.23.249]:50938 "EHLO lelv0142.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728009AbgF3HxK (ORCPT ); Tue, 30 Jun 2020 03:53:10 -0400 Received: from fllv0035.itg.ti.com ([10.64.41.0]) by lelv0142.ext.ti.com (8.15.2/8.15.2) with ESMTP id 05U7r14q074071; Tue, 30 Jun 2020 02:53:01 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1593503581; bh=8EmyVR+mD3romGOvXq8CJsQp+ygIdnlsFn9AaB8MQrw=; h=Subject:To:CC:References:From:Date:In-Reply-To; b=NYlxzaWh9KKy/8TI56SAwVSlm0Fakp5aYPsfX7REz3l1Q4nI/94RCHlBMSBrTL9OT lGLDExhqTGepOrIMDLBItIZnKBV/dmj4Oh8Jnk1VaPRC02yCqmIloVkA5tb2NzS6B3 RqEA7XSSU/LLnmY4DVA5p7+PZy8gIJuK4QPy3oKU= Received: from DLEE102.ent.ti.com (dlee102.ent.ti.com [157.170.170.32]) by fllv0035.itg.ti.com (8.15.2/8.15.2) with ESMTP id 05U7r1Me125433; Tue, 30 Jun 2020 02:53:01 -0500 Received: from DLEE106.ent.ti.com (157.170.170.36) by DLEE102.ent.ti.com (157.170.170.32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1979.3; Tue, 30 Jun 2020 02:53:01 -0500 Received: from fllv0040.itg.ti.com (10.64.41.20) by DLEE106.ent.ti.com (157.170.170.36) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1979.3 via Frontend Transport; Tue, 30 Jun 2020 02:53:01 -0500 Received: from [127.0.0.1] (ileax41-snat.itg.ti.com [10.172.224.153]) by fllv0040.itg.ti.com (8.15.2/8.15.2) with ESMTP id 05U7qwTB057990; Tue, 30 Jun 2020 02:52:59 -0500 Subject: Re: [PATCHv4 3/7] crypto: sa2ul: add sha1/sha256/sha512 support To: Herbert Xu CC: , , , References: <20200615071452.25141-1-t-kristo@ti.com> <20200615071452.25141-4-t-kristo@ti.com> <20200626043155.GA2683@gondor.apana.org.au> <2a89ea86-3b9e-06b5-fa8e-9dc6e5ad9aeb@ti.com> <20200630044936.GA22565@gondor.apana.org.au> <20200630074645.GA2449@gondor.apana.org.au> From: Tero Kristo Message-ID: Date: Tue, 30 Jun 2020 10:52:57 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.8.0 MIME-Version: 1.0 In-Reply-To: <20200630074645.GA2449@gondor.apana.org.au> Content-Type: text/plain; charset="utf-8"; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Sender: linux-crypto-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org On 30/06/2020 10:46, Herbert Xu wrote: > On Tue, Jun 30, 2020 at 10:20:06AM +0300, Tero Kristo wrote: >> >> Only up-to block size? This would limit the buffer to 64-128 bytes. > > The exported hash state is not supposed to be used to support > hardware that does not support partial hashing. > > These states could potentially be placed on the stack so they > must not be large. How about making the buffer size configurable during probe time via module param, and/or runtime via sysfs parameter? This would allow system designers to tune it based on expected usecases. -Tero -- Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki. Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki