From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.linuxfoundation.org ([140.211.169.12]:36360 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751080AbdBXKIT (ORCPT ); Fri, 24 Feb 2017 05:08:19 -0500 Date: Fri, 24 Feb 2017 11:07:06 +0100 From: Greg KH To: Paolo Bonzini Cc: "Herongguang (Stephen)" , Chris Friesen , "Han, Huaitong" , "hangaohuai@huawei.com" , stable@vger.kernel.org, "kvm@vger.kernel.org" , "fangying1@huawei.com" , "xudong.hao@linux.intel.com" , "qemu-devel@nongnu.org" , "wangxinxin.wang@huawei.com" , "kai.huang@linux.intel.com" , "rkrcmar@redhat.com" , "guangrong.xiao@linux.intel.com" , linux-kernel@vger.kernel.org Subject: Re: [Qemu-devel] kvm bug in __rmap_clear_dirty during live migration Message-ID: <20170224100706.GA12001@kroah.com> References: <58AA51D6.6020508@huawei.com> <1487565495.3740.27.camel@intel.com> <58AD0094.90304@windriver.com> <4dd92012-626a-2d80-9adb-0be398f73eb1@redhat.com> <58AD92AE.6040502@windriver.com> <6c5567f4-192d-aefd-90e4-89f53479c24e@redhat.com> <58AF9921.6060201@huawei.com> <58AFFE55.20306@huawei.com> <20170224095951.GA11626@kroah.com> <044a553e-83d4-7c1b-fc93-292da7e678a4@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <044a553e-83d4-7c1b-fc93-292da7e678a4@redhat.com> Sender: stable-owner@vger.kernel.org List-ID: On Fri, Feb 24, 2017 at 11:00:32AM +0100, Paolo Bonzini wrote: > > > On 24/02/2017 10:59, Greg KH wrote: > > On Fri, Feb 24, 2017 at 05:35:17PM +0800, Herongguang (Stephen) wrote: > >> > >> > >> On 2017/2/24 10:23, Herongguang (Stephen) wrote: > >>> > >>> > >>> On 2017/2/22 22:43, Paolo Bonzini wrote: > >>>> > >>>> > >>>> On 22/02/2017 14:31, Chris Friesen wrote: > >>>>>>> > >>>>>> > >>>>>> Can you reproduce it with kernel 4.8+? I'm suspecting commmit > >>>>>> 4e59516a12a6 ("kvm: vmx: ensure VMCS is current while enabling PML", > >>>>>> 2016-07-14) to be the fix. > >>>>> > >>>>> I can't easily try with a newer kernel, the software package we're using > >>>>> has kernel patches that would have to be ported. > >>>>> > >>>>> I'm at a conference, don't really have time to set up a pair of test > >>>>> machines from scratch with a custom kernel. > >>>> > >>>> Hopefully Gaohuai and Rongguang can help with this too. > >>>> > >>>> Paolo > >>>> > >>>> . > >>>> > >>> Yes, we are looking into and testing this. > >>> > >>> I think this can result in any memory corruption, if VM1 writes its > >>> PML buffer into VM2’s VMCS (since sched_in/sched_out notifier of VM1 > >>> is not registered yet), then VM1 is destroyed (hence its PML buffer > >>> is freed back to kernel), after that, VM2 starts migration, so CPU > >>> logs VM2’s dirty GFNS into a freed memory, results in any memory corruption. > >>> > >>> As its severity, this commit (http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=4e59516a12a6ef6dcb660cb3a3f70c64bd60cfec) > >>> is eligible to back port to kernel stable. > >> > >> Hi, Greg, can you cherry pick commit 4e59516a12a6ef6dcb660cb3a3f70c64bd60cfec to 4.4-y? > > > > If the KVM maintainers say it is ok to do so, yes, I will. > > Yes, he beat me by minutes. :) Heh, ok, I'll go add it to the recently-announced 4.4.52-rc1 release. thanks, greg k-h