Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp926957imm; Thu, 13 Sep 2018 09:48:25 -0700 (PDT) X-Google-Smtp-Source: ANB0VdbjS3yHiEBtTdk2jPJPW1pof+cZL/3nEE1RYpMkNRZga3PrH6dUsUtE9gxo2zG9Nab/niD1 X-Received: by 2002:a63:f751:: with SMTP id f17-v6mr8036707pgk.410.1536857305177; Thu, 13 Sep 2018 09:48:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536857305; cv=none; d=google.com; s=arc-20160816; b=lXNIXOlMtMT85UB1412bsWdLJ4qB7WyxgYKrPOlimVLNoV+aVaFPE6MZV0IXYs7LAo B08hLiH89XwD7waEt0ht3m+Q76IEu0XWt9Q5EG4cXHhjM7iEazPKTaiwI9DdA+5hiGvK eqYE5AIwhiKVMh208TF0F9XLmEC4sRbFmH9jsB3uTxDQ0qnrWU2nLqKREz/DECPgyKCP /xR4TJIvooyKfSLpaWhGeHUY2i29I7eh7GQZ1Yz2oF67ThwxO/1Owl3YXTQVOJ5YImut ysM442HhO9/wkgKgcvAaqxP87rlWDTb31yULr59np++sjVCksG0zpw0fG0iFqxM09IY9 o/Mw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :references:in-reply-to:mime-version:dkim-signature; bh=j2lc9C+CbxDGbX0Xw7G/NQSYlrsMO0mPE0rvLDe01ss=; b=TSLtWxV9TB55ZdRj3rK3F0aauTQEijyZyb92QOv6NNymyzkK1ui117zsxvEYu8JiV5 yfeHg9Vv0mq3bhLbrxAYKhiwP1D1jT/eBLB5/qF9ogfeYXZrHCbQp38BC6TXmKxuf+Qr Q+Qu75+vFRVn27fcZLMgSacj57mx0l2MjJtkbyjpLmlMd2mGX9YCu290/w+2qoRvmyQi H6PAOKMvCUvHpc4Aue/pZ8JPQFmYNmhgDtfbJY8UNk0inx1c+X0k0odASIu3+OmIiRpQ raYsYK5jbA91vO0uBbQ712nSqiRC7KvcWCny6CKfBUZAnb9A0WLprm9fEhC0W+WYE2cc K6Dw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=ggJiJT0I; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l185-v6si4459735pfl.134.2018.09.13.09.48.09; Thu, 13 Sep 2018 09:48:25 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=ggJiJT0I; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728163AbeIMV5m (ORCPT + 99 others); Thu, 13 Sep 2018 17:57:42 -0400 Received: from mail-yb1-f195.google.com ([209.85.219.195]:46908 "EHLO mail-yb1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726970AbeIMV5m (ORCPT ); Thu, 13 Sep 2018 17:57:42 -0400 Received: by mail-yb1-f195.google.com with SMTP id y20-v6so3522006ybi.13 for ; Thu, 13 Sep 2018 09:47:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=j2lc9C+CbxDGbX0Xw7G/NQSYlrsMO0mPE0rvLDe01ss=; b=ggJiJT0Igsw58f9Pti93p5xomqKMEBCV7PRh5SJBtIZyNeSFKrR10jDjEXrDHowISh sPHyXLdPkHX9BhWNsKpORf/4+mGt+wkmGsOaXSxj/KNqvIYMH7VmgNLygbXKx0BNuIel 5Ojg8CYEqqlIUwuYrQmNqbKbLPmcoTKKkC2hM= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=j2lc9C+CbxDGbX0Xw7G/NQSYlrsMO0mPE0rvLDe01ss=; b=J15iwh4MjAaiuCI7cwEIOgzHQ3vdlYkdWPJGkFZDl/WkchEIYTczwgSCl5bVcjIEv1 ttHYNoX5fFoLa1vr3yhkcnbwZot/tyKM4HA5GSBIzXKU8vp/o0GyyGm+AaGZr2TYllcO gbBHmzbnXMrD9LJV3PDOC0gZoRSFFyqUIfMw4DQnok+/bW55dnXBw3EMzo3m5yjLWo9k FpdcZMR68fhzFOMnh5TwiRfzoBOl0PI5UmAJ4EGURyQe7p/PkSzcFJ0ceSogCgBwZpCI Uy+ZyBZt0AEFnrHhux7AGRLJE/pXTc7GTUQi258URa5tNRXo+Sjws9Apol6x2iWaU5Go gACg== X-Gm-Message-State: APzg51COnYzgQo3VBMR/7SXTNsQhusyBx7CWNPaMVnqKb2V4qug1juLs hzNjMxTcKG6uy+H6wHEgULEnQWa3/Rw= X-Received: by 2002:a25:3990:: with SMTP id g138-v6mr3865671yba.74.1536857243118; Thu, 13 Sep 2018 09:47:23 -0700 (PDT) Received: from mail-yb1-f169.google.com (mail-yb1-f169.google.com. [209.85.219.169]) by smtp.gmail.com with ESMTPSA id i123-v6sm5470906ywe.14.2018.09.13.09.47.22 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 13 Sep 2018 09:47:22 -0700 (PDT) Received: by mail-yb1-f169.google.com with SMTP id m123-v6so3567848ybm.0 for ; Thu, 13 Sep 2018 09:47:22 -0700 (PDT) X-Received: by 2002:a25:7d44:: with SMTP id y65-v6mr4016017ybc.421.1536856906404; Thu, 13 Sep 2018 09:41:46 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a25:5f04:0:0:0:0:0 with HTTP; Thu, 13 Sep 2018 09:41:45 -0700 (PDT) In-Reply-To: <20180904031318.47jc3jrxcdjeac5y@gondor.apana.org.au> References: <20180807211843.47586-1-keescook@chromium.org> <20180807211843.47586-6-keescook@chromium.org> <20180904031318.47jc3jrxcdjeac5y@gondor.apana.org.au> From: Kees Cook Date: Thu, 13 Sep 2018 09:41:45 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v8 5/9] dm: Remove VLA usage from hashes To: Mike Snitzer , Alasdair Kergon Cc: Herbert Xu , Eric Biggers , Ard Biesheuvel , Giovanni Cabiddu , Tudor-Dan Ambarus , Andrew Morton , Thomas Gleixner , Geert Uytterhoeven , Arnd Bergmann , Will Deacon , Rasmus Villemoes , Matthew Wilcox , "Gustavo A. R. Silva" , linux-crypto , device-mapper development , LKML Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Sep 3, 2018 at 8:13 PM, Herbert Xu wrote: > On Tue, Aug 07, 2018 at 02:18:39PM -0700, Kees Cook wrote: >> In the quest to remove all stack VLA usage from the kernel[1], this uses >> the new HASH_MAX_DIGESTSIZE from the crypto layer to allocate the upper >> bounds on stack usage. >> >> [1] https://lkml.kernel.org/r/CA+55aFzCG-zNmZwX4A2FQpadafLfEzK6CC=qPXydAacU1RqZWA@mail.gmail.com >> >> Signed-off-by: Kees Cook > > Can the dm folks please review this patch? Mike or Alasdair, can you Ack this patch so Herbert can include it in the crypto tree? This is blocking some VLA removals[1]... Thanks! -Kees [1] https://lkml.kernel.org/r/CA+55aFzCG-zNmZwX4A2FQpadafLfEzK6CC=qPXydAacU1RqZWA@mail.gmail.com -- Kees Cook Pixel Security