All of lore.kernel.org
 help / color / mirror / Atom feed
From: KY Srinivasan <kys@microsoft.com>
To: Haiyang Zhang <haiyangz@microsoft.com>,
	Long Li <longli@microsoft.com>,
	Stephen Hemminger <sthemmin@microsoft.com>,
	"devel@linuxdriverproject.org" <devel@linuxdriverproject.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Cc: Paul Meyer <Paul.Meyer@microsoft.com>, Long Li <longli@microsoft.com>
Subject: RE: [Revised PATCH v2] hv: kvp: Avoid reading past allocated blocks from KVP file
Date: Wed, 8 Nov 2017 18:34:37 +0000	[thread overview]
Message-ID: <DM5PR21MB047624EF7037FFADCC66719BA0560@DM5PR21MB0476.namprd21.prod.outlook.com> (raw)
In-Reply-To: <CY4PR2101MB0867C3F885E41BA86EBF6339CA560@CY4PR2101MB0867.namprd21.prod.outlook.com>



> -----Original Message-----
> From: Haiyang Zhang
> Sent: Wednesday, November 8, 2017 6:22 AM
> To: Long Li <longli@microsoft.com>; KY Srinivasan <kys@microsoft.com>;
> Stephen Hemminger <sthemmin@microsoft.com>;
> devel@linuxdriverproject.org; linux-kernel@vger.kernel.org
> Cc: Paul Meyer <Paul.Meyer@microsoft.com>; Long Li
> <longli@microsoft.com>
> Subject: RE: [Revised PATCH v2] hv: kvp: Avoid reading past allocated blocks
> from KVP file
> 
> 
> 
> > -----Original Message-----
> > From: Long Li [mailto:longli@exchange.microsoft.com]
> > Sent: Wednesday, November 1, 2017 2:45 PM
> > To: KY Srinivasan <kys@microsoft.com>; Haiyang Zhang
> > <haiyangz@microsoft.com>; Stephen Hemminger
> > <sthemmin@microsoft.com>; devel@linuxdriverproject.org; linux-
> > kernel@vger.kernel.org
> > Cc: Paul Meyer <Paul.Meyer@microsoft.com>; Long Li
> > <longli@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.Meyer@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.Meyer@microsoft.com>
> > Signed-off-by: Long Li <longli@microsoft.com>
> 
> Reviewed-by: Haiyang Zhang <haiyangz@microsoft.com>

I will take this patch.

K. Y

      reply	other threads:[~2017-11-08 18:34 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-01 18:45 [Revised PATCH v2] hv: kvp: Avoid reading past allocated blocks from KVP file Long Li
2017-11-08 14:21 ` Haiyang Zhang
2017-11-08 18:34   ` KY Srinivasan [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=DM5PR21MB047624EF7037FFADCC66719BA0560@DM5PR21MB0476.namprd21.prod.outlook.com \
    --to=kys@microsoft.com \
    --cc=Paul.Meyer@microsoft.com \
    --cc=devel@linuxdriverproject.org \
    --cc=haiyangz@microsoft.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=longli@microsoft.com \
    --cc=sthemmin@microsoft.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.