Received: by 2002:a25:c205:0:0:0:0:0 with SMTP id s5csp1245425ybf; Fri, 28 Feb 2020 17:43:11 -0800 (PST) X-Google-Smtp-Source: APXvYqynPWP4x1g4NretnWLJNN5RYpN0e+ogU+8wQwB4Z+Wg5BJZ+FjwuNrEkrINSUrW8V+OPEiS X-Received: by 2002:a05:6808:a83:: with SMTP id q3mr5371122oij.0.1582940591146; Fri, 28 Feb 2020 17:43:11 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1582940591; cv=none; d=google.com; s=arc-20160816; b=DP+uNxReix4lV4WSDtRcuDKtZ8n8iQsTPdqLv0nHeACKuRp9hAe28Q4fJyWNmXVpFS cV86y8YhvjuHvEbP4eWTN2Vcm3L+yF1iiM7QtHOFtKSuHyJZhf3A9rkX7JGgL7TtbIHn q41nZahZ7Do4wuMoUWByMcI3ELjeorggd6CvWB4FPbk8MALCa8z24gziuwhNBL7RlVhH QnBqWpbK/0rkYO9SErHyt/kf6M0v9yI5LKBNUwtNA9s+4+ONjJVyP8xtlHEBxRKhl01c kjk97FBBmGJVIXi48RWe6T4B/Ktrf/KyduLy37RCsfzgV9G/P3MyMKhG/UcMlU0AcinW EVUw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :content-language:accept-language:in-reply-to:references:message-id :date:thread-index:thread-topic:subject:cc:to:from; bh=H98Uf8jTZhfh2UZNWwtTVJV5ZrbqfTsyJsAIsSuH9xg=; b=rTFtMwlmu5Obn946nFROjToxLchnyuvLWnERoUGqezsUoLO0em3vq+zhkZ3NBZ5Il+ 7PqzVKqzSBOEbgI8wGr8EjcazF6LIg5dqX/MSfxt6XyI4ZCcCZeGa1kuG3d5mGJOx6UL XLdum2f8pYSjBQaQNu8vTgInGI4ajoQJQ236r+bZ9wRnDxPE5iFDI/MWs/PNd2rybwLu h99pMb1reyqIjXsyJSdPUxfrABEvJU9r5hRRZLalDbvCc5ro8M+NtRjxDS5hrAcRli90 Cy4dNVnPxC5iLktDHbSgiEtGLvTC6EGugcmf4EweQF396pZPo2PJZqLhheMi4PWxDWy/ R9zw== 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 u205si1373362oie.125.2020.02.28.17.42.49; Fri, 28 Feb 2020 17:43:11 -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 S1726682AbgB2BmA convert rfc822-to-8bit (ORCPT + 99 others); Fri, 28 Feb 2020 20:42:00 -0500 Received: from szxga02-in.huawei.com ([45.249.212.188]:3029 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726418AbgB2BmA (ORCPT ); Fri, 28 Feb 2020 20:42:00 -0500 Received: from DGGEMM402-HUB.china.huawei.com (unknown [172.30.72.56]) by Forcepoint Email with ESMTP id 43C06AA82A6CFF55EA6F; Sat, 29 Feb 2020 09:41:57 +0800 (CST) Received: from DGGEMM506-MBS.china.huawei.com ([169.254.4.49]) by DGGEMM402-HUB.china.huawei.com ([10.3.20.210]) with mapi id 14.03.0439.000; Sat, 29 Feb 2020 09:41:48 +0800 From: "Zengtao (B)" To: Sudeep Holla CC: Linuxarm , Greg Kroah-Hartman , "Rafael J. Wysocki" , "linux-kernel@vger.kernel.org" Subject: RE: [PATCH] cpu-topology: Fix the potential data corruption Thread-Topic: [PATCH] cpu-topology: Fix the potential data corruption Thread-Index: AQHV7hK2ERrnxNGKY0yF2wIuAuh2Hqgv5MEAgAGAuLA= Date: Sat, 29 Feb 2020 01:41:47 +0000 Message-ID: <678F3D1BB717D949B966B68EAEB446ED341F2AE2@DGGEMM506-MBS.china.huawei.com> References: <1582878945-50415-1-git-send-email-prime.zeng@hisilicon.com> <20200228104034.GB26973@bogus> In-Reply-To: <20200228104034.GB26973@bogus> Accept-Language: zh-CN, en-US Content-Language: zh-CN X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.74.221.187] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 8BIT MIME-Version: 1.0 X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > -----Original Message----- > From: Sudeep Holla [mailto:sudeep.holla@arm.com] > Sent: Friday, February 28, 2020 6:41 PM > To: Zengtao (B) > Cc: Linuxarm; Greg Kroah-Hartman; Rafael J. Wysocki; > linux-kernel@vger.kernel.org; Sudeep Holla > Subject: Re: [PATCH] cpu-topology: Fix the potential data corruption > > 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. > The same meaning, more than 2-digit id equals to more than 100, right? Here 100 is for from tester/user perspective. And we found this issue when test with QEMU. > -- > Regards, > Sudeep