From patchwork Mon Dec 16 12:11:01 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jin Nan Wang X-Patchwork-Id: 11294061 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id F21DB112B for ; Mon, 16 Dec 2019 12:31:12 +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 D61B52053B for ; Mon, 16 Dec 2019 12:31:12 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org D61B52053B Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=suse.com Authentication-Results: mail.kernel.org; spf=none 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.89) (envelope-from ) id 1igpVw-0003qj-9K; Mon, 16 Dec 2019 12:30:16 +0000 Received: from all-amaz-eas1.inumbo.com ([34.197.232.57] helo=us1-amaz-eas2.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1igpVu-0003qe-C4 for xen-devel@lists.xenproject.org; Mon, 16 Dec 2019 12:30:14 +0000 X-Inumbo-ID: ca17b8fa-1fff-11ea-9398-12813bfff9fa Received: from m9a0014g.houston.softwaregrp.com (unknown [15.124.64.90]) by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS id ca17b8fa-1fff-11ea-9398-12813bfff9fa; Mon, 16 Dec 2019 12:30:13 +0000 (UTC) Received: FROM m9a0014g.houston.softwaregrp.com (15.121.0.190) BY m9a0014g.houston.softwaregrp.com WITH ESMTP; Mon, 16 Dec 2019 12:29:19 +0000 Received: from M9W0068.microfocus.com (2002:f79:bf::f79:bf) by M9W0067.microfocus.com (2002:f79:be::f79:be) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1591.10; Mon, 16 Dec 2019 12:11:02 +0000 Received: from NAM04-SN1-obe.outbound.protection.outlook.com (15.124.72.14) by M9W0068.microfocus.com (15.121.0.191) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1591.10 via Frontend Transport; Mon, 16 Dec 2019 12:11:02 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=R49sTPcPoeeOTTBxaQUWk0YIj8kORlVo8F5XsNH/1V1os5DtlkuPJr5eBUg29xTrglwXdLxdwt7ZYGNovnlp3PKjabGxztRBXOeJjvX0iEbw/Icfdp+83L7+c3keDpff/piOCjDD3YaukXc4HS7LIDPnpuFNXBPATOOqpvMSY+21nERPQJ2ifghX4JiZz0GfV90CvD7H7rKsGdPqjMfJoiRkM+f8kle0yyklJNFHJaMsCIwpmAa01zvyrfMNzutbzsFTnCKM9Iq5YvEN0hnQi7hXhGdT1fgY1rUO6p3YREI3QI8gAZKMG3Vo7VxnYPLd93YlQRJ4JbAvCVkMBpQ84g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=iEMoEYSj0bfFmSSEcDY6zPpRGtK000+/NYonGTTZXeQ=; b=l2O5Dypw9kedHLer3uzEZb+q2J6ZN71FPURqUx5ij1PusqDlHqQm6LXX6gzcsl7LHOyHqRn9pcL6K8RnPai8zSCCwHlwT4OPzrQuwFsUSVp8SYzdhd5y90d4AC1/n5SICkhEjnnoLkZLNmV9j81YPoLx3lREtDYLce4/1AAYJoiPI3xZ82rP7px3g+C0yrN1/f1vtL1QU+ngc5I8ilgpp4ZQrrn7HCMmc1iAjCWFtiA8CG9UGinK3e6KQjgRI9ykUPw0ARIscwSlcqv+rBpxF3V3beeQuOfrVW7thmtgi3ZHFRUXYvvBmL+XOooF38mwTM7Pv2RPPWY0BCXmcPX/rQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=suse.com; dmarc=pass action=none header.from=suse.com; dkim=pass header.d=suse.com; arc=none Received: from BY5PR18MB3170.namprd18.prod.outlook.com (10.255.137.144) by BY5PR18MB3377.namprd18.prod.outlook.com (10.255.139.78) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2538.19; Mon, 16 Dec 2019 12:11:01 +0000 Received: from BY5PR18MB3170.namprd18.prod.outlook.com ([fe80::5967:dfe8:c14:808e]) by BY5PR18MB3170.namprd18.prod.outlook.com ([fe80::5967:dfe8:c14:808e%7]) with mapi id 15.20.2538.019; Mon, 16 Dec 2019 12:11:01 +0000 From: Jin Nan Wang To: "xen-devel@lists.xenproject.org" Thread-Topic: [PATCH v4] Xen missing prompt log when exec-sp=off Thread-Index: AQHVtAnikBKl2+3ElEG70BBPpmH8nw== Date: Mon, 16 Dec 2019 12:11:01 +0000 Message-ID: <20191216121023.30237-1-jnwang@suse.com> Accept-Language: zh-CN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-clientproxiedby: SG2PR0401CA0011.apcprd04.prod.outlook.com (2603:1096:3:1::21) To BY5PR18MB3170.namprd18.prod.outlook.com (2603:10b6:a03:1a9::16) authentication-results: spf=none (sender IP is ) smtp.mailfrom=jnwang@suse.com; x-ms-exchange-messagesentrepresentingtype: 1 x-mailer: git-send-email 2.24.0 x-originating-ip: [45.122.156.254] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: fd94af22-f1ba-413e-705e-08d782210459 x-ms-traffictypediagnostic: BY5PR18MB3377: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:6108; x-forefront-prvs: 02530BD3AA x-forefront-antispam-report: SFV:NSPM; SFS:(10019020)(4636009)(366004)(396003)(39860400002)(136003)(376002)(346002)(199004)(189003)(64756008)(8676002)(66476007)(66556008)(54906003)(66446008)(6512007)(4326008)(71200400001)(2616005)(36756003)(6486002)(8936002)(1076003)(86362001)(66946007)(316002)(26005)(186003)(6916009)(5660300002)(6506007)(81166006)(81156014)(52116002)(2906002)(478600001); DIR:OUT; SFP:1102; SCL:1; SRVR:BY5PR18MB3377; H:BY5PR18MB3170.namprd18.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1; received-spf: None (protection.outlook.com: suse.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: 5gZLjvJq1ENykgvvRqF5mhh6zrdGswUWCYS2KWFnaTz9X0XkYbRK2W/knZ2uXCRkIdMc1vFhQmCdWKF9MZa185JtkG7zWGg49l9FjgCcsO3E8y3EkcCc/Xfd8je+/gDacK11izzogkw4x5cIBexw0YjbeXMFBcvOfIutv3fN7fN4CsKmqwHnGLeDSqbMUV+S1ygGB/NBXCZnyk/gN+uVxv6NDJYTq+wnjqP7oux3OzBmqEKake7zDJx8LN/nDMtF13zbGQPUgbyLtPpzoxd9ZDukVkfTzs88aXvTtP4YinM4I5oXyDxydeleZG2Bg/sLNwoK+4Ss4nDll6JvxQGJyDnWZGYW5d8hNB1ZiZzZOxwJtRq+gkLGaEcisupSxijlxsmAHPUSIuqfWr3M3yo2gFpCX947XmY/W/0NpLq1QEYJtSxd22GvSg07CCSz5Zzd MIME-Version: 1.0 X-MS-Exchange-CrossTenant-Network-Message-Id: fd94af22-f1ba-413e-705e-08d782210459 X-MS-Exchange-CrossTenant-originalarrivaltime: 16 Dec 2019 12:11:01.7384 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 856b813c-16e5-49a5-85ec-6f081e13b527 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: qgqfpaiwDVkBGwWqGzCbi/5hd//yMr3UIqYaAPQYuY/kTWLl+qSvsXX0bkSrCXQO X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY5PR18MB3377 X-OriginatorOrg: suse.com Subject: [Xen-devel] [PATCH v4] Xen missing prompt log when exec-sp=off X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: Kevin Tian , Jun Nakajima , Wei Liu , Andrew Cooper , Jin Nan Wang , Jan Beulich , =?iso-8859-1?q?Roger_Pau_Monn=E9?= Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" Fix a issue when user disable ETP exec-sp, xen missed a prompt log in dmesg. At default, xen will tell "VMX: Disabling executable EPT suerpages due to CVE-2018-12207". When user add 'ept=exec-sp=off' on command-line. The prompt is disappeared. This can give users the illusion that the feature is turned on. Signed-off-by: James Wang --- xen/arch/x86/hvm/vmx/vmx.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/xen/arch/x86/hvm/vmx/vmx.c b/xen/arch/x86/hvm/vmx/vmx.c index 7970ba93e1..9dcb100210 100644 --- a/xen/arch/x86/hvm/vmx/vmx.c +++ b/xen/arch/x86/hvm/vmx/vmx.c @@ -2495,14 +2495,14 @@ const struct hvm_function_table * __init start_vmx(void) { bool cpu_has_bug_pschange_mc = has_if_pschange_mc(); + /* Default to non-executable superpages on vulnerable hardware. */ if ( opt_ept_exec_sp == -1 ) - { - /* Default to non-executable superpages on vulnerable hardware. */ opt_ept_exec_sp = !cpu_has_bug_pschange_mc; - if ( cpu_has_bug_pschange_mc ) - printk("VMX: Disabling executable EPT superpages due to CVE-2018-12207\n"); - } + if ( opt_ept_exec_sp ) + printk("VMX: Enable executable EPT superpages\n"); + else + printk("VMX: Disabling executable EPT superpages due to CVE-2018-12207\n"); vmx_function_table.hap_supported = 1; vmx_function_table.altp2m_supported = 1;