2017-11-08 18:35:43

by KY Srinivasan

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



> -----Original Message-----
> From: Haiyang Zhang
> Sent: Wednesday, November 8, 2017 6:22 AM
> To: Long Li <[email protected]>; KY Srinivasan <[email protected]>;
> Stephen Hemminger <[email protected]>;
> [email protected]; [email protected]
> Cc: Paul Meyer <[email protected]>; Long Li
> <[email protected]>
> Subject: RE: [Revised PATCH v2] hv: kvp: Avoid reading past allocated blocks
> from KVP file
>
>
>
> > -----Original Message-----
> > From: Long Li [mailto:[email protected]]
> > Sent: Wednesday, November 1, 2017 2:45 PM
> > To: KY Srinivasan <[email protected]>; Haiyang Zhang
> > <[email protected]>; Stephen Hemminger
> > <[email protected]>; [email protected]; linux-
> > [email protected]
> > Cc: Paul Meyer <[email protected]>; Long Li
> > <[email protected]>
> > 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 <[email protected]>
> >
> > 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 <[email protected]>
> > Signed-off-by: Long Li <[email protected]>
>
> Reviewed-by: Haiyang Zhang <[email protected]>

I will take this patch.

K. Y

From 1583508147071049126@xxx Wed Nov 08 14:24:09 +0000 2017
X-GM-THRID: 1582890557754274865
X-Gmail-Labels: Inbox,Category Forums,HistoricalUnread