Received: by 2002:a05:6a10:eb17:0:0:0:0 with SMTP id hx23csp553296pxb; Wed, 8 Sep 2021 07:13:28 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwcgX8NLiLuNqp9G4eCJ2PJHjsyVztpiyk+zpVzYGy7+NsbwlF6Tb9PtsQcLGByvVXWX+tW X-Received: by 2002:a05:6402:1a2f:: with SMTP id be15mr4126178edb.246.1631110408025; Wed, 08 Sep 2021 07:13:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631110408; cv=none; d=google.com; s=arc-20160816; b=pP3A65neHTH4UFZ2dZcNmosvfPKas0G+GQKcmOnQdJ1s6JqdI3AfW4bvTBW+0DuBF9 61mIA9QmkF/CB853C7ml/cMwnT3jN2W4NciVo/vYHdF9yJDN5BBlkcq34I0p7lTbghuE ZjhFbm5rZXBO7xhy2eXV90Oux7jj2kU5JwNDp7Xpmo+CdQABvSsd5evaP7zunuE3lfvk KZsMJWsusCIqLL/Drdz8Yw1ug2gVxVIc3aD615Hma0hvZhFwcYHwGnq7/L7RPFdAzgBS dJt8FQsXFYomJPVR6dOKO5dxG6QkchXrMpP3MU30vkkVtjCOqpuzA2H3weSxgsfliuBD FDnw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:dkim-signature; bh=h56N23KkijtRAG3ZoT0nWhy4eiurQamwjgFR6Q1Zg+4=; b=0gve75jUEEmGjoEpV8mw7bOS3UlXGOIB31XgBsD1MwKXnglo+G1Edq35syDKug3CCJ ue0FF5/kUTIMqeSCF5eB4Td270LGo2oz8k1KjUrxm0WexIfSEumGq2SI4uEZKNCJJzty lO7HIiSr2UF66LPDRjBLzxxgKHXc3ZlKeYKb0j483Uts0k4xxEonrmQR8CDS6vsY42dq j3CDfDAJAeTzZdtOfIoOJQvIF27xZrx0PTUJFqrpCjsAyDvW+zB4DX9wBeiGCEKBZVWz Oq4yqoB7juZusnw61jsJNMp25XC53UDzCQ8QmzoVnPfEvKPuwkZ4GSe4aIfPeeVqVr35 vGxw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=google header.b=NOKQw41L; 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=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id f17si2352611edj.177.2021.09.08.07.13.01; Wed, 08 Sep 2021 07:13:28 -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=@linuxfoundation.org header.s=google header.b=NOKQw41L; 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=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1348320AbhIHOMr (ORCPT + 99 others); Wed, 8 Sep 2021 10:12:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55844 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229600AbhIHOMq (ORCPT ); Wed, 8 Sep 2021 10:12:46 -0400 Received: from mail-il1-x134.google.com (mail-il1-x134.google.com [IPv6:2607:f8b0:4864:20::134]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 911B8C061575 for ; Wed, 8 Sep 2021 07:11:38 -0700 (PDT) Received: by mail-il1-x134.google.com with SMTP id s16so2446189ilo.9 for ; Wed, 08 Sep 2021 07:11:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=google; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=h56N23KkijtRAG3ZoT0nWhy4eiurQamwjgFR6Q1Zg+4=; b=NOKQw41L5DOfpZAyRQKlcUeEgFvpXXMaWD//HYPx92A6Krj6OyBec9XvpKkZxxoIph U7ovtYxRF9YVOEtVZDBCOV8IWwdG4tMzL33AvhgD+LWu3967ogjFQbJNd37mhadh9W6E vczqWIwdigVtZhKjmb5iPfQJ+15JtKbK3tCng= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=h56N23KkijtRAG3ZoT0nWhy4eiurQamwjgFR6Q1Zg+4=; b=hYHjd9nNlHng7okULlQU9KJhoRlHj6qcRRCx7IIG2dH7/o/9p0YwiM9KGAES7jKGGp 3mqXaIOBdv+9PdkwfAC03eFAfCjlW5m/EHCw5hiDBz6wwYKSK2o0DkGliA2VuDSUkWKd e4Mp4NIIpfsk587mN9citZYHaRsBrIJmaF71SrLnvcuE218Ko+UBJOl5LV5DEMPciTDF mH24ZmTxoS8tabRRMYL+EtFa15OuzTXgNt7tAkb4cPZ54PEDZkxYu7IT9aWHlc3vgRcW l5FcYw8zyqVrFdiWoTjPvWjBu2aZQKCTS8NhlSWJE9lh2Yvu47V9AT0x63hxg4mYMG1n GerQ== X-Gm-Message-State: AOAM530P3lHeru9w897F8ywc3QrVDzmm+2UZh4UtjyT6f+/61YP9Liqz d7eL8T1t6atgHBUuBhm05q9g9w== X-Received: by 2002:a05:6e02:78d:: with SMTP id q13mr53233ils.262.1631110297834; Wed, 08 Sep 2021 07:11:37 -0700 (PDT) Received: from [192.168.1.112] (c-24-9-64-241.hsd1.co.comcast.net. [24.9.64.241]) by smtp.gmail.com with ESMTPSA id p11sm1171267ilm.61.2021.09.08.07.11.36 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 08 Sep 2021 07:11:37 -0700 (PDT) Subject: Re: ipv4/tcp.c:4234:1: error: the frame size of 1152 bytes is larger than 1024 bytes [-Werror=frame-larger-than=] To: Linus Torvalds , Naresh Kamboju , Mathias Nyman , Johannes Berg , Jakub Kicinski , Brendan Higgins , Ariel Elior , GR-everest-linux-l2@marvell.com, Wei Liu Cc: Linux ARM , open list , Netdev , lkft-triage@lists.linaro.org, Arnd Bergmann , "David S. Miller" , Greg Kroah-Hartman , Nick Desaulniers , Nathan Chancellor , Daniel Borkmann , Alexei Starovoitov , Eric Dumazet , Shuah Khan References: From: Shuah Khan Message-ID: <36aa5cb7-e3d6-33cb-9ac6-c9ff1169d711@linuxfoundation.org> Date: Wed, 8 Sep 2021 08:11:36 -0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.8.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 9/7/21 5:14 PM, Linus Torvalds wrote: > [ Added maintainers for various bits and pieces, since I spent the > time trying to look at why those bits and pieces wasted stack-space > and caused problems ] > > On Tue, Sep 7, 2021 at 3:16 PM Linus Torvalds > wrote: >> >> None of these seem to be new. > > That said, all but one of them seem to be (a) very much worth fixing > and (b) easy to fix. > > The do_tcp_getsockopt() one in tpc.c is a classic case of "lots of > different case statements, many of them with their own struct > allocations on stack, and all of them disjoint". > > So the fix for that would be the traditional one of just making helper > functions for the cases that aren't entirely trivial. We've done that > before, and it not only fixes stack usage problems, it results in code > that is easier to read, and generally actually performs better too > (exactly because it avoids sparse stacks and extra D$ use) > > The pe_test_uints() one is the same horrendous nasty Kunit pattern > that I fixed in commit 4b93c544e90e ("thunderbolt: test: split up test > cases in tb_test_credit_alloc_all") that had an even worse case. > > 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 detest code that exists for debugging or for testing, and that > violates fundamental rules and causes more problems in the process. > Having recently debugged a problem spinlock hold in an invalid context related to debug code, I agree with you on this that test and debug code shouldn't cause problems. thanks, -- Shuah