From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753797AbdJaUBZ (ORCPT ); Tue, 31 Oct 2017 16:01:25 -0400 Received: from mail-sn1nam01on0115.outbound.protection.outlook.com ([104.47.32.115]:33984 "EHLO NAM01-SN1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752023AbdJaUBX (ORCPT ); Tue, 31 Oct 2017 16:01:23 -0400 From: Long Li To: Greg KH CC: KY Srinivasan , Haiyang Zhang , Stephen Hemminger , "devel@linuxdriverproject.org" , "linux-kernel@vger.kernel.org" , Paul Meyer Subject: RE: [PATCH] hv: kvp: Avoid reading past allocated blocks from KVP file Thread-Topic: [PATCH] hv: kvp: Avoid reading past allocated blocks from KVP file Thread-Index: AQHTUdxRU3V7KfJsHEO49vEI4WyFLqL9pLwAgACdunCAABqyAIAABPzw Date: Tue, 31 Oct 2017 20:01:18 +0000 Message-ID: References: <20171031000803.11571-1-longli@exchange.microsoft.com> <20171031084248.GA11479@kroah.com> <20171031194252.GA21223@kroah.com> In-Reply-To: <20171031194252.GA21223@kroah.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [131.107.160.166] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1;MWHPR21MB0176;6:ZCnQJt1Aj3tdIuhhjwqzfsOb8cz+5O48Bsb+gbwEAoL5g/OTHlmoc2rWHrhWihFB1PsMdFunqileKGri/aIAActkZECEfY4b5Ssc3XNL9RQkI/YuxTGglMdQ9/sCdVFf9Cw+r3BTluftkVoUpChs3geXh8rFvQhs0XooktluUs+WovvGcTCa9gAm6lPrUhgaBZuGMcCiXETpCyNhe7KZLpzXa6k+PXs7Qbk91O4PiwmnOdwJPLrrtOhdALCvO81X7jrGmX0pCDcuEJdtvVwYiv6fXlz7scokZODKlPqLveW9IRKHQ1qn/f8YHRo9x8e/SkIhBineHR1O4scQ+NqSGcrjPeCSCtmGHGPYVvvX/fw=;5:eIT5CmNYxW4zkDa01q2Zr+e5/Wb8S5n5zvHBN1pj8n0o5M+doVJyRz/b5BoJ5B+FmTiY/U1ptjSrvvPN9Ccq9vSXUEBCYXly+4v0HXxVs1kG/c2Y2pYT33oS+iJhjwn4pE8cuKjNTG7fpmU4y8DCtzyrfPlBullMr6XwsynaqH8=;24:s3LUhr6TR4IYcYbm7W0pXlL3nriYjZ8w9VOJc/1uhopHxndMEzRkRWOrXy4Tn0aBhH9zK8WBUu/6z6NCHkYito5aOitRejhNOP9Qylc6M4I=;7:ffrTMz1j6R3k70wFryE/bOAi4Lc2Yi/Mn/fUW13IAA8gMbYBHeFmkWsDiaXbWsuEb04GuAOsNPMEEmDwZP08cBUSBSPFDCqRlehxn9mcSxVJt0k5/zK/ni5S6bfZVF6oh+cP5grVycprL8Xk4nHN1c7V4QZQNKmfSGLzorw6AiKPR7ClEcp4FgF5xMgYcuUmBGCJNcwqQDN+kLX5/5cn4TNPlju6Sre327LbK6TvbXeVZgnS0XZRUXwFiPuknntV x-ms-exchange-antispam-srfa-diagnostics: SSOS;SSOR; x-o365eop-header: O365_EOP: Allow for Unauthenticated Relay x-o365ent-eop-header: Message processed by - O365_ENT: Allow from ranges (Engineering ONLY) x-forefront-antispam-report: SFV:SKI;SCL:-1;SFV:NSPM;SFS:(10019020)(6009001)(346002)(376002)(39860400002)(47760400005)(199003)(24454002)(54534003)(189002)(7736002)(107886003)(53936002)(2950100002)(6916009)(305945005)(7696004)(33656002)(93886005)(22452003)(316002)(4326008)(101416001)(76176999)(54356999)(2900100001)(68736007)(50986999)(10090500001)(8990500004)(97736004)(74316002)(6246003)(53546010)(14454004)(77096006)(229853002)(10290500003)(54906003)(25786009)(6436002)(6506006)(2906002)(9686003)(5660300001)(102836003)(8676002)(86612001)(81156014)(86362001)(81166006)(99286003)(3846002)(6116002)(8936002)(106356001)(3280700002)(66066001)(3660700001)(105586002)(478600001)(189998001)(55016002);DIR:OUT;SFP:1102;SCL:1;SRVR:MWHPR21MB0176;H:MWHPR21MB0190.namprd21.prod.outlook.com;FPR:;SPF:None;PTR:InfoNoRecords;A:1;MX:1;LANG:en; x-ms-office365-filtering-correlation-id: dead86e7-0ac3-4d37-b950-08d5209a269c x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:(22001)(48565401081)(4534020)(4602075)(2017052603238);SRVR:MWHPR21MB0176; x-ms-traffictypediagnostic: MWHPR21MB0176: x-exchange-antispam-report-test: UriScan:(89211679590171)(9452136761055); x-microsoft-antispam-prvs: x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(61425038)(6040450)(2401047)(5005006)(8121501046)(10201501046)(3231020)(100000703101)(100105400095)(93006095)(93001095)(3002001)(6055026)(61426038)(61427038)(6041248)(20161123560025)(20161123562025)(20161123564025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123558100)(20161123555025)(6072148)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095);SRVR:MWHPR21MB0176;BCL:0;PCL:0;RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095);SRVR:MWHPR21MB0176; x-forefront-prvs: 04772EA191 authentication-results: spf=none (sender IP is ) smtp.mailfrom=longli@microsoft.com; spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 X-OriginatorOrg: microsoft.com X-MS-Exchange-CrossTenant-Network-Message-Id: dead86e7-0ac3-4d37-b950-08d5209a269c X-MS-Exchange-CrossTenant-originalarrivaltime: 31 Oct 2017 20:01:18.6557 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 72f988bf-86f1-41af-91ab-2d7cd011db47 X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR21MB0176 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by nfs id v9VK1Uv6031267 > On Tue, Oct 31, 2017 at 06:10:00PM +0000, Long Li wrote: > > > From: Greg KH [mailto:gregkh@linuxfoundation.org] > > > Sent: Tuesday, October 31, 2017 1:43 AM > > > To: Long Li > > > Cc: KY Srinivasan ; Haiyang Zhang > > > ; Stephen Hemminger > > > ; devel@linuxdriverproject.org; > > > linux-kernel@vger.kernel.org; Paul Meyer > > > Subject: Re: [PATCH] hv: kvp: Avoid reading past allocated blocks > > > from KVP file > > > > > > On Mon, Oct 30, 2017 at 05:08:03PM -0700, Long Li wrote: > > > > From: Paul Meyer > > > > > > > > While reading in more than one block (50) of KVP records, the > > > > allocation goes per block, but the reads used the total number of > > > > allocated records (without resetting the pointer/stream). This > > > > causes the records buffer to overrun when the refresh reads more > > > > than one block over the previous capacity (e.g. reading more than > > > > 100 KVP records > > > whereas the in-memory database was empty before). > > > > > > Please wrap changelogs at 72 columns like your editor asked you to... > > > > I will fix it. > > > > > > > > > > > > > Fix this by reading the correct number of KVP records from file each time. > > > > > > > > Signed-off-by: Paul Meyer > > > > --- > > > > > > Why is your name not also on the signed-off-by chain if you are > > > forwarding on a patch from someone else? > > > > > > Is this patch also needed on stable kernels? > > > > I'm sending on behalf of Paul Meyer. I will add a "Reviewed-by:" tag. > > Sending on behalf means you should add your signed-off-by, as it is going > through you. Thanks. I will re-send the patch. > > thanks, > > greg k-h