From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: [PATCH] kvm: fix poison overwritten caused by using wrong xstate size Date: Sun, 15 Aug 2010 14:08:04 +0300 Message-ID: <4C67CA94.60501@redhat.com> References: <1281683951-19814-1-git-send-email-dfeng@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: x86@kernel.org, kvm@vger.kernel.org, linux-kernel@vger.kernel.org, Thomas Gleixner , Ingo Molnar , "H. Peter Anvin" , Suresh Siddha , Brian Gerst , Robert Richter , Sheng Yang , Marcelo Tosatti , Gleb Natapov , Jan Kiszka To: Xiaotian Feng Return-path: In-Reply-To: <1281683951-19814-1-git-send-email-dfeng@redhat.com> Sender: linux-kernel-owner@vger.kernel.org List-Id: kvm.vger.kernel.org On 08/13/2010 10:19 AM, Xiaotian Feng wrote: > fpu.state is allocated from task_xstate_cachep, the size of task_xstate_cachep > is xstate_size. xstate_size is set from cpuid instruction, which is often > smaller than sizeof(struct xsave_struct). kvm is using sizeof(struct xsave_struct) > to fill in/out fpu.state.xsave, as what we allocated for fpu.state is > xstate_size, kernel will write out of memory and caused poison/redzone/padding > overwritten warnings. Thanks, applied. -- error compiling committee.c: too many arguments to function