Received: by 2002:a25:c205:0:0:0:0:0 with SMTP id s5csp2930190ybf; Mon, 2 Mar 2020 18:59:14 -0800 (PST) X-Google-Smtp-Source: ADFU+vuNeATMpekqkua2WSQR7X5BSmA+OxBF+LM7gxksB6mqGQSqhAvWPZIKbIvOUSukvsfzinUz X-Received: by 2002:a54:4816:: with SMTP id j22mr1084401oij.162.1583204354609; Mon, 02 Mar 2020 18:59:14 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1583204354; cv=none; d=google.com; s=arc-20160816; b=gkI4S7qMIRCz7+/BjrTEQHpCdqO4LjbZ2OTEZY7pIPv6EgSUPFwf9DpYujldwwJILT k1HXIBD6mJk7AOSd8Kv2Eg2jmpPPOCOFXj5MZJvBHT4zT6oSvg05yok5akX0DFIgdEAW ciQaydyQnYXgvdemcHJ8Hlh9TVk0uQU4W1wRw6maWMC4OJJhot9ttZ9WbieJOcTX+6B+ XjUD+YYOP7dl4aS2grlMgqwGBsblyeG+K3MDMxcN0zRLJX+nts3e/CRtWT5+j9OeFPBL CI/t4JLZVTEwBGkAfCe0fPUdIGuiqPcgsXQhVH7eRx20YrwkeXHeX/y/yEz+ugK/LAiG lwYw== 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=z14C/6ZTEw4eGuAVHssnDP9C7AmwK9OTEqIkkjjktVI=; b=Om73ECiFgrxXCo3i0CKbmUShZXkpeXU0yLvK2LxM6XolaKGc6hdoo+2uS+Gk8PedP/ QKeJdTHPcvg2LxhGG4jkMv4HiCQfVJSKYk4Zbv85D9PhxbuP2cLLATr7bmOKGURaEVx6 U15FWydjk3wU2oC2TLbJoj7bzqm02TIwwtVRDrqY/DxbQ+ZPtC15cOEyLzV7gUVjaBko tv7Rxd0qMNJXrAb/xtbrJ0qtVKOE55u5bK7vH1zDzfPeuUbPFT5m6yv/Vub0JcWggQMT bvIT6ps7GggMTT8AZMxUudmsy7UVKOvHa8JP8nDSRBiFH49IbJwPhK6zIVtiq4smTxrc cLCw== 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 n15si7700444otr.262.2020.03.02.18.59.02; Mon, 02 Mar 2020 18:59:14 -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 S1728930AbgCCC7A convert rfc822-to-8bit (ORCPT + 99 others); Mon, 2 Mar 2020 21:59:00 -0500 Received: from szxga03-in.huawei.com ([45.249.212.189]:2595 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727522AbgCCC6y (ORCPT ); Mon, 2 Mar 2020 21:58:54 -0500 Received: from DGGEMM403-HUB.china.huawei.com (unknown [172.30.72.56]) by Forcepoint Email with ESMTP id F17EE5C380FB2F4A8F10; Tue, 3 Mar 2020 10:58:51 +0800 (CST) Received: from DGGEMM526-MBX.china.huawei.com ([169.254.8.227]) by DGGEMM403-HUB.china.huawei.com ([10.3.20.211]) with mapi id 14.03.0439.000; Tue, 3 Mar 2020 10:58:42 +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: AQHV7hK2ERrnxNGKY0yF2wIuAuh2Hqgv5MEAgAGAuLCAAz7DgIABi9aQ Date: Tue, 3 Mar 2020 02:58:41 +0000 Message-ID: <678F3D1BB717D949B966B68EAEB446ED342092EE@dggemm526-mbx.china.huawei.com> References: <1582878945-50415-1-git-send-email-prime.zeng@hisilicon.com> <20200228104034.GB26973@bogus> <678F3D1BB717D949B966B68EAEB446ED341F2AE2@DGGEMM506-MBS.china.huawei.com> <20200302111038.GA16218@e107533-lin.cambridge.arm.com> In-Reply-To: <20200302111038.GA16218@e107533-lin.cambridge.arm.com> 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: Monday, March 02, 2020 7:11 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 Sat, Feb 29, 2020 at 01:41:47AM +0000, Zengtao (B) wrote: > > > -----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? > > Yes. May be it is obvious but I prefer to word the commit message > accordingly. > Mention of 100 specifically makes at-least me think something very > specific > to 100 and not applicable for any more than 2-digit number. > Do you think I need to update the commit message and resend the patch? And I don't mind if you can help modify the commit message since both are fine for me, and it's a very trivial change. > > Here 100 is for from tester/user perspective. > > And we found this issue when test with QEMU. > > OK. > > -- > Regards, > Sudeep