Received: by 2002:a05:6a10:eb17:0:0:0:0 with SMTP id hx23csp866897pxb; Wed, 8 Sep 2021 14:27:59 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzLh/8fWFZnz+tdU5T+rd7bbK+yXNPYkrSPngf50nunEhmByvDbZKM1sWmK05o89wYT0SfV X-Received: by 2002:a92:d782:: with SMTP id d2mr221625iln.123.1631136479514; Wed, 08 Sep 2021 14:27:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631136479; cv=none; d=google.com; s=arc-20160816; b=UBpAwq1NKQF6f1yn0JDeruBDCRrzOmYGNOFGfk4ydO+DamstlW7Lh6kufvzFFXk0VL 8jIRDz/5dK5vLpvIwc0p36OxdymQbBH1b44OPN2cWOFzI3mcokNh+83Kqkdgh6tzz+3o t6E9VSSXbS56JjTDq7VFY3DoSK06libzZRTmbJXAUC8YlAxiu6ZQcERl8furCuoGOu5i zRuAAT7TEUqNMiNjQhtDgQSBsXXbXCLtg9V2/mKNwMGxEYRplhnrPKRGasIEbhh1/S42 AzsODKY7RNMdKUni2pTLLJgAztMBuCO5+z2UQOevSOCnfujvYIwXkMM26454rA2ypzb1 kpHg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=oIrl1iKEkPhOhEiYAXs9Icej/cMm4caDVRBNE890nMk=; b=XxGeNRxc1fSRhcQMPwIAUQIwlXVD9cnU3mkHwASiE8VOPLaD99EueUuHGjxlhwTSX4 fuXeq6m7yj7rgsi51CirJ2z5IaC+5+i3Jlmx2sBr+1/ifBK6iyQiZSSKkJ++OLTk/Slu 8TPyW6OZIra6kbAFLZYd5A6OGNvHFetme/vJw0NhjGJWxhBQizhrpiRfGAGHLcqrxyal NyzfuedVfqOC9V+3fGVdoNFHkJzCoJPPCUWz4RASGeh6rlDbualM4ZAGY8drxne/cBSP tEuTMFW1ytEqqzmBmP+6ImL1Ue/LEkeurfk5U+qGcoEQvbo2TadnLqhD+SMZKMQb4zGb 0lXw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=TZmdsHFX; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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. [23.128.96.18]) by mx.google.com with ESMTP id x8si356477iom.11.2021.09.08.14.27.46; Wed, 08 Sep 2021 14:27:59 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=TZmdsHFX; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 S1352513AbhIHV0M (ORCPT + 99 others); Wed, 8 Sep 2021 17:26:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41538 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231956AbhIHV0K (ORCPT ); Wed, 8 Sep 2021 17:26:10 -0400 Received: from mail-pg1-x534.google.com (mail-pg1-x534.google.com [IPv6:2607:f8b0:4864:20::534]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 84B5BC061575 for ; Wed, 8 Sep 2021 14:25:02 -0700 (PDT) Received: by mail-pg1-x534.google.com with SMTP id f129so3996887pgc.1 for ; Wed, 08 Sep 2021 14:25:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=oIrl1iKEkPhOhEiYAXs9Icej/cMm4caDVRBNE890nMk=; b=TZmdsHFXh0pLbF1Aki2gtLI09dMbe3Ck4iTtyNnvaXyZ/0MyHfj3eTpEmvvWie3oK0 cytHyGfWn4YRMdeRykGfsw2GmbCKItYUkNXCjAyqGo7/aybSIK4cB1hK8BHHbDC+Rglm +7sBlWMUqHT0wWp7Rs236+DLRPwub1Ity73wYOkcDPMzPoxx/GAUXmcsqWqXI9YuGuwg RYuca1gvKTUx1K4VHJOnY7D5fJTJaLdL3ilkulhIb+iGIiJVFwU+rdidcNbIWUtm+owb p9mg5VcxFDT4KWJ13LIAknBLMD0rOIdliDjoS+XOmvOKcnXBkz6g3fuawcYn7xjpS/HZ 1koQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=oIrl1iKEkPhOhEiYAXs9Icej/cMm4caDVRBNE890nMk=; b=uD+y5/dOIIY/7F0NUdtogY1Om7w+Qfhl3V1dgRGFSnygyWVHGQI/blsolY0jVtuNUP noSoTqdK59Hgrcu0QoxrKQKgCU/7YmzqFXjms1xmB+9R+6a3RIuQI9h2xaR6Z/6BzS15 vngowhwmawbNl1qn0K/WyMVEtNZEZVQOUhPW9RWpChGXarZtKUW9bmwKfpfHRRulkVmq l/RpJPJMAPD8x/UsDNzYDFZMsOpuj1yjIB/n5zw1yXzh2u+OyT/ChO2s3ng9m60r+dUU eXoGQrXqT6P29CALydgBabVdZYrImvy43xvplCywuXrI8adDaO+imcHLQaQcphVbh61O O00A== X-Gm-Message-State: AOAM531Jsjfw8vRnIL4MezM/N4d4jWBDkMGHn9VkoHjf6V69j6VX6rh+ KuYwTnzsebRNRlL59ONoSmCnnR0RUROUuELXqrufaQ== X-Received: by 2002:a62:1b92:0:b0:3eb:3f92:724 with SMTP id b140-20020a621b92000000b003eb3f920724mr147019pfb.3.1631136301711; Wed, 08 Sep 2021 14:25:01 -0700 (PDT) MIME-Version: 1.0 References: <36aa5cb7-e3d6-33cb-9ac6-c9ff1169d711@linuxfoundation.org> <120389b9-f90b-0fa3-21d5-1f789b4c984d@linuxfoundation.org> In-Reply-To: <120389b9-f90b-0fa3-21d5-1f789b4c984d@linuxfoundation.org> From: Brendan Higgins Date: Wed, 8 Sep 2021 14:24:50 -0700 Message-ID: Subject: Re: ipv4/tcp.c:4234:1: error: the frame size of 1152 bytes is larger than 1024 bytes [-Werror=frame-larger-than=] To: Shuah Khan , Arnd Bergmann Cc: Linus Torvalds , Naresh Kamboju , Mathias Nyman , Johannes Berg , Jakub Kicinski , Ariel Elior , GR-everest-linux-l2@marvell.com, Wei Liu , Linux ARM , open list , Netdev , lkft-triage@lists.linaro.org, "David S. Miller" , Greg Kroah-Hartman , Nick Desaulniers , Nathan Chancellor , Daniel Borkmann , Alexei Starovoitov , Eric Dumazet , KUnit Development Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Sep 8, 2021 at 10:16 AM Shuah Khan wrote: > > On 9/8/21 11:05 AM, Arnd Bergmann wrote: > > On Wed, Sep 8, 2021 at 4:12 PM Shuah Khan wrote: > >> On 9/7/21 5:14 PM, Linus Torvalds wrote: > >>> The KUNIT macros create all these individually reasonably small > >>> initialized structures on stack, and when you have more than a small > >>> handful of them the KUNIT infrastructure just makes the stack space > >>> explode. Sometimes the compiler will be able to re-use the stack > >>> slots, but it seems to be an iffy proposition to depend on it - it > >>> seems to be a combination of luck and various config options. > >>> > >> > >> I have been concerned about these macros creeping in for a while. > >> I will take a closer look and work with Brendan to come with a plan > >> to address it. > > > > I've previously sent patches to turn off the structleak plugin for > > any kunit test file to work around this, but only a few of those patches > > got merged and new files have been added since. It would > > definitely help to come up with a proper fix, but my structleak-disable > > hack should be sufficient as a quick fix. > > > > Looks like these are RFC patches and the discussion went cold. Let's pick > this back up and we can make progress. > > https://lore.kernel.org/lkml/CAFd5g45+JqKDqewqz2oZtnphA-_0w62FdSTkRs43K_NJUgnLBg@mail.gmail.com/ I can try to get the patch reapplying and send it out (I just figured that Arnd or Kees would want to send it out :-) since it was your idea). I definitely agree that in the cases where KUnit is not actually contributing to blowing the stack - struct leak just thinks it is, this is fine; however, it sounds like Linus' concerns with KUnit's macros go deeper than this. Arnd, I think you sketched out a way to make the KUNIT_* macros take up less space, but after some investigation we found that it was pretty inflexible. Ideally test cases should never get big enough for KUNIT_* macros to be a problem (when they do it is usually an indication that your test case is trying to do too many things); nevertheless, we are still in this situation. I think I will need to dust off some cobwebs out of my brain to remember why I didn't like the idea of making the KUNIT_* macros take up less stack space.