From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id DC9B0C10F14 for ; Thu, 3 Oct 2019 08:01:20 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id AEDEC222C4 for ; Thu, 3 Oct 2019 08:01:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1570089680; bh=8qwbD3Rc8wjOt7HVzzBq0l7wJsSN/oRXUsM14R/2wjo=; h=Subject:To:Cc:From:Date:List-ID:From; b=eDFHLggUlcBCob4b1L/sd1HFCUKmADziggKUUQBtSgzpc+9uvODIiWxB8c1iWgb5r gAyx2bi0yxG2hBCk2WeiLmoBIgebNlFVeZtG1qwQbcyLbESS+X5zBElF0KobYV5Plq K/LjL6dYKNIKvTeNB3nB4pbmrp99AbcIKcG8XmfQ= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728102AbfJCIBU (ORCPT ); Thu, 3 Oct 2019 04:01:20 -0400 Received: from out4-smtp.messagingengine.com ([66.111.4.28]:41599 "EHLO out4-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727831AbfJCIBU (ORCPT ); Thu, 3 Oct 2019 04:01:20 -0400 Received: from compute6.internal (compute6.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id 1B68421E97; Thu, 3 Oct 2019 04:01:19 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute6.internal (MEProxy); Thu, 03 Oct 2019 04:01:19 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:message-id:mime-version:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm3; bh=l6ea8H VjsUCAuhoIkjQO1IMVmcctaaaqXnUbh178Tug=; b=Y3kE3uSUOiQo4QU3KzcVPD QX9NSvAs8ugVj0uWKwA4yFZUwQ6ugkb3G/URiSD4WePNC1pjpErwZyRlKhWgoRp2 ZXEZueAfG7WEY8gjcFRLFqUb/8vAI1wFkGfNfeUvL82lTnWbgznEL98UYlbf1OJh C0YEqxXu5NnSK9sHgqrW9XQw9As3C51nOofNLV4focXVrDkzewTUL+d9L8ZgyFTZ Au0xMb9AIqpADzLHvcgq6ZejzFd6Nn0/hbx2/NmaPS8Ecn4C+I5Na8WFwwbwDIUC iV+PtZT4SVRu0qJHBN75WvIEV58rXy4/0WMaAZJJO5ab5veZp/cFnF181EVrHHFA == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedufedrgeejgdduvdehucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpefuvffhfffkgggtgfesthekredttd dtlfenucfhrhhomhepoehgrhgvghhkhheslhhinhhugihfohhunhgurghtihhonhdrohhr gheqnecukfhppeekfedrkeeirdekledruddtjeenucfrrghrrghmpehmrghilhhfrhhomh epghhrvghgsehkrhhorghhrdgtohhmnecuvehluhhsthgvrhfuihiivgeptd X-ME-Proxy: Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) by mail.messagingengine.com (Postfix) with ESMTPA id 5A16780061; Thu, 3 Oct 2019 04:01:18 -0400 (EDT) Subject: FAILED: patch "[PATCH] x86: KVM: svm: Fix a check in nested_svm_vmrun()" failed to apply to 5.3-stable tree To: dan.carpenter@oracle.com, pbonzini@redhat.com, sean.j.christopherson@intel.com, vkuznets@redhat.com Cc: From: Date: Thu, 03 Oct 2019 10:01:16 +0200 Message-ID: <1570089676108127@kroah.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ANSI_X3.4-1968 Content-Transfer-Encoding: 8bit Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org The patch below does not apply to the 5.3-stable tree. If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to . thanks, greg k-h ------------------ original commit in Linus's tree ------------------ >From a061985b81a20248da60589d01375ebe9bec4dfc Mon Sep 17 00:00:00 2001 From: Dan Carpenter Date: Tue, 27 Aug 2019 12:38:52 +0300 Subject: [PATCH] x86: KVM: svm: Fix a check in nested_svm_vmrun() We refactored this code a bit and accidentally deleted the "-" character from "-EINVAL". The kvm_vcpu_map() function never returns positive EINVAL. Fixes: c8e16b78c614 ("x86: KVM: svm: eliminate hardcoded RIP advancement from vmrun_interception()") Cc: stable@vger.kernel.org Signed-off-by: Dan Carpenter Reviewed-by: Vitaly Kuznetsov Reviewed-by: Sean Christopherson Signed-off-by: Paolo Bonzini diff --git a/arch/x86/kvm/svm.c b/arch/x86/kvm/svm.c index fdeaf8f44949..2854aafc489e 100644 --- a/arch/x86/kvm/svm.c +++ b/arch/x86/kvm/svm.c @@ -3598,7 +3598,7 @@ static int nested_svm_vmrun(struct vcpu_svm *svm) vmcb_gpa = svm->vmcb->save.rax; ret = kvm_vcpu_map(&svm->vcpu, gpa_to_gfn(vmcb_gpa), &map); - if (ret == EINVAL) { + if (ret == -EINVAL) { kvm_inject_gp(&svm->vcpu, 0); return 1; } else if (ret) {