From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ian Campbell Subject: Re: [PATCH] x86/sysctl: Don't clobber memory if NCAPINTS > ARRAY_SIZE(pi->hw_cap) Date: Thu, 17 Sep 2015 13:00:03 +0100 Message-ID: <1442491203.18856.186.camel@citrix.com> References: <1442394105-20056-1-git-send-email-andrew.cooper3@citrix.com> <20150916150102.GE20876@zion.uk.xensource.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20150916150102.GE20876@zion.uk.xensource.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Wei Liu , Andrew Cooper Cc: Jan Beulich , Xen-devel List-Id: xen-devel@lists.xenproject.org On Wed, 2015-09-16 at 16:01 +0100, Wei Liu wrote: > On Wed, Sep 16, 2015 at 10:01:45AM +0100, Andrew Cooper wrote: > > There is no current problem, as both NCAPINTS and pi->hw_cap are 8 > > entries, > > but the limit should be calculated appropriately so as to avoid > > hypervisor > > stack corruption if the two do get out of sync. > > > > Signed-off-by: Andrew Cooper > > --- > > CC: Jan Beulich > > CC: Wei Liu > > > > I came across this during my cpuid levelling work. As I know I am not > > the > > only person playing with NCAPINTS at the moment, I am posting this > > ahead of > > the rest of the work. > > > > Wei: Concerning 4.6, it might we worth taking this, as it will likely > > bite > > downstream distributers who backport a 4.7 feature. > > > > Release-acked-by: Wei Liu Andy tells me that Jan is away so I have cherry-picked this (c373b912e74659f0e0898ae93e89513694cfd94e) to staging-4.6 at his request. Ian.