Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp733426imm; Thu, 13 Sep 2018 07:00:43 -0700 (PDT) X-Google-Smtp-Source: ANB0VdYJa910RRSZ4sA45NU+i9338jD7wObTOilN+Oq9Zo2KYxlX4ZvaS7xmOz4ghElSdoNyFBw1 X-Received: by 2002:a17:902:aa83:: with SMTP id d3-v6mr7422555plr.242.1536847243160; Thu, 13 Sep 2018 07:00:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536847243; cv=none; d=google.com; s=arc-20160816; b=I0WHwqjagdm0FNTCFZPVBO41hOgHWVXBGLkL0SeGavxMzkfyOlfabPbtTe50nZGuhG SKfrstg9334MU8B4hOFpWiWWmGo22paI90YC9D8MGFVopcrfhodN7qdJeFtzBqthoOwp XN2hlNemhgFKyPI7YdHUNSkh0OE0NDVT/fCKoAA/nUyiuv2hLYbOuaF0/vuOeqSSFzN3 LgG3PcShbW5xHBj528wZPoUBH2GaFec1E5sfxHb+VfcVQgEe+7S9NV4BrdshjNxA6RSh qBfS1eUTiHjXXo3MtKWey0VciRNRILebcrDbugT0FkaGv4fRdQuQTAOeNjQymehYrM0e GQ+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:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from; bh=Xqsh8jlFUoXWLd7BqPL/1c43XS1zyoIuUzfdeiN5nQg=; b=gDcvJIuXRtsZwdC9lbxIw9ZIVT+XOliCT/P70ZZPT2Rh/w5JdnF1/x2G6oPxkdS8j0 PFIFhcwx6rS3BTvuvut1Wupq9k584O3ST1zyPcZnXotsfEx5af50YCQibtn4JxemkoB7 Kv1V0QET2wrJjN4cDCf4ZVhFHnqE+el6m1lYCPaSL8UzrjTmD24ZUhGu3/E/sC35lWzv l1Apm0nMLGux843jQ47u2xWjJ75mTU311f7TQTF/O3V/YQXzG1KfbywQ1JBA2qsSEAWb egi+YS8Tmczkm237IRy/Vee85AS5Hf1RByKIUdh/hkD8JVWVQMxg9FgzjOiRtjHDiqDJ /g1g== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 81-v6si4219998pgd.57.2018.09.13.07.00.27; Thu, 13 Sep 2018 07:00:43 -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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731793AbeIMTJ5 (ORCPT + 99 others); Thu, 13 Sep 2018 15:09:57 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:34928 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729047AbeIMTJ5 (ORCPT ); Thu, 13 Sep 2018 15:09:57 -0400 Received: from localhost (ip-213-127-77-73.ip.prioritytelecom.net [213.127.77.73]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id C5464D15; Thu, 13 Sep 2018 14:00:19 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Jim Mattson , David Hildenbrand , Paolo Bonzini , Sasha Levin Subject: [PATCH 4.18 131/197] kvm: nVMX: Fix fault vector for VMX operation at CPL > 0 Date: Thu, 13 Sep 2018 15:31:20 +0200 Message-Id: <20180913131846.798471542@linuxfoundation.org> X-Mailer: git-send-email 2.19.0 In-Reply-To: <20180913131841.568116777@linuxfoundation.org> References: <20180913131841.568116777@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.18-stable review patch. If anyone has any objections, please let me know. ------------------ From: Jim Mattson [ Upstream commit 36090bf43a6b835a42f515cb515ff6fa293a25fe ] The fault that should be raised for a privilege level violation is #GP rather than #UD. Fixes: 727ba748e110b4 ("kvm: nVMX: Enforce cpl=0 for VMX instructions") Signed-off-by: Jim Mattson Reviewed-by: David Hildenbrand Signed-off-by: Paolo Bonzini Signed-off-by: Sasha Levin Signed-off-by: Greg Kroah-Hartman --- arch/x86/kvm/vmx.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) --- a/arch/x86/kvm/vmx.c +++ b/arch/x86/kvm/vmx.c @@ -8123,7 +8123,7 @@ static int handle_vmon(struct kvm_vcpu * /* CPL=0 must be checked manually. */ if (vmx_get_cpl(vcpu)) { - kvm_queue_exception(vcpu, UD_VECTOR); + kvm_inject_gp(vcpu, 0); return 1; } @@ -8187,7 +8187,7 @@ static int handle_vmon(struct kvm_vcpu * static int nested_vmx_check_permission(struct kvm_vcpu *vcpu) { if (vmx_get_cpl(vcpu)) { - kvm_queue_exception(vcpu, UD_VECTOR); + kvm_inject_gp(vcpu, 0); return 0; }