From mboxrd@z Thu Jan 1 00:00:00 1970 From: Dan Carpenter Subject: Re: [patch RFC] kvm, cpuid: silence a buffer overflow warning Date: Thu, 20 Feb 2014 16:23:16 +0300 Message-ID: <20140220132316.GA26776@mwanda> References: <20140220123419.GA10110@elgon.mountain> <5305FE1E.6060902@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Gleb Natapov , Thomas Gleixner , Ingo Molnar , "H. Peter Anvin" , x86@kernel.org, kvm@vger.kernel.org, kernel-janitors@vger.kernel.org To: Paolo Bonzini Return-path: Received: from userp1040.oracle.com ([156.151.31.81]:21535 "EHLO userp1040.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753584AbaBTNXk (ORCPT ); Thu, 20 Feb 2014 08:23:40 -0500 Content-Disposition: inline In-Reply-To: <5305FE1E.6060902@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: On Thu, Feb 20, 2014 at 02:07:42PM +0100, Paolo Bonzini wrote: > Il 20/02/2014 13:34, Dan Carpenter ha scritto: > > This seems like a harmless off by one overflow if "i" is the last > > element in the vcpu->arch.cpuid_entries[] array. > > > > Signed-off-by: Dan Carpenter > > --- > > Not tested. I always wonder if it's worth fixing these or if it's worth > > reporting them? Either of those seem like a lot of work for something > > harmless. > > Could it oops if cpuid_nent is INT_MAX? cpuid_nent is capped at KVM_MAX_CPUID_ENTRIES (80). regards, dan carpenter