Received: by 2002:a25:c205:0:0:0:0:0 with SMTP id s5csp526223ybf; Fri, 28 Feb 2020 02:42:04 -0800 (PST) X-Google-Smtp-Source: APXvYqzRmVSzr8C1Y0Bp5A/xGSOYmuuc0MtkIeSpN2Hd/sqYZw6GBppAampU+Zc6wbden/BVF+gy X-Received: by 2002:a05:6830:128e:: with SMTP id z14mr2687536otp.184.1582886524371; Fri, 28 Feb 2020 02:42:04 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1582886524; cv=none; d=google.com; s=arc-20160816; b=YAKfsj0wq+dAsNecHNWdficchcDWEiZuQ1DfiFLyze7ECzCpPRpiL/N1e5RjnE5V5D QbdxnMEHopruVQwtGbLKShmPRg53IaDXEwIMYgQqKqXwMqUWsfPW5KzLSi60z85acUnd Ez8C1FOK0pC0OWctZM10OGVTLGDhLxqNKafJebaJN9F4jTxhw5nCEJaVvrr+X4SP+GSo annVC1RSszZR+enwcdpBKFMVOoX3QYWx6rSienUnp4BTu8y/rgkyVly6YmkpGs+rOhzi G5UTH1yUIuRmB6Z4z09f9pJeluMS4/3d4Gkkrw2L0bpLZqaszkCbsZaUx2BOT9LuZZD7 W/jw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=TL7aGpV1MQlKFoYpMh/u3QL1S1GaNfegFRnhW2caAUI=; b=en/yPhmq6tVLB/ew8ZlmeX2F8kgP2eA9VcIlLrB2j0inGfRYrq4MyyBzSxQ08y42yk +/jOtIohr3E4XlVzYhOqBILau0MtwLNh86VAfQ1aTFV8r3BU4lSV4A8ke98i/SVVYQPE MUhbrS1GRqjII65X020HmLUKTtogJqEKscTV8W/NjqojNaSAYLy1UxzFXoSQyxNQkhK0 0dHQWyIxoFOy1PawE+TtbON4ogCtoZrBerl0Oe7ld+fRVZsINWm2OXEt/inoO6hFZr6S cq1nSZHFFq6rhvjyFZz7o7XRTbdMrPZsUOPPUJ+HEoxIllB7+fQZOHbu/lcAVXRD+8Ws ph9A== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w10si1361601ote.197.2020.02.28.02.41.51; Fri, 28 Feb 2020 02:42:04 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726661AbgB1Kki (ORCPT + 99 others); Fri, 28 Feb 2020 05:40:38 -0500 Received: from foss.arm.com ([217.140.110.172]:36324 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726063AbgB1Kki (ORCPT ); Fri, 28 Feb 2020 05:40:38 -0500 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id C65774B2; Fri, 28 Feb 2020 02:40:37 -0800 (PST) Received: from bogus (e103737-lin.cambridge.arm.com [10.1.197.49]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id E09FB3F73B; Fri, 28 Feb 2020 02:40:36 -0800 (PST) Date: Fri, 28 Feb 2020 10:40:34 +0000 From: Sudeep Holla To: Zeng Tao Cc: linuxarm@huawei.com, Greg Kroah-Hartman , "Rafael J. Wysocki" , linux-kernel@vger.kernel.org, Sudeep Holla Subject: Re: [PATCH] cpu-topology: Fix the potential data corruption Message-ID: <20200228104034.GB26973@bogus> References: <1582878945-50415-1-git-send-email-prime.zeng@hisilicon.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1582878945-50415-1-git-send-email-prime.zeng@hisilicon.com> User-Agent: Mutt/1.9.4 (2018-02-28) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Feb 28, 2020 at 04:35:45PM +0800, Zeng Tao wrote: > Currently there are only 10 bytes to store the cpu-topology info. > That is: > snprintf(buffer, 10, "cluster%d",i); > snprintf(buffer, 10, "thread%d",i); > snprintf(buffer, 10, "core%d",i); > > In the boundary test, if the cluster number exceeds 100, there will be a I don't understand you mention of 100 in particular above. I can see issue if there are cluster with more than 2-digit id. Though highly unlikely for now, but I don't have objection to the patch. -- Regards, Sudeep