From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-10.2 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,NICE_REPLY_A, SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7B47BC433F5 for ; Tue, 7 Sep 2021 23:35:39 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 4B13B61102 for ; Tue, 7 Sep 2021 23:35:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S245378AbhIGXgk (ORCPT ); Tue, 7 Sep 2021 19:36:40 -0400 Received: from mail.kernel.org ([198.145.29.99]:45476 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231519AbhIGXgh (ORCPT ); Tue, 7 Sep 2021 19:36:37 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id C25E1610C8; Tue, 7 Sep 2021 23:35:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1631057730; bh=vWnttUTlF72LyMrYjIe/78FyUtshVhZy/pfLSh7SFiY=; h=Subject:To:Cc:References:From:Date:In-Reply-To:From; b=U6bhbq/e7swGtHS4elAaebisMP4udNQk1DmHur/UmRfOzJP287/22Sl7MnFX2t3m0 H5mdMXeCMhgSw7InBrFmEYhKNE7fqIYXLp8N57IqHvU+6essRsQUqYeslpAnZ3O2v4 EfjPXh4NGH5AMFduknEvWv9grbxsdHlyGvHetBy7UxNRcNcGOgvEAzwJNROk6U7HQg 3HCGqr1MhAm7ZpTuR/80Yj9r4/zqLTlBLBhpvQ4g/X3s7GSTi7X04hnNGoZmr8dp+H mQBaVmu19EFA/kLtF85BSAotL0eJB+eYtyzb3tRYt2cXjDyTspNW85j9zAgxqzXbcC c8obvu7titLiA== 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 , Shuah Khan , 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 , Daniel Borkmann , Alexei Starovoitov , Eric Dumazet References: From: Nathan Chancellor Message-ID: <92c20b62-c4a7-8e63-4a94-76bdf6d9481e@kernel.org> Date: Tue, 7 Sep 2021 16:35:26 -0700 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.13.0 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: netdev@vger.kernel.org On 9/7/2021 4:14 PM, Linus Torvalds wrote: > There are many more of these cases. I've seen Hyper-V allocate 'struct > cpumask' on the stack, which is once again an absolute no-no that > people have apparently just ignored the warning for. When you have > NR_CPUS being the maximum of 8k, those bits add up, and a single > cpumask is 1kB in size. Which is why you should never do that on > stack, and instead use ' > > cpumask_var_t mask; > alloc_cpumask_var(&mask,..) > > which will do a much more reasonable job. But the reason I call out > hyperv is that as far as I know, hyperv itself doesn't actually > support 8192 CPU's. So all that apic noise with 'struct cpumask' that > uses 1kB of data when NR_CPUS is set to 8192 is just wasted. Maybe I'm > wrong. Adding hyperv people to the cc too. I am only commenting on this because I was looking into an instance of this warning yesterday with Fedora's arm64 config, which has CONFIG_NR_CPUS=4096: https://lore.kernel.org/r/YTZyMx91zV9kfDkQ@Ryzen-9-3900X.localdomain/ Won't your example only fix the issue with CONFIG_CPUMASK_OFFSTACK=y or am I misreading the gigantic comment in include/linux/cpumask.h? As far as I can tell, only x86 selects it and it is not user configurable unless CONFIG_DEBUG_PER_CPU_MAPS is set, which is buried in the debug options so most people won't bother trying to enable it. If I understand correctly, how should these be dealt with in the case of CONFIG_CPUMASK_OFFSTACK=n? Cheers, Nathan