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=-12.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT 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 86D47C2D0A8 for ; Wed, 23 Sep 2020 10:19:39 +0000 (UTC) Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 13D1A2076E for ; Wed, 23 Sep 2020 10:19:39 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=citrix.com header.i=@citrix.com header.b="Zx2sjDQq" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 13D1A2076E Authentication-Results: mail.kernel.org; dmarc=fail (p=reject dis=none) header.from=citrix.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kL1s2-0004xA-8p; Wed, 23 Sep 2020 10:19:30 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kL1s1-0004wt-FH for xen-devel@lists.xenproject.org; Wed, 23 Sep 2020 10:19:29 +0000 X-Inumbo-ID: ba5e6bd4-22b4-4a3d-891b-cbee4ef1e848 Received: from esa2.hc3370-68.iphmx.com (unknown [216.71.145.153]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id ba5e6bd4-22b4-4a3d-891b-cbee4ef1e848; Wed, 23 Sep 2020 10:19:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1600856368; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=CE7g8vPDYlIKduKbEZ7lYC+iZyTi7kLgkA5xquL7+8c=; b=Zx2sjDQqdY2L15gFk0n4XqCXCKUx9WnQ2uo4iCRFi3DL3zYwfCmMJpMG o4zq/Q2IDdGUcKtLt+0NGQME8iwKXpRXYRaa3u57tyDH7VQJuuD/Dt13i SXXBGsykXLhbZc2mzwA+6T3CYhgp0rD2aE/mwMUZqTtZnUTMFmUES4fcv M=; Authentication-Results: esa2.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none IronPort-SDR: 0MXcKkTWrLrLn8yv8ToK47VSTrzinnxMF1i9a+OGSqiCi8d6tKFb6ZRiFXVKoFKHcC5dAUSHm8 N5bMGGGgLefXbr4fH+afLlowzTDTFpOLKmhfkRbdXGE+BOt539di5wT5L7BjCYsVycg55dCHP8 f4bD11OoYC1MI2fZTTQ7n9dMzeWmPN/jRq02lI0IZZFofawrsUS0y4X5+mOQA9ZJ8u9G9lBb/Y CGpYfzKBiaNMHAz5xZsFVhVjpEYsMx0FPAGQDArcJMHZaM+By72ijCra90u9h+Q0DWBx23oICp 0GY= X-SBRS: 2.7 X-MesageID: 27361579 X-Ironport-Server: esa2.hc3370-68.iphmx.com X-Remote-IP: 162.221.158.21 X-Policy: $RELAYED X-IronPort-AV: E=Sophos;i="5.77,293,1596513600"; d="scan'208";a="27361579" From: Andrew Cooper To: Xen-devel CC: Andrew Cooper , Jan Beulich , =?UTF-8?q?Roger=20Pau=20Monn=C3=A9?= , Wei Liu , Andy Lutomirski Subject: [PATCH 1/3] x86/pv: Don't deliver #GP for a SYSENTER with NT set Date: Wed, 23 Sep 2020 11:18:46 +0100 Message-ID: <20200923101848.29049-2-andrew.cooper3@citrix.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20200923101848.29049-1-andrew.cooper3@citrix.com> References: <20200923101848.29049-1-andrew.cooper3@citrix.com> MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8bit X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" It is a matter of guest kernel policy what to do with offending userspace, and terminating said userspace may not be the action chosen. Linux explicitly tolerates this case. Reported-by: Andy Lutomirski Fixes: fdac951560 ("x86: clear EFLAGS.NT in SYSENTER entry path") Signed-off-by: Andrew Cooper --- CC: Jan Beulich CC: Roger Pau Monné CC: Wei Liu CC: Andy Lutomirski --- xen/arch/x86/x86_64/entry.S | 1 - 1 file changed, 1 deletion(-) diff --git a/xen/arch/x86/x86_64/entry.S b/xen/arch/x86/x86_64/entry.S index 71a00e846b..44a110b9c8 100644 --- a/xen/arch/x86/x86_64/entry.S +++ b/xen/arch/x86/x86_64/entry.S @@ -313,7 +313,6 @@ UNLIKELY_START(nz, sysenter_nt_set) pushfq andl $~X86_EFLAGS_NT,(%rsp) popfq - xorl %eax,%eax UNLIKELY_END(sysenter_nt_set) testq %rax,%rax leal (,%rcx,TBF_INTERRUPT),%ecx -- 2.11.0