Received: by 2002:ac0:e350:0:0:0:0:0 with SMTP id g16csp2624074imn; Tue, 2 Aug 2022 09:44:40 -0700 (PDT) X-Google-Smtp-Source: AGRyM1s4X0A7SI4AI5P4EBE2+5Rkv/nPekRtUVexgNAxaQWlbneK3JE3+7wjcIYBnlEcrZgCXZ3P X-Received: by 2002:a63:f741:0:b0:412:86fd:48d with SMTP id f1-20020a63f741000000b0041286fd048dmr18297455pgk.154.1659458680106; Tue, 02 Aug 2022 09:44:40 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1659458680; cv=pass; d=google.com; s=arc-20160816; b=sP6GVAgnWrVn+jjijq9Q6YtKdoLeDynLxzNzNzX8HjdzEEl/N+fiNxtgEKm2XWMkWe jYSneLMzklLXaNO06HNFtAXB/IkVRWrDgehrUb3B8IlKOO0+7P5wUht8RB9v0EuTlmT2 u0KZDPwOzy9g/718Ml4Wryi/972+yGSH7QGRVLIDHjIt5xkf8+fFmIjkEB3dhhQV0zlu /GAMrylflbZtgZN4Bx4FST6XbjGKDOjPVw4BYVlCIi35pE9exXXTLFOEbCz8Yg2X8rmK AxwtO+vKqYUycd5dSzOwkO8SB94InKdv9ingqF+yEKK4zwlv5nR5w/AMsssboZdjUlPl PP1A== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:importance:content-transfer-encoding :mime-version:subject:references:in-reply-to:message-id:cc:to:from :date:dkim-signature; bh=tIaoKZqeKwVm3YXlgfzkmmqa+keWxZ5MypfokfBzu1Q=; b=BhMCqci7gLrs7QZ1y3YTdq9Q58133DyOzlBBypqBzcM1PwcXomq3lf8Y4W4X+8eNFA LRSeYq3/JPY7Ax3VD/+dAhyuGx/PXEhznl4/7RVNw+R8xY5KHX2DBjP4RsM7G5L4ansq FDncMxeCNUQ5Q5tfkUpovhS3a3RxagFYya5mum6lAO/P5Uw9VV8p9W6Z9sF8QAVVOz1H qh9uTVIeB1+Rdjs5WuLhC2kfYB5Uo+oPKtcR7Qo0en9Ah+QpLfkdbNbyl+UMRcfNxzz7 KRpyzkVNVL7/5B7NZU4e8mVKNHZ3oLYpmYVH4XI0oUE6iv5Z4r7PSGxmzhfkZAC8iw3S PJuA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@siddh.me header.s=zmail header.b=oEJBR4uc; arc=pass (i=1 spf=pass spfdomain=siddh.me dkim=pass dkdomain=siddh.me dmarc=pass fromdomain=siddh.me>); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=siddh.me Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id rv13-20020a17090b2c0d00b001f4df89edc4si8796311pjb.52.2022.08.02.09.44.26; Tue, 02 Aug 2022 09:44:40 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@siddh.me header.s=zmail header.b=oEJBR4uc; arc=pass (i=1 spf=pass spfdomain=siddh.me dkim=pass dkdomain=siddh.me dmarc=pass fromdomain=siddh.me>); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=siddh.me Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232689AbiHBQaz (ORCPT + 99 others); Tue, 2 Aug 2022 12:30:55 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39820 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237056AbiHBQax (ORCPT ); Tue, 2 Aug 2022 12:30:53 -0400 Received: from sender-of-o53.zoho.in (sender-of-o53.zoho.in [103.117.158.53]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9764E12AFB for ; Tue, 2 Aug 2022 09:30:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1659457757; cv=none; d=zohomail.in; s=zohoarc; b=Djhgp8iXUCsOnH9BSyQXz7FMb/CCtRzW70p2rAlremDefOEUPhcd/lYHd1VRKZeM3YRLOGNNeSKuekz/r9J/Cn49yzNpUMEQk/U7HZ0F0dU6qL7jlpWZjfkeguXXmjpQVrk1nA5k/YeazDLsBEZWRk3lLjVla5iWdRN+d0OlXcI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.in; s=zohoarc; t=1659457757; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:To; bh=tIaoKZqeKwVm3YXlgfzkmmqa+keWxZ5MypfokfBzu1Q=; b=AOGAeRcesujq661zWHJWre5A0KEV7ftyIYUHwYhdkcRYgQoTz9AQSSgrxHs1NK9LGIbrboePn5bSh0gR8XBKh6erYOYNUqne/4m0siUOyp+1bs6fuW0+fY4votXtTHTN4gDECXJjXx3b9ZFHqxsyn3XwIq95LbbN7L3HGe9ZlzY= ARC-Authentication-Results: i=1; mx.zohomail.in; dkim=pass header.i=siddh.me; spf=pass smtp.mailfrom=code@siddh.me; dmarc=pass header.from= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1659457757; s=zmail; d=siddh.me; i=code@siddh.me; h=Date:Date:From:From:To:To:Cc:Cc:Message-ID:In-Reply-To:References:Subject:Subject:MIME-Version:Content-Type:Content-Transfer-Encoding:Message-Id:Reply-To; bh=tIaoKZqeKwVm3YXlgfzkmmqa+keWxZ5MypfokfBzu1Q=; b=oEJBR4ucJWNOr8jLGXAYjnRdA3ARGIT+6lE5L1REVDeYjJryM5Mj3+UeC4HtJ+nz 4FEmI2NUKoT5AtsnyZJn4ho0wiCZs8S6B37xp/HmIEanfBVL8r0P40viL3GNKW0cONb /IlFqk+1C4+5t5EqcQkD4v2y1gzj2W7WIFrkVA4I= Received: from mail.zoho.in by mx.zoho.in with SMTP id 1659457745264923.42593622627; Tue, 2 Aug 2022 21:59:05 +0530 (IST) Date: Tue, 02 Aug 2022 21:59:05 +0530 From: Siddh Raman Pant To: "Ingo Molnar" Cc: "x86" , "Dave Hansen" , "Andy Lutomirski" , "Peter Zijlstra" , "Thomas Gleixner" , "Ingo Molnar" , "Borislav Petkov" , "H. Peter Anvin" , "linux-kernel" , "linux-kernel-mentees" Message-ID: <1825f63b142.8968bde3116633.1242410031840350968@siddh.me> In-Reply-To: References: <20220731160913.632092-1-code@siddh.me> Subject: Re: [PATCH] x86/numa: Use cpumask_available instead of hardcoded NULL check MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit Importance: Medium User-Agent: Zoho Mail X-Mailer: Zoho Mail X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,URIBL_RED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 02 Aug 2022 16:37:44 +0530 Ingo Molnar wrote: > Your fix makes sense I suppose, but I'm wondering how testing didn't > trigger this warning. > > Off-stack isn't a rare config option: > > kepler:~/tip> make allmodconfig > # > # No change to .config > # > kepler:~/tip> grep CPUMASK_OFFSTACK .config > CONFIG_CPUMASK_OFFSTACK=y > kepler:~/tip> > > What am I missing? Maybe this triggers on certain config options set, or maybe due to new gcc version? (I'm using gcc-12, I also likely saw while on gcc-11.) It nevertheless is a helpful warning. I just now tried `make defconfig` (default configuration based on 'x86_64_defconfig') and compiling with `make -j13 all`, and gcc doesn't give any warning. (CONFIG_CPUMASK_OFFSTACK isn't even listed in the .config file produced, grep fails.) The config on which I can reproduce the warning can be found here: https://gist.github.com/siddhpant/0197ea2b9873e8719d5d7ef991e2cd89 (It has 8969 lines, thus uploaded as a gist.) This is a modification of a config found on syzkaller, which I was using to compile and test some bug. I had noticed the gcc warning earlier while on similar detours and usually ignored it, but now I finally took a look. I tested compiling with it 5 times (`make clean` and `make -j13 all`), and gcc gave the warning in all attempts. I also tried `make -j1 all`, which also had gcc spitting out the warning, so it cannot be any race. > > Fixes: c032ef60d1aa ("cpumask: convert node_to_cpumask_map[] to cpumask_var_t") > > Fixes: de2d9445f162 ("x86: Unify node_to_cpumask_map handling between 32 and 64bit") > > These are ancient commits from 2009 & 2011. Yes, that's where blaming the file leads me to. Thanks, Siddh