Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932711AbcLZRwS (ORCPT ); Mon, 26 Dec 2016 12:52:18 -0500 Received: from mail-io0-f174.google.com ([209.85.223.174]:35724 "EHLO mail-io0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754413AbcLZRwN (ORCPT ); Mon, 26 Dec 2016 12:52:13 -0500 MIME-Version: 1.0 In-Reply-To: <20161226075757.GA8916@gondor.apana.org.au> References: <942b91f25a63b22ec4946378a1fffe78d655cf18.1482545792.git.luto@kernel.org> <20161226075757.GA8916@gondor.apana.org.au> From: Ard Biesheuvel Date: Mon, 26 Dec 2016 17:51:14 +0000 Message-ID: Subject: Re: [RFC PATCH 4.10 1/6] crypto/sha256: Refactor the API so it can be used without shash To: Herbert Xu Cc: Andy Lutomirski , Andy Lutomirski , Daniel Borkmann , Netdev , LKML , Linux Crypto Mailing List , "Jason A. Donenfeld" , Hannes Frederic Sowa , Alexei Starovoitov , Eric Dumazet , Eric Biggers , Tom Herbert , "David S. Miller" Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 590 Lines: 14 On 26 December 2016 at 07:57, Herbert Xu wrote: > On Sat, Dec 24, 2016 at 09:57:53AM -0800, Andy Lutomirski wrote: >> >> I actually do use incremental hashing later on. BPF currently >> vmallocs() a big temporary buffer just so it can fill it and hash it. >> I change it to hash as it goes. > > How much data is this supposed to hash on average? If it's a large > amount then perhaps using the existing crypto API would be a better > option than adding this. > This is a good point actually: you didn't explain *why* BPF shouldn't depend on the crypto API.