Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp2597515ybi; Sun, 28 Jul 2019 12:46:03 -0700 (PDT) X-Google-Smtp-Source: APXvYqzYgUpFZ+7vcqH+VkVkLFp0FzWbSu8tVCxMeuMon7zJMqzJzT4K9kTQQBf7eacFubhl6u87 X-Received: by 2002:a63:d415:: with SMTP id a21mr98206929pgh.229.1564343162939; Sun, 28 Jul 2019 12:46:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564343162; cv=none; d=google.com; s=arc-20160816; b=TCO2drmCx45IZDKjiXmcroYyuZbXeBQZEnOtSlfyO9B3yH3nJTp1AeGD41VqRRWGtS zd4nc5vvKqRus0QS9/ye51Fz+hZRtpJY1Ge5+0XrWhYUlb1VEQk8lIqEO9Ae7dQbsyCM BWAh9lL2Y/sU7gMq2841X65dQ3ywgSSQm4Ct8oKSUZGNVHu68ts4Zt7Cut+qccHVzX6j 2ssTknfgRsHvyxSdyv/Bvqn+dVWIDicoXGQYiIAlg4PeiZ1RGxQK8R9GTaaGm7T2e+Og mPlHiyBXb5MYFLMVxkyJmgFtV7tm9QH9QkPxQ3zKkLOD2Ityrg6qxcWg/exBwGPMNND9 LFvQ== 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 :in-reply-to:references:mime-version:dkim-signature; bh=LdZY3aNmVNYioQr1gNNc/nGfiwAN9OHPlb8+bVrJlls=; b=ABD3QtppMxwTQAtznW9aE37pVUuB2emAMlwh80Von2+LQrPvVYU3gGUyG9iB/P4pGZ C18Sc2O56nLO2YWf0tHTC2HgKm0RO6xiuyT2zptcTDXTgOF5AYCrRX4VqMtLW5dwGpio LrBAAaCaeMdEFoDlQMpldXpw9Zc38ng6CerBUAvsJF1HmBkhpPJ2+T0g0J7HsVossUfW GoF04rcdt7wqqedPp89x9ZzAeJMqiPDf0Nu6R/TKnsOGwpoiSTiYfc8huaDf0A5yWmEF vboE/LXzTlBmFFvs+VO9N5PfGf28hjKCA4nJnynuyL4XT20WP/8bD46xbkxJcaDmPCiv RQQg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b=IkezEmSK; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 78si24288420pfz.268.2019.07.28.12.45.47; Sun, 28 Jul 2019 12:46:02 -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=@linux-foundation.org header.s=google header.b=IkezEmSK; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726278AbfG1Tnf (ORCPT + 99 others); Sun, 28 Jul 2019 15:43:35 -0400 Received: from mail-lj1-f196.google.com ([209.85.208.196]:35836 "EHLO mail-lj1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726138AbfG1Tnf (ORCPT ); Sun, 28 Jul 2019 15:43:35 -0400 Received: by mail-lj1-f196.google.com with SMTP id x25so56489925ljh.2 for ; Sun, 28 Jul 2019 12:43:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux-foundation.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=LdZY3aNmVNYioQr1gNNc/nGfiwAN9OHPlb8+bVrJlls=; b=IkezEmSK9WZSIAKVD3LxxymLtPGFDR8fufgv0+4bjTUpVCUYUKjN5mXiZmrABu1R5b JIcWl6BkXHZzOpYpz0hvtoNPJusTWPeR4tDWEXYYDxZbA4hJ0vX1/utCDac8cRbLJFBE mhlfgM80ZboeOMY4RW4AMG8TfsFCzDPSlGk/I= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=LdZY3aNmVNYioQr1gNNc/nGfiwAN9OHPlb8+bVrJlls=; b=GhuiKRPnoZvXxuV5Yx68P97IIq/IIQZsrmV5PDGYutONU5/VQwA0odOFmUMuSz9PK4 opNLnlIM/9a55X15wjLfCeq+r7UN/XXI8ZTOi/tF4u0WF9g73Epk9+KoSIzjtyvX2bt2 +LvyFzj35I45w7BvsDty7YmXa8JPLloKHuLMIJTSpW2GV3tryNn/57LLiKHtcDl+9uR2 kgRZb0LWFvoPriGMdxclK8WDchf11A8xI0g+f8JprWEuzcVbb35XAXObi0t+M1OUpx7l h0STBX7xhVjwbeYbD7UugLCUy56zKWnXc01OYj3fIN1JI8pensZfmqB1xXXwI1RRlW3A 79jg== X-Gm-Message-State: APjAAAX0qgC3sm0IJcH0vYz5p4v/QhlWAD/r/RWvzcNGjdyBK46VKeE6 z+GyGADi0lcJYRmYvfrGt/5fuSPNKBA= X-Received: by 2002:a2e:2b01:: with SMTP id q1mr54469701lje.27.1564343012780; Sun, 28 Jul 2019 12:43:32 -0700 (PDT) Received: from mail-lf1-f51.google.com (mail-lf1-f51.google.com. [209.85.167.51]) by smtp.gmail.com with ESMTPSA id y18sm12174029ljh.1.2019.07.28.12.43.31 for (version=TLS1_3 cipher=AEAD-AES128-GCM-SHA256 bits=128/128); Sun, 28 Jul 2019 12:43:32 -0700 (PDT) Received: by mail-lf1-f51.google.com with SMTP id b17so40546249lff.7 for ; Sun, 28 Jul 2019 12:43:31 -0700 (PDT) X-Received: by 2002:ac2:4565:: with SMTP id k5mr49790926lfm.170.1564343011303; Sun, 28 Jul 2019 12:43:31 -0700 (PDT) MIME-Version: 1.0 References: <201907281218.F6D2C2DD@keescook> In-Reply-To: <201907281218.F6D2C2DD@keescook> From: Linus Torvalds Date: Sun, 28 Jul 2019 12:43:15 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [GIT PULL] meminit fix for v5.3-rc2 To: Kees Cook Cc: Linux List Kernel Mailing , Arnd Bergmann 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 Sun, Jul 28, 2019 at 12:21 PM Kees Cook wrote: > > Please pull this meminit fix for v5.3-rc2. Side noe: I find "meminit" a confusing description for the structleak thing. When I hear it, it sounds like some generic memory initialization thing in the VM layer (which we obviously do also have), not the stack variable initialization. Also, have you guys talked to gcc people about just making it a real feature, like I think it is for clang? In particular, I still suspect that we could/should just make zero-filling the *default* in the long run, and say "our C standard is that local variables are initialized to zero, exactly the same way static variables are". I know you posted some numbers somewhere (well, I'm pretty sure you did) and the full stack initialization really was pretty cheap, wasn't it? Linus