Message ID | 20221103135736.42295-10-mlevitsk@redhat.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp550492wru; Thu, 3 Nov 2022 07:02:49 -0700 (PDT) X-Google-Smtp-Source: AMsMyM63eiSrGnQEL5KTAxtzvl5as6sjRlo23vPQeos9eEKHSXJPvgL1WiCaGP8E/ePo3+r6t3+v X-Received: by 2002:a17:90b:254c:b0:20a:8a92:ea5b with SMTP id nw12-20020a17090b254c00b0020a8a92ea5bmr31367349pjb.81.1667484168937; Thu, 03 Nov 2022 07:02:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1667484168; cv=none; d=google.com; s=arc-20160816; b=ez3H5R86Zf9le0befvPtxTRLjAApfnLk/2oV3WGYU7g17vFFVnX1iGBFSBbAMmxL5s llpaPv8l7NpzLwRbJN+gAdPLwqs7nRJGJDD/O/HDu+bQEzmadDvghmHd9yj5SMAV1NDf nOQOowWtelvg/7rbwKNOu9c4Xyk9HEO4V/QSihNMbfr143JNvt7mKpWvpHmS/cTOLrK3 7sHdOzRTiK4iT3zPNB3d4AqjpKSxyNuLcpBY71xtJjUWeCgjo3IS5hjuMUrsm4liU0qM hlEmL3F/ybkyGjljjdY5z0uZM4gkGqIBKd/VY5/K5OjUuSg3k31VFgxsyApCtXdvZbvf a6fg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=FT9aNXqnuKXbR3StefJr7RNDWsInEBudWILSzsOk6wI=; b=ayjO1UsP3Qrg363JC9rPxVtLMkydqLODJt90+Kh0Cf6owe1HyE4UHBvnSOK619Ikfe HVG3rYFNa4AqLBF5zhg2nGjC3KIN9Z3S2ZZzxPo3VWSzKXa7Em6cCBy03Y7JtH8xtiEx CfDLnY09L5Bk0xvpxQr3flC6tbqoAIDIY5UGFODpFZpHqM+e/vWEBEKWiuLwYKWzp4mq bD9/17seTFjG9Ikct+oy/jN8CfLoiSPS4brClpRgOotKe7ioJHUQi/0CsakNNa6Z3hx8 aJB98SgJ+AF1AwRIUOrBVFJITn2zlWsDPVeyTBiJrFPFQoM5O7/u7VOByyoPzJzZkAjb A9Kw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=LJNLoV4I; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id s73-20020a63774c000000b00460b572d264si1100566pgc.579.2022.11.03.07.02.34; Thu, 03 Nov 2022 07:02:48 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=LJNLoV4I; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231726AbiKCOAQ (ORCPT <rfc822;yves.mi.zy@gmail.com> + 99 others); Thu, 3 Nov 2022 10:00:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52476 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231818AbiKCN7b (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Thu, 3 Nov 2022 09:59:31 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6AFA0DCA for <linux-kernel@vger.kernel.org>; Thu, 3 Nov 2022 06:58:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1667483901; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=FT9aNXqnuKXbR3StefJr7RNDWsInEBudWILSzsOk6wI=; b=LJNLoV4IPoIND3RY+cVzMcZrujo59nUjZqG22K14+YSCHMZtYpvhmXtTYqq93ob2tG7rGk h5NWCN5NxuwoYS/TXsogWHw1TMSNwivcf0Q/eAXPcigqyD3v8J33QMVZyoZUv6ycFS5FZk bdCWqCsNII9HltvwfnvOeWF5/9JJdk8= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-381-1eUDsmvBMwWsz4l23RjwKw-1; Thu, 03 Nov 2022 09:58:16 -0400 X-MC-Unique: 1eUDsmvBMwWsz4l23RjwKw-1 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.rdu2.redhat.com [10.11.54.1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 9F115101A528; Thu, 3 Nov 2022 13:58:15 +0000 (UTC) Received: from amdlaptop.tlv.redhat.com (dhcp-4-238.tlv.redhat.com [10.35.4.238]) by smtp.corp.redhat.com (Postfix) with ESMTP id 352B740C83AD; Thu, 3 Nov 2022 13:58:12 +0000 (UTC) From: Maxim Levitsky <mlevitsk@redhat.com> To: kvm@vger.kernel.org Cc: Paolo Bonzini <pbonzini@redhat.com>, "H. Peter Anvin" <hpa@zytor.com>, Shuah Khan <shuah@kernel.org>, Yang Zhong <yang.zhong@intel.com>, Wei Wang <wei.w.wang@intel.com>, Colton Lewis <coltonlewis@google.com>, Sean Christopherson <seanjc@google.com>, Jim Mattson <jmattson@google.com>, Chenyi Qiang <chenyi.qiang@intel.com>, Borislav Petkov <bp@alien8.de>, linux-kernel@vger.kernel.org, x86@kernel.org, Thomas Gleixner <tglx@linutronix.de>, Dave Hansen <dave.hansen@linux.intel.com>, Ingo Molnar <mingo@redhat.com>, David Matlack <dmatlack@google.com>, Peter Xu <peterx@redhat.com>, Maxim Levitsky <mlevitsk@redhat.com>, linux-kselftest@vger.kernel.org, stable@vger.kernel.org Subject: [PATCH 9/9] KVM: x86: remove exit_int_info warning in svm_handle_exit Date: Thu, 3 Nov 2022 15:57:36 +0200 Message-Id: <20221103135736.42295-10-mlevitsk@redhat.com> In-Reply-To: <20221103135736.42295-1-mlevitsk@redhat.com> References: <20221103135736.42295-1-mlevitsk@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 3.1 on 10.11.54.1 X-Spam-Status: No, score=-3.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_NONE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1748483880050977755?= X-GMAIL-MSGID: =?utf-8?q?1748483880050977755?= |
Series |
nSVM: Security and correctness fixes
|
|
Commit Message
Maxim Levitsky
Nov. 3, 2022, 1:57 p.m. UTC
It is valid to receive external interrupt and have broken IDT entry,
which will lead to #GP with exit_int_into that will contain the index of
the IDT entry (e.g any value).
Other exceptions can happen as well, like #NP or #SS
(if stack switch fails).
Thus this warning can be user triggred and has very little value.
Cc: stable@vger.kernel.org
Signed-off-by: Maxim Levitsky <mlevitsk@redhat.com>
---
arch/x86/kvm/svm/svm.c | 9 ---------
1 file changed, 9 deletions(-)
diff --git a/arch/x86/kvm/svm/svm.c b/arch/x86/kvm/svm/svm.c index e9cec1b692051c..36f651ce842174 100644 --- a/arch/x86/kvm/svm/svm.c +++ b/arch/x86/kvm/svm/svm.c @@ -3428,15 +3428,6 @@ static int svm_handle_exit(struct kvm_vcpu *vcpu, fastpath_t exit_fastpath) return 0; } - if (is_external_interrupt(svm->vmcb->control.exit_int_info) && - exit_code != SVM_EXIT_EXCP_BASE + PF_VECTOR && - exit_code != SVM_EXIT_NPF && exit_code != SVM_EXIT_TASK_SWITCH && - exit_code != SVM_EXIT_INTR && exit_code != SVM_EXIT_NMI) - printk(KERN_ERR "%s: unexpected exit_int_info 0x%x " - "exit_code 0x%x\n", - __func__, svm->vmcb->control.exit_int_info, - exit_code); - if (exit_fastpath != EXIT_FASTPATH_NONE) return 1;