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.8 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_PASS,URIBL_BLOCKED,USER_AGENT_NEOMUTT autolearn=ham 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 2C93AECDFB1 for ; Fri, 13 Jul 2018 03:44:52 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 75719214AB for ; Fri, 13 Jul 2018 03:44:51 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 75719214AB Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=gondor.apana.org.au Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387993AbeGMD5X (ORCPT ); Thu, 12 Jul 2018 23:57:23 -0400 Received: from orcrist.hmeau.com ([104.223.48.154]:43952 "EHLO deadmen.hmeau.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387722AbeGMD5X (ORCPT ); Thu, 12 Jul 2018 23:57:23 -0400 Received: from gondobar.mordor.me.apana.org.au ([192.168.128.4] helo=gondobar) by deadmen.hmeau.com with esmtps (Exim 4.89 #2 (Debian)) id 1fdp0D-0002FS-Cm; Fri, 13 Jul 2018 11:44:17 +0800 Received: from herbert by gondobar with local (Exim 4.89) (envelope-from ) id 1fdp02-0006hW-4o; Fri, 13 Jul 2018 11:44:06 +0800 Date: Fri, 13 Jul 2018 11:44:06 +0800 From: Herbert Xu To: Kees Cook Cc: Arnd Bergmann , "Gustavo A. R. Silva" , Eric Biggers , Alasdair Kergon , Giovanni Cabiddu , Lars Persson , Mike Snitzer , Rabin Vincent , Tim Chen , "David S. Miller" , Masahiro Yamada , "open list:HARDWARE RANDOM NUMBER GENERATOR CORE" , qat-linux@intel.com, dm-devel@redhat.com, Linux Kernel Mailing List Subject: Re: [PATCH v4 11/14] treewide: Prepare to remove VLA usage for AHASH_REQUEST_ON_STACK Message-ID: <20180713034406.zwu2pkp3f2onybxs@gondor.apana.org.au> References: <20180711203619.1020-1-keescook@chromium.org> <20180711203619.1020-12-keescook@chromium.org> <20180713004038.lwibdesz7ohhoind@gondor.apana.org.au> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: NeoMutt/20170113 (1.7.2) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jul 12, 2018 at 08:33:24PM -0700, Kees Cook wrote: > On Thu, Jul 12, 2018 at 5:40 PM, Herbert Xu wrote: > > On Thu, Jul 12, 2018 at 06:02:26PM +0200, Arnd Bergmann wrote: > >> > >> Looking through some of the drivers, I found this interesting one: > > > > As I said before these patches are fundamentally broken. Users > > of AHASH_REQUEST_ON_STACK can only use sync algorithm providers > > and therefore drivers are irrelevant. > > I don't understand what this means. Can you give an example of what > you want to see happen that will accomplish the VLA removals? Any algorithm that is async must be ignored when you're calculating the maximum on-stack size of the request. For example, sha512-mb is marked as async and therefore must not be used in conjunction with AHASH_REQUEST_ON_STACK. Cheers, -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt