From: Eduardo Habkost Subject: Re: [Qemu-devel] [PATCH 0/5] target-i386: kvm: Increase MSR entry array limits, check for array overrun Date: Sat, 23 Jan 2016 13:11:51 -0200 Message-ID: <20160123151151.GE4218@thinpad.lan.raisama.net> References: <1450292806-30598-1-git-send-email-ehabkost@redhat.com> <5671D9D1.5050907@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Marcelo Tosatti , qemu-devel@nongnu.org, kvm@vger.kernel.org To: Paolo Bonzini Return-path: Received: from mx1.redhat.com ([209.132.183.28]:44147 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752804AbcAWPLy (ORCPT ); Sat, 23 Jan 2016 10:11:54 -0500 Content-Disposition: inline In-Reply-To: <5671D9D1.5050907@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: On Wed, Dec 16, 2015 at 10:38:25PM +0100, Paolo Bonzini wrote: > > > On 16/12/2015 20:06, Eduardo Habkost wrote: > > We are dangerously close to the array limits in kvm_put_msrs() > > and kvm_get_msrs(): with the default mcg_cap configuration, we > > can set up to 148 MSRs in kvm_put_msrs(), and if we allow mcg_cap > > to be changed, we can write up to 236 MSRs[1]. > > > > This series changes the code to allocate a buffer once per VCPU, > > increase buffer size to 4096 bytes (that can hold up to 255 MSR > > entries), and check array limits before appending new entries. > > Thanks, it's a good improvement. > > Reviewed-by: Paolo Bonzini Thanks, applied to x86 tree. -- Eduardo