Received: by 2002:a05:6358:111d:b0:dc:6189:e246 with SMTP id f29csp308414rwi; Mon, 31 Oct 2022 01:22:20 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6f8Fqj04Tg0L9KhYcIb5ixUJjIbp1C/ZFjQisSnnelNMiyFpd4iEBdBK8duF9RO3JDLbFa X-Received: by 2002:a17:90b:4a86:b0:213:5e7f:bf3d with SMTP id lp6-20020a17090b4a8600b002135e7fbf3dmr27824942pjb.209.1667204540202; Mon, 31 Oct 2022 01:22:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1667204540; cv=none; d=google.com; s=arc-20160816; b=EHq041+B+Oa8i94/wa7wBM9uu6tueSdli21+x+HPHDSUHNJP0WyzcF1mWGVr20ctwm TcOBJ1hW43I3patjX0+0sGCc9R6LHd54tPpoc6T0EGse93RKwBQ1d9lRx7F/uAOcpCy1 cZCMoui8VoVh9viAjAYMIEjFbyXZ7VPlTYQOx7MKfE1a1P2H9aXXPwquNyijxWfc5wsc CrInLaqS3efq+y4Ys1ihhLrWOiuEmMvMv6CN9cZAoyHo+8QACz332S8y1ARgZo5SDTX6 A084Dt9jT67xSMQfA8Ctwq2DTgrohRCc2xgda12u+BlCPHduLFsmCMrsddlBtZRD5i// YMWA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=poxA0LEev9jPrhZnkwyY7vsWe/HDoG5TgR6taboptUU=; b=nieonuTMS0+V3ij5gCFLWa6/xzbzfjbZfezkJj/QlTkA8zTyIDjmy2rsBi3B9LtsTQ pVVxSPtDC5BnWuhwZAFIXgxCoOYegDSigmUmZXMFAV2zG9BFhbNN4KV2elFmpamOVmPx ysTvQdtDU86GOiF8Fkv4n3QgK6onRtM0i1jahjGUknDhE/75+U4mGjiiZ7pP1TN+jthn IJMfSImXEx6W5/cqzrb24HixF7PI8IqGzP0UMY3MkciTUYbA8BUSUWdhq1I20kmy1Efa Tr/l44oRKQpgYFIM+M0HTia7HT01GROSkIfM8oY5YDLOtfznE/pzWcLFlrs6e5TKqZ6B aeaA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ventanamicro.com header.s=google header.b=LYy0CICI; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id f187-20020a636ac4000000b00460c67afbd9si7680929pgc.771.2022.10.31.01.22.06; Mon, 31 Oct 2022 01:22:20 -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=@ventanamicro.com header.s=google header.b=LYy0CICI; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229531AbiJaIGM (ORCPT + 99 others); Mon, 31 Oct 2022 04:06:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38374 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229494AbiJaIGK (ORCPT ); Mon, 31 Oct 2022 04:06:10 -0400 Received: from mail-ej1-x62f.google.com (mail-ej1-x62f.google.com [IPv6:2a00:1450:4864:20::62f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 66BBC7652 for ; Mon, 31 Oct 2022 01:06:07 -0700 (PDT) Received: by mail-ej1-x62f.google.com with SMTP id k2so27435688ejr.2 for ; Mon, 31 Oct 2022 01:06:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ventanamicro.com; s=google; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=poxA0LEev9jPrhZnkwyY7vsWe/HDoG5TgR6taboptUU=; b=LYy0CICIyprTOFQXJbmxldQgszdggru36ppt8BlYlS/6Fadz4lG7+PvpBInXK3sEwl 9c19coxXN6zfPF621QDiLFySz9+w3De89yPYhIqd1pl1g1LL2OTgeS0IT7F60LNAXCBj TF4jCAkyzHckAHw+4NbUXCJlkXC8jqinNwGBAo650tUVkm4qOCdpQOyA6+CxyIo6oVJI KHTpD5kEOyKveHPx/t7FAd8yS3EE8MPg+seA2KF22Fmhl2l8FspTrr8RgWX++cf2eZMF xm3SjqbAjsK1sVWszFcL2x0alWobxfqRnsQgl+JbUXYc2ZUSVa7+sfBfsb+bIQSHYlqq KjfQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=poxA0LEev9jPrhZnkwyY7vsWe/HDoG5TgR6taboptUU=; b=TD0Oq1kYuMZzFqBq4JcdgGabAHeLnUBU6/yycif5WKfMnBBrjvVBA7excIjNZZf5/l oBZ53UECb4KktxlTE/X/OQW15CLIrMbRi4utBkt+ppvnbyBKOhy/nXvJU2vmqQe8OGXY dyeY4v8nhSSiDKgAMNG0ZNwjd3A5w3eu8awKh916oyN7WEr6XheX2rPt66Yerlp42tLa 1vOxVuC5ziGG9oUOQyfGJLzHN0aTUNcigijcTsxmIEXjMIQhhR8SDHv2AZ2LjBRdzY/n 7NZUV4cprIi6nxd603Xd+RU6MAMjiiPmeQWfZBXSwdOakPaRMwO4CnvjmO4bqoZM9LGu UogQ== X-Gm-Message-State: ACrzQf0Kf4MLpXRkuEghh9BWgQHQgWke3fn5ueDW9SGI6hCwmtWNdoif zJ4dDNo4DXq6NQ1Nri5eJzNLXg== X-Received: by 2002:a17:907:80b:b0:77a:86a1:db52 with SMTP id wv11-20020a170907080b00b0077a86a1db52mr11721653ejb.294.1667203565981; Mon, 31 Oct 2022 01:06:05 -0700 (PDT) Received: from localhost (cst2-173-61.cust.vodafone.cz. [31.30.173.61]) by smtp.gmail.com with ESMTPSA id kz4-20020a17090777c400b0077b523d309asm2663665ejc.185.2022.10.31.01.06.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 31 Oct 2022 01:06:05 -0700 (PDT) Date: Mon, 31 Oct 2022 09:06:04 +0100 From: Andrew Jones To: Borislav Petkov Cc: Yury Norov , x86@kernel.org, linux-riscv , Linux Kernel Mailing List , Thomas Gleixner , Ingo Molnar , Dave Hansen , Palmer Dabbelt , Paul Walmsley , Albert Ou , Jonas Bonn , Stefan Kristiansson , Stafford Horne , openrisc@lists.librecores.org, Michael Ellerman , "open list:LINUX FOR POWERPC PA SEMI PWRFICIENT" , Heiko Carstens , Vasily Gorbik , Alexander Gordeev , linux-s390@vger.kernel.org Subject: Re: [PATCH v3 2/2] x86: Fix /proc/cpuinfo cpumask warning Message-ID: <20221031080604.6xei6c4e3ckhsvmy@kamzik> References: <20221014155845.1986223-1-ajones@ventanamicro.com> <20221014155845.1986223-3-ajones@ventanamicro.com> <20221028074828.b66uuqqfbrnjdtab@kamzik> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: 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 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 Fri, Oct 28, 2022 at 06:06:41PM +0200, Borislav Petkov wrote: > On Fri, Oct 28, 2022 at 10:13:28AM -0500, Yury Norov wrote: > > Because it's related to bitmap API usage and has been revealed after > > some work in bitmaps. > > So first of all, that "fix" needs to explain what exactly it is fixing. > Not "it fixes this and that warning" but why the input arg to > cpumask_next() cannot be nr_cpu_ids because... yadda yadda... Hi Boris, I didn't realize you were still looking for improvements to the commit message for this patch. I could add something like, The valid cpumask range is [0, nr_cpu_ids) and cpumask_next() always returns a CPU ID greater than its input, which results in its input range being [-1, nr_cpu_ids - 1). Ensure showing CPU info avoids triggering error conditions in cpumask_next() by stopping its loop over CPUs when its input would be invalid. Thanks, drew > > > And because nobody else cares. > > Why do you assume that? > > > If you're willing to move it yourself please go ahead. > > If it fixes a real issue, we are taking it. And pls note that x86 > patches go through the tip tree. > > Thx. > > -- > Regards/Gruss, > Boris. > > https://people.kernel.org/tglx/notes-about-netiquette