Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp2197643imm; Mon, 3 Sep 2018 23:00:03 -0700 (PDT) X-Google-Smtp-Source: ANB0Vdb8TMWE+fAXhIL2isv2wDbgVmN0q8EuknOfidWBGakTKv1YwMeNbH/WVZJL6gvK8fUbVm5a X-Received: by 2002:a17:902:2:: with SMTP id 2-v6mr32810020pla.181.1536040803730; Mon, 03 Sep 2018 23:00:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536040803; cv=none; d=google.com; s=arc-20160816; b=iod/NieyRmQU/NDo6mE0bM+87COnfdUHZgJm22gF/rqVs1eJB0O6pS5OOJmd1AWfm8 DaLnGXNSSWl/322c8gu5I58Cdz7sXJxs6oOxefdEf6iD1LJKjwhxMOTRXGHDIGKJfEtB zA215lO6KqvlJNxOp3DE0+2MO7VUTtZKAtzf7fmfmBx35K3SW77iWKYmY/eHkj386ITs Wo0jafbTIjOomGChkp+DBu+nMoDCulZddlZTCFV4m6B0hFzCEisZYJBNW3/mTGrjGnsG Sg3vvbrd3O7OQBXsbmh2rCOOqmdv7xZPWr2tGlz5ffowgqKqBGCP4eRgzRFmFGz3JLPc oRZQ== 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 :arc-authentication-results; bh=686k+jR7J1yFAzxJs05rB+UFpjjH5ySkMF76lib8S7o=; b=hyVbIxab7XVx4jHKXnLDnU9PFZRiJAqpGlHTLeLVkn8bUFqdAL9TU/+FY0rHK/SM2o /wsSx/H+YUNyy/FeI1u+5nO5R/JRdCRfmwP4eaAHW3iOsHoKAnbbD1VgzHeHivqdVd4h /MtPKFu8x1H0005cbFGtstBHqv7W5t4xdRnQNvU2tJkLiPR7HQRbGR+aHXkWXMxEKiS2 aNakEWLUJYiLhsjhCM4i9dO+W6vwAwkKtgABhcLika28PbsL8RFf/jmc4byX4nzDm8sV 9xldEm9b/jqM+eCGEeHArf/zyceBBDXn6dLtAQ73+QQe7Wsi+7GdvitpStyyoieZ+UQ6 6o0g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b="hD/3kJZj"; 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 c12-v6si15502142plz.456.2018.09.03.22.59.47; Mon, 03 Sep 2018 23:00:03 -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="hD/3kJZj"; 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 S1727048AbeIDKWN (ORCPT + 99 others); Tue, 4 Sep 2018 06:22:13 -0400 Received: from mail-yb1-f196.google.com ([209.85.219.196]:46381 "EHLO mail-yb1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726011AbeIDKWM (ORCPT ); Tue, 4 Sep 2018 06:22:12 -0400 Received: by mail-yb1-f196.google.com with SMTP id y20-v6so857193ybi.13 for ; Mon, 03 Sep 2018 22:58:38 -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=686k+jR7J1yFAzxJs05rB+UFpjjH5ySkMF76lib8S7o=; b=hD/3kJZjwnu5Sg72w5x4lg9gPAFlue/XmA/2PFCDht7H6d7t1IvAnFFL2glraukaeM Q8J4RwZZkZoRxGWOjIm2ZNmTP71JRuXfAKlhVOl9vytrvu0CbcoWCKcnyOcT6PfvAEZ/ OrJ1e5FqVGjFnb7CEsfKMqswxidb4FnZvDBes= 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=686k+jR7J1yFAzxJs05rB+UFpjjH5ySkMF76lib8S7o=; b=htRRxjYQ7u1ZWxz7BWyeQ4b2qLHENHJ49qOJ37EMfBN12GtpyYBSre5weatQCj4EWX BB5IQy0h9PrCFOhr5wR7zefQK4c5A1on8FdizLN/BQfhvuBbapzrlggG7nXo8vdMQCZq 5sZywb3m8Hxj7f+n5XQZ3yAK8eOEumL1kL3hCw/40QuQ3ZBW+ttVtLPTkyr6N0qLANYQ 35NfjRQqVD7dwPDGbcg7nLa7KFLK7yJyK//nZUGTaZnVM2Ar+c7YWfaWsD5w7CuU5mrf zYFxk2J7HwyKIpkjFTS7m/HpEdeqUU7xAb0tI4G3ggo73Cjnt5FC2C7CUP7pno9ZW2SP G8BA== X-Gm-Message-State: APzg51AtDb7hQRTDozC+IK1NxSXr5yNFxDVF64FAgewDnh59iRCpGxrk DmrZK4YgGSFE+dwK1DGKGhQaqTaiCIY= X-Received: by 2002:a25:d34f:: with SMTP id e76-v6mr4697051ybf.227.1536040717727; Mon, 03 Sep 2018 22:58:37 -0700 (PDT) Received: from mail-yw1-f53.google.com (mail-yw1-f53.google.com. [209.85.161.53]) by smtp.gmail.com with ESMTPSA id h65-v6sm7782929ywe.75.2018.09.03.22.58.37 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 03 Sep 2018 22:58:37 -0700 (PDT) Received: by mail-yw1-f53.google.com with SMTP id n21-v6so842222ywh.5 for ; Mon, 03 Sep 2018 22:58:37 -0700 (PDT) X-Received: by 2002:a81:9fd6:: with SMTP id w205-v6mr18030125ywg.288.1536040242096; Mon, 03 Sep 2018 22:50:42 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a25:5f04:0:0:0:0:0 with HTTP; Mon, 3 Sep 2018 22:50:41 -0700 (PDT) In-Reply-To: <20180904051905.a2vyzijz6xyxvyhb@gondor.apana.org.au> References: <20180807211843.47586-1-keescook@chromium.org> <20180904051905.a2vyzijz6xyxvyhb@gondor.apana.org.au> From: Kees Cook Date: Mon, 3 Sep 2018 22:50:41 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v8 0/9] crypto: Remove VLA usage To: Herbert Xu Cc: Eric Biggers , Ard Biesheuvel , Giovanni Cabiddu , Alasdair Kergon , Mike Snitzer , Tudor-Dan Ambarus , Andrew Morton , Thomas Gleixner , Geert Uytterhoeven , Arnd Bergmann , Will Deacon , Rasmus Villemoes , David Woodhouse , Matthew Wilcox , "David S. Miller" , "Gustavo A. R. Silva" , linux-crypto , device-mapper development , qat-linux@intel.com, 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 10:19 PM, Herbert Xu wrote: > On Tue, Aug 07, 2018 at 02:18:34PM -0700, Kees Cook wrote: >> v8 cover letter: >> >> I continue to hope this can land in v4.19, but I realize that's unlikely. >> It would be nice, though, if some of the "trivial" patches could get taken >> (e.g. cbc, xcbc, ccm VLA removals) so I don't have to keep repeating them. >> *fingers crossed* >> >> Series cover letter: >> >> This is nearly the last of the VLA removals[1], but it's one of the >> largest because crypto gets used in lots of places. After looking >> through code, usage, reading the threads Gustavo started, and comparing >> the use-cases to the other VLA removals that have landed in the kernel, >> I think this series is likely the best way forward to shut the door on >> VLAs forever. >> >> For background, the crypto stack usage is for callers to do an immediate >> bit of work that doesn't allocate new memory. This means that other VLA >> removal techniques (like just using kmalloc) aren't workable, and the >> next common technique is needed: examination of maximum stack usage and >> the addition of sanity checks. This series does that, and in several >> cases, these maximums were already implicit in the code. >> >> This series is intended to land via the crypto tree for 4.19, though it >> touches dm, networking, and a few other things as well, since there are >> dependent patches (new crypto #defines being used, etc). > > I have applied patches 1-4 and 6-8. I'd like to get an ack from > the dm folks regarding patch 5. As to patch 9, please fix it so > it doesn't rely on the BUG_ON to catch things. Great! Thanks very much. I'll get a patch prepared to plumb crypto_skcipher_set_reqsize() failures. -Kees -- Kees Cook Pixel Security