RE: [Revised PATCH v2] hv: kvp: Avoid reading past allocated blocks from KVP file

2017-11-08 Thread KY Srinivasan


> -Original Message-
> From: Haiyang Zhang
> Sent: Wednesday, November 8, 2017 6:22 AM
> To: Long Li <lon...@microsoft.com>; KY Srinivasan <k...@microsoft.com>;
> Stephen Hemminger <sthem...@microsoft.com>;
> de...@linuxdriverproject.org; linux-ker...@vger.kernel.org
> Cc: Paul Meyer <paul.me...@microsoft.com>; Long Li
> <lon...@microsoft.com>
> Subject: RE: [Revised PATCH v2] hv: kvp: Avoid reading past allocated blocks
> from KVP file
> 
> 
> 
> > -Original Message-
> > From: Long Li [mailto:lon...@exchange.microsoft.com]
> > Sent: Wednesday, November 1, 2017 2:45 PM
> > To: KY Srinivasan <k...@microsoft.com>; Haiyang Zhang
> > <haiya...@microsoft.com>; Stephen Hemminger
> > <sthem...@microsoft.com>; de...@linuxdriverproject.org; linux-
> > ker...@vger.kernel.org
> > Cc: Paul Meyer <paul.me...@microsoft.com>; Long Li
> > <lon...@microsoft.com>
> > Subject: [Revised PATCH v2] hv: kvp: Avoid reading past allocated blocks
> > from KVP file
> >
> > [This sender failed our fraud detection checks and may not be who they
> > appear to be. Learn about spoofing at http://aka.ms/LearnAboutSpoofing]
> >
> > From: Paul Meyer <paul.me...@microsoft.com>
> >
> > 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).
> >
> > Fix this by reading the correct number of KVP records from file each time.
> >
> > Changes since v1:
> > 1. Properly wrapped comment texts.
> > 2. Added the 2nd Signed-off-by.
> >
> > Signed-off-by: Paul Meyer <paul.me...@microsoft.com>
> > Signed-off-by: Long Li <lon...@microsoft.com>
> 
> Reviewed-by: Haiyang Zhang <haiya...@microsoft.com>

I will take this patch.

K. Y
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


RE: [Revised PATCH v2] hv: kvp: Avoid reading past allocated blocks from KVP file

2017-11-08 Thread Haiyang Zhang


> -Original Message-
> From: Long Li [mailto:lon...@exchange.microsoft.com]
> Sent: Wednesday, November 1, 2017 2:45 PM
> To: KY Srinivasan ; Haiyang Zhang
> ; Stephen Hemminger
> ; de...@linuxdriverproject.org; linux-
> ker...@vger.kernel.org
> Cc: Paul Meyer ; Long Li
> 
> Subject: [Revised PATCH v2] hv: kvp: Avoid reading past allocated blocks
> from KVP file
> 
> [This sender failed our fraud detection checks and may not be who they
> appear to be. Learn about spoofing at http://aka.ms/LearnAboutSpoofing]
> 
> 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).
> 
> Fix this by reading the correct number of KVP records from file each time.
> 
> Changes since v1:
> 1. Properly wrapped comment texts.
> 2. Added the 2nd Signed-off-by.
> 
> Signed-off-by: Paul Meyer 
> Signed-off-by: Long Li 

Reviewed-by: Haiyang Zhang 
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel