Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp7891638ybl; Thu, 16 Jan 2020 07:18:15 -0800 (PST) X-Google-Smtp-Source: APXvYqxc4PGWIuTjSIm4i/1C2uqq9SFB3u7gy9s1j66CM/XbdYu3qScjf/1K9UWtKHBawcwMb/vF X-Received: by 2002:a05:6830:1294:: with SMTP id z20mr2373259otp.60.1579187895475; Thu, 16 Jan 2020 07:18:15 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1579187895; cv=none; d=google.com; s=arc-20160816; b=Rz9vFpht7bc/AB878g52jTfQ9b6nxGnZESDG3XU1GbQyaUg4BQOGa5npcdzQdQEx/W yCweISb5DbrEJMxy4VK+TsNoB62EZ3L/tKXGXo2YR0gNOJ1XsI0D+GkDavaXiXFEk7s2 gzkKy29C3baJUOpmqSRvFWnQyvbLUXSrsgHNtbPE1ae5a0QOcbi9kQF6xhqPWyi5igd8 DBILFzW4KyYJ55cUhQRd6Rtz4N3Juq6QVGjp6o4mUTXIbQrqgtQcylFlrQY+F5fSj8cQ hKRsgp9DN3x4Q+c8AMIGskSNYIwTEd8mq/xPxhrdWDkjBvk2zG0XN076K80XsMHCSU/D i+Vw== 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=aGV1h/iK7hiXSSeoWtrJ8GgUJFrerydZrHGUyBFsufA=; b=pojum6hLrRH99015jXUihMyrkWW4MEViBX0Ry/YtaDNmuIE/XeE99+oat0tFkjL01a j/Z55epW2GjK+mycm6l8Ri0GTdCR/7ly5qEkHqUwATQJ5tV/BDEwzEyslkqaWSEvkMgp gUo3cKKw3VjihG7G4oWamF/tlJMCR2eOo19Y4JHI70nMMODOyMYMXTZKSBgmtBg3rWRW LXtSUcOGlzdym3iKKKTf2KU1ZSLFHAOaFZu6rzI0OPdY2o0ckdkPFPLISmSeuPNdA+5k jjmpl8yZ9CKayVRE9//qGwStRxzcv0Q5ZndeiJAV6kLwzS4KYmzprT41HIgbc9azfeB/ n2GQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=rxtncIiZ; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id o20si12514846otl.60.2020.01.16.07.17.57; Thu, 16 Jan 2020 07:18:15 -0800 (PST) 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=@google.com header.s=20161025 header.b=rxtncIiZ; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726535AbgAPPQt (ORCPT + 99 others); Thu, 16 Jan 2020 10:16:49 -0500 Received: from mail-pj1-f67.google.com ([209.85.216.67]:51142 "EHLO mail-pj1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726343AbgAPPQt (ORCPT ); Thu, 16 Jan 2020 10:16:49 -0500 Received: by mail-pj1-f67.google.com with SMTP id r67so1659760pjb.0 for ; Thu, 16 Jan 2020 07:16:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=aGV1h/iK7hiXSSeoWtrJ8GgUJFrerydZrHGUyBFsufA=; b=rxtncIiZqM3ICugqtMazv94B5O/KjQTtkhi/er7Z9fVtOxdTy5zmcicx+tagprHsBG NWOUcN8jjejkSAdlPu1L/FQYnDn8+jG91nuwCRKATs3QnMZlOOSMm1TMAGkLzRbfvThE fOU9lEw/alOEC2tFAYkVsMQ+k8d6inoHR/tXhhMP0E61uyE9NvgISizH96Ncl1RXXePI Apsc/qubW1txHLXZabRWTLXYbYv7NOuT/pHnpMT3e66+SPZsH8irx/Owmq2kJPFuRSS+ b1Ld5SaPiw1a2D9UxFqqYiuM4SkCyujzB0nij5hXFKZjtY0TL4vgdA0KZvPSuqe1Cp// EgQA== 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=aGV1h/iK7hiXSSeoWtrJ8GgUJFrerydZrHGUyBFsufA=; b=hZOFl61UEjyghKtIJBbjGOQx01CDaLkP8SWLVcGCOB2osPHg1rGS0f3yBY+0hrhavy pYxGKDCUL8gMi/9dt7OpLZegUWkXhpYjFu2KajERpF67wWU2DAo+yVY99rYcv5gRWupn sUa4BdthozGGLa3b1nTr0kujJ089qahBzZXI8pdDtZ3AzOhN/9latMciJeO8N9XIXLlz Mu3N9ISQmNvVR/GML2pNGzrds8p+nyhGJjYcco3ua8ROoDKPTP+8aTIdjKRtBRwZPknz zPCI7q+Qi3dQpchkhagEoTgsWLjhzOIEb6AmIz7GWezwQCrl/pM8CnCzEppoldi7blUm tCtw== X-Gm-Message-State: APjAAAVawYWN9DuTR3z3hpCXAemXG7piGz3PV/C+0K+KJaQoobYRI1Iq soO5+KXOiUZ6DYCzB8kk6Cq/Wz3xONLvVgEBV9wXMw== X-Received: by 2002:a17:90a:858a:: with SMTP id m10mr7400543pjn.117.1579187808434; Thu, 16 Jan 2020 07:16:48 -0800 (PST) MIME-Version: 1.0 References: <201912301716.xBUHGKTi016375@pmwg-server-01.pmwglab> <202001151727.C07DA17@keescook> In-Reply-To: <202001151727.C07DA17@keescook> From: Brendan Higgins Date: Thu, 16 Jan 2020 07:16:36 -0800 Message-ID: Subject: Re: kunit stack usage, was: pmwg-ci report v5.5-rc4-147-gc62d43442481 To: Kees Cook Cc: Arnd Bergmann , PMWG CI , Dmitry Torokhov , "Rafael J. Wysocki" , Linux Kernel Mailing List , Private Kernel Alias , Ard Biesheuvel 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 Wed, Jan 15, 2020 at 5:29 PM Kees Cook wrote: > > On Tue, Jan 07, 2020 at 01:37:07PM +0100, Arnd Bergmann wrote: > > On Mon, Dec 30, 2019 at 6:16 PM PMWG CI wrote: > > > > > > > > > The error/warning: 1 drivers/base/test/property-entry-test.c:214:1: warning: the frame size of 3128 bytes is larger than 2048 bytes [-Wframe-larger-than=] > > > ... was introduced by commit: > > > > > > commit c032ace71c29d513bf9df64ace1885fe5ff24981 > > > Author: Dmitry Torokhov > > > Date: Wed Dec 4 10:53:15 2019 -0800 > > > > > > software node: add basic tests for property entries > > > > This problem is a result of the KUNIT_ASSERTION() definition that puts > > a local struct on the stack interacting badly with the structleak_plugin > > when CONFIG_GCC_PLUGIN_STRUCTLEAK_BYREF_ALL is set in > > allmodconfig: > > Geh, BYREF_ALL strikes again. I'm at LCA currently, but I'd like to try > to revisit actually fixing the basic-block splitting in the plugin. This > was looked at before, but I need to dig up the thread. Sounds ideal. I almost got the idea I suggested with the union/single copy implemented, but it turns out that it is much more complicated than I originally thought. It turns out that I need more than one copy per struct kunit instance, I need one per active thread associated with a struct kunit instance. It still seems possible to do this with percpu, but it also makes the macro factory more complicated as well. I am now questioning whether the approach I suggested is really any better than Arnd's approach. So yeah, I would definitely prefer fixing the struct leak code. > If a fast fix is needed, I'm fine with disabling BYREF_ALL with KUNIT. > It's not optimal, but I feel it's on the BYREF_ALL code to solve this. :) Sounds good to me.