Received: by 10.213.65.68 with SMTP id h4csp452475imn; Fri, 23 Mar 2018 08:06:43 -0700 (PDT) X-Google-Smtp-Source: AG47ELtBvvb30BtugQil8/h8PDPupj9koOM88RZqaGLkY5MJbgRzHAQHD/2zvu/8UKwU0j+E9JED X-Received: by 2002:a17:902:2e43:: with SMTP id q61-v6mr29393373plb.404.1521817602952; Fri, 23 Mar 2018 08:06:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521817602; cv=none; d=google.com; s=arc-20160816; b=vBdMHp2TT9UPufM53UgXtVFMpHmSuN8MMwJFbPm62NQ+hiQHFsUeEgknQW+T+iLyj4 Cykd99EmWZFUM7lgzl7XXntaYWvcsFGH1l+RczxDwWoT1WIEqtqF5tik4UiLEm8L4B3g xv5lv9evn8LBTgYh2viHnxGb8/JBSBkfB2WyxbmcK88GWLnLvXIhR4UzSJ/7a5ETXXDF 0nJ6+KgdDGyRr0MJxgybVbpsv8GWU6UKYC6cgcz3A+rhvEhLEXcrGUTak0+G3Ga11Q4z +FHXjIJaTW/oegWD+EaSnd8Uhsc/1bBDGfrUZyA/sg84rKu4FR6w1EEMhqeh10sa5p6e qI6Q== 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:from:references:cc:to:subject:arc-authentication-results; bh=2fN2xQblYZLGG8NqePmYF77k+5v420qm7cxTyPBqrTU=; b=ZeWMr1r3L46GE3jU4nN9l5nKffjCPFRSE7dnArh4oMini8BEDGlMZuV9RKbzpxGUY8 9hHHfDaybSYaGHCj/09XZZ3Mv86vTTsN3xjGYVQbJ3/vA3uTKfcxRBhcBpQ2t9A5d5Hl xQAyiNT8gy2BlF0rRE7DaBwG3toBncIdh+/RquJZNsvhIu62Kj/BB+gEnSE+WYEuhsAf YLa0fiuyLxPieV+TNzKtx0DoJWutN/J2QyR4vchkUEkoXJSQdJojAYEiCltMaUAjwGPJ /6pnTt9+LYndxvWE9CbqtAB+dZ7NPqfLorW2Bv5/q6yUF6tsBqFEumlrrt3N4vMPgsO9 c8mA== 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 l125si6145388pgl.485.2018.03.23.08.06.22; Fri, 23 Mar 2018 08:06:42 -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 S1752003AbeCWPEf (ORCPT + 99 others); Fri, 23 Mar 2018 11:04:35 -0400 Received: from mx3-rdu2.redhat.com ([66.187.233.73]:47122 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751686AbeCWPEX (ORCPT ); Fri, 23 Mar 2018 11:04:23 -0400 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 6DC1A406E96B; Fri, 23 Mar 2018 15:04:23 +0000 (UTC) Received: from [10.36.117.73] (ovpn-117-73.ams2.redhat.com [10.36.117.73]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 34CC42166BAE; Fri, 23 Mar 2018 15:04:22 +0000 (UTC) Subject: Re: [PATCH] KVM: X86: Fix the decoding of segment overrides in 64bit mode To: Wanpeng Li , Andrew Cooper Cc: LKML , kvm , =?UTF-8?B?UmFkaW0gS3LEjW3DocWZ?= References: <1521707651-9375-1-git-send-email-wanpengli@tencent.com> <49454fe4-16e2-4d8b-7ad5-9e488afc786e@citrix.com> <9bd82cb0-d88f-4891-a111-3704802e1d4e@redhat.com> <94bbfac5-2022-ab92-0b9a-1c3cd2275054@citrix.com> From: Paolo Bonzini Message-ID: <46ef9359-a87c-224c-53e0-c948b79314a8@redhat.com> Date: Fri, 23 Mar 2018 16:04:20 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.78 on 10.11.54.6 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.7]); Fri, 23 Mar 2018 15:04:23 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.7]); Fri, 23 Mar 2018 15:04:23 +0000 (UTC) for IP:'10.11.54.6' DOMAIN:'int-mx06.intmail.prod.int.rdu2.redhat.com' HELO:'smtp.corp.redhat.com' FROM:'pbonzini@redhat.com' RCPT:'' Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 23/03/2018 15:27, Wanpeng Li wrote: > 2018-03-22 21:53 GMT+08:00 Andrew Cooper : >> On 22/03/18 13:39, Wanpeng Li wrote: >>> 2018-03-22 20:38 GMT+08:00 Paolo Bonzini : >>>> On 22/03/2018 12:04, Andrew Cooper wrote: >>>>> We've got a Force Emulation Prefix (ud2a; .ascii "xen") for doing >>>>> magic. Originally, this was used for PV guests to explicitly request an >>>>> emulated CPUID, but I extended it to HVM guests for "emulate the next >>>>> instruction", after we had some guest user => guest kernel privilege >>>>> escalations because of incorrect emulation. >>>> Wanpeng, why don't you add it behind a new kvm module parameter? :) >>> Great point! I will have a try. Thanks Paolo and Andrew. :) >> >> Using the force emulation prefix requires intercepting #UD, which is in >> general a BadThing(tm) for security. Therefore, we have a build time > > Yeah, however kvm intercepts and emulates #UD by default, should we > add a new kvm module parameter to enable it and disable by default? No, the module parameter should only be about the force-emulation prefix. Paolo