Received: by 2002:a05:6a10:eb17:0:0:0:0 with SMTP id hx23csp24078pxb; Tue, 7 Sep 2021 16:37:20 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzKfjMuR3BG+KvH2s2SgQK2aqFJBY+V0abRB1+tvloK3maTCSO4BL9A4USOkKK99wxJrY+f X-Received: by 2002:a05:6602:3404:: with SMTP id n4mr600052ioz.45.1631057840214; Tue, 07 Sep 2021 16:37:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631057840; cv=none; d=google.com; s=arc-20160816; b=dDPSYZQXAZVTTyP/MU2WqaJ9QitLF0GF9jYsIQ3mkjw3WLUfwX7HNpdhWDcZbjd7KJ J+Fj5ngPw4G9sprtgc2LQjkUJcFpkF8UbH5F6NpO7JI/P91YskoUTXvjWdWn40lUEjXb KaOWS0MfhR+Zz3L8tP5KILGBYd2UZP2rwa0u0ZXOJJlwbB+yyEZOytUvk4NGA0eYi4kW UhshYNPsSUJI6AjpCRreDHQlc3B+roPhwg3+bvdMDS0Nsw8u/WCeiYZTzFmfG6C8gSuK 3rpzYsOvKX0VZHqGiXC2BPJkC5s2KJeMZ7AGCGiYL9StCgSgNaH0h4BBUcQr+Qxt7vQD p5pg== 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=lt+VJjhIbRTWCpebc1/dsLzf3E+AvqIT5ts4jDxS9HA=; b=gcuouPy7Zq1XTGSf7qgyVeNpaXqVDstbuBEZ0tfcspxJ+/+ipuXeL6DnoPAOs5F1Fl C45u91Dp16MnGPHBfMC90MkmtQE7oF5UfTY57KV015ikVzDPbzIRVrOmLDJ3qWjN1uPP rH7kdlNjpfq7Qa4UdH5g7hzVBJfiWbCRvS2QJJM3qbDBCrbtrEBOGJpTsujR1u0gtTWv UxlSYF2/SLwDpySsdw/LqRpjAIiszKCMBirbzym7tj8ptPqnBrPCrfZWFVYs5GXb75NY UDrp+C65k50NcY2GZRJTaXoyeSTKnbK80xBuEK34UI9u3lVMPiP6iCS3Cej61qMvhgjP 0kPQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="U6bhbq/e"; 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=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id t1si352790ioj.70.2021.09.07.16.37.08; Tue, 07 Sep 2021 16:37:20 -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=@kernel.org header.s=k20201202 header.b="U6bhbq/e"; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240071AbhIGXgi (ORCPT + 99 others); Tue, 7 Sep 2021 19:36:38 -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: linux-kernel@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