Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp3388736ybi; Mon, 29 Jul 2019 05:49:21 -0700 (PDT) X-Google-Smtp-Source: APXvYqxZYaRgJmOAm7SPuIUP/Nt6z3nBlSpmzyvcq83hKNkWAzQ5Go/s9emoJ0z0OXeF7PD4F/32 X-Received: by 2002:a17:90a:3401:: with SMTP id o1mr111270939pjb.7.1564404561640; Mon, 29 Jul 2019 05:49:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564404561; cv=none; d=google.com; s=arc-20160816; b=a773fdubJOSyESB5MNX1B5gTDLWnP9kXIRiI3HvxWPkj7HRIGn7sfB3S8EkQYET+pK HHNUfUfi0YoHfhayjPBtOc40Uvv1USU1zcO8c8NrWSSp2PwURMIjFL6MilJgyECZJGx2 gU9nIUBA16cX+FP+xMw8yHj57QcAH0HJQGBdZNSpe2byJ8ZFlTPQbIKPRYrwlZ19DuWA 99RHtTxZ8Ob6R851A1KInNNsDMml4PwkwI4z33v27YkrjWlUd59RLL0tJJPKPYJ+qraB oCLnWOdnvaCEkp8iPDlfWlfm0fJ2mJ4kQlP58ETzGG4X2QGthRplSn0fxg4MqwDouBJw qa/w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:openpgp:from:references:cc:to:subject; bh=zV+bTIgChlMbStRhEz4HmI17F1bLOP/P0h9cutKjnuk=; b=SXeMBo/hs4R2iLDXwpMIK47WxONd6fxEWONUP6LrKXhFIs5fecSfgx3rZk7+9gELBn emim5A0r3WZ2wmZhapYq7D024JIAktHgP5e3modL8Re+FRprOitDKyhDjTJk3gdFD4LC fCQCFN2duyjlNXETlaXrZkhcd/GE2Sw4nEuXTubZ3siGjzfsIlgkrcpEoM8O6R4OL2nE 30nOjX6exsse8itC6wVzkD1Bz4f8Yu3PFscMYpSg5+FwGr+LbduL1Md2UG85o8YNzg0c lnT9gHImkv+1DzZfXtXzZ7kzQiIGlfrpeJzyYPvsNk7rufYIkEiSxoq1pvdgUWWqMV2T Hvwg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w17si29465069pfj.69.2019.07.29.05.49.06; Mon, 29 Jul 2019 05:49:21 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726890AbfG2JK1 (ORCPT + 99 others); Mon, 29 Jul 2019 05:10:27 -0400 Received: from mail-wr1-f68.google.com ([209.85.221.68]:43687 "EHLO mail-wr1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725917AbfG2JK0 (ORCPT ); Mon, 29 Jul 2019 05:10:26 -0400 Received: by mail-wr1-f68.google.com with SMTP id p13so60913370wru.10 for ; Mon, 29 Jul 2019 02:10:25 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:openpgp:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=zV+bTIgChlMbStRhEz4HmI17F1bLOP/P0h9cutKjnuk=; b=IlPDEYH6L29CIojsnYJeK7f5HgO+vJAGtT7fsNBJEyVh9uu6JPeO9q4/hNhtQZix4U K3cvzn0vZDh7rsDlun7paa+Hj8Z2BoHRfV0aEVYoLySCI2G3NOjKAxlGY3Rs+aCs1Nrx vUBSlyKWsNeLsD1uojr2MI5hw9+/77uIs2t3hSvioqL+IQK2uA/g8WFac9oXGYBS79tR bbHvL/Em/S+kmS4BZCpiyO5SyGL+2WS2T8OH9ARU6vvicrEbpLrBUnbReE4CQ0Sra3r1 tTnIRRqY3Dq+85lZ9DcOSJSFNwzogerNH++aMCfOYPlwoZjrKDlKqtWScHwm28JAABqo OtoQ== X-Gm-Message-State: APjAAAUaqYs321B9TaYA4Xp8BIVchMQQoGJkDUias5lAe2Ok6nqD/Tvq wA4wbylKLaVgor7YcdtRe6yV1A== X-Received: by 2002:a5d:4e8a:: with SMTP id e10mr38159080wru.26.1564391424671; Mon, 29 Jul 2019 02:10:24 -0700 (PDT) Received: from [192.168.10.150] ([93.56.166.5]) by smtp.gmail.com with ESMTPSA id e6sm57983191wrw.23.2019.07.29.02.10.23 (version=TLS1_3 cipher=AEAD-AES128-GCM-SHA256 bits=128/128); Mon, 29 Jul 2019 02:10:23 -0700 (PDT) Subject: Re: [PATCH stable-4.19 1/2] KVM: nVMX: do not use dangling shadow VMCS after guest reset To: Jack Wang , Vitaly Kuznetsov Cc: stable@vger.kernel.org, kvm@vger.kernel.org, linux-kernel@vger.kernel.org, =?UTF-8?B?UmFkaW0gS3LEjW3DocWZ?= References: <20190725104645.30642-1-vkuznets@redhat.com> <20190725104645.30642-2-vkuznets@redhat.com> From: Paolo Bonzini Openpgp: preference=signencrypt Message-ID: <2ea5d588-8573-6653-b848-0b06d1f98310@redhat.com> Date: Mon, 29 Jul 2019 11:10:26 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 29/07/19 10:58, Jack Wang wrote: > Vitaly Kuznetsov 于2019年7月25日周四 下午3:29写道: >> >> From: Paolo Bonzini >> >> [ Upstream commit 88dddc11a8d6b09201b4db9d255b3394d9bc9e57 ] >> >> If a KVM guest is reset while running a nested guest, free_nested will >> disable the shadow VMCS execution control in the vmcs01. However, >> on the next KVM_RUN vmx_vcpu_run would nevertheless try to sync >> the VMCS12 to the shadow VMCS which has since been freed. >> >> This causes a vmptrld of a NULL pointer on my machime, but Jan reports >> the host to hang altogether. Let's see how much this trivial patch fixes. >> >> Reported-by: Jan Kiszka >> Cc: Liran Alon >> Cc: stable@vger.kernel.org >> Signed-off-by: Paolo Bonzini > > Hi all, > > Do we need to backport the fix also to stable 4.14? It applies > cleanly and compiles fine. The reproducer required newer kernels that support KVM_GET_NESTED_STATE and KVM_SET_NESTED_STATE, so it would be hard to test it. However, the patch itself should be safe. Paolo