Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp3381341ybt; Tue, 30 Jun 2020 01:02:12 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxyMgsPsmH63wX5YAmfIdeDrx8H98IFMuhGZMahiPTmtD1KMCBjhBMMPaP0sVQmXUnImFDp X-Received: by 2002:a05:6402:6c4:: with SMTP id n4mr22407084edy.353.1593504132427; Tue, 30 Jun 2020 01:02:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1593504132; cv=none; d=google.com; s=arc-20160816; b=L6nZhSONP6ZpgzD/hSElXzfWXW0PYp/BoxPuYHbydB86z/FaPQhVKyODdDhib62U0F X4rTdnko/wqefd9TnR928t5T2+j0H7Yu3B3SFEiOowuy8Ya3gYvQVQXCXH7edX9t6aNt j4HM7qPnmnp4kVA3NFQJilQZ0pdxGC5MJegxUO490vmLIMftaGkmUu98fbUnM6KnUWBp F4Pzyu02/jhK8G1IyTICer4340n/1EF25Td/oRQNCGhNTpVuCFftwwcqOLzoYWktoTZ/ LOlBRyvQXnWFgWoOf5ik+M60xqA0Vgg0rF86x0HKj3ZW/dnuf5+DDSBhmQCWyLhQOIfU Gtxw== 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 :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature; bh=8EmyVR+mD3romGOvXq8CJsQp+ygIdnlsFn9AaB8MQrw=; b=huN6EdzHEfQQ0hghoEfZlmlM/cMo99Uj4ESKlvJlZFXwkSF1/bfNcZvPczXU6Z2TDZ MnOF8rdSff3I4TlW7HhEnIBAmP/nOmceaVRhAsFfh2YeWsyZaUJCvDJ1jX9khpZrcQjP 14tkLGAA/JASp4YGUFTM0zOq/hQ+iCPMZrDMVR111aGo/8Lra9h+qbeWBkMmt/wboaKw n/q/gdds7Rp2W/O+djvi9OcpD4Mmi9dxQNlhIe33L2IyeioRKTrL6S4UxzZPy4WjZ5Yo G+CTZMbI2o9BrEECig45XNVMwrP3AEAmUWZDB7muvq8UGlP2MplEJyOeWdDfNHI3eiFW ZsNQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=NYlxzaWh; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id w23si1264166eds.47.2020.06.30.01.01.48; Tue, 30 Jun 2020 01:02:12 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=NYlxzaWh; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728372AbgF3HxL (ORCPT + 99 others); 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