From nobody Mon Apr 29 17:56:35 2024 Delivered-To: importer@patchew.org Received-SPF: none (zoho.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; spf=none (zoho.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org ARC-Seal: i=1; a=rsa-sha256; t=1556554685; cv=none; d=zoho.com; s=zohoarc; b=XAdtmIsIh8gpGjeZhbOFfpYTGm6EEmGQ63FEm4uQiQyi9XNJuLfXpqcQELWUDdtbM95TA5Hnux540smxv2L2zcL9qJkk1aq8vlGamnsGM63h4Dbq0SPIIFnlQBzYAfiyHlUR1BIZpT5Yg0jIeRwB7YT9/IpLBAv6gAIKv/DWkFA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1556554685; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=zondMFzl7JDSyRe+svg2tI6yszIYSFOa8ND7nRAv++I=; b=jD770kzp7P/aNRrEGAs0qzjcgbU/a+DsY4hHagDEQ2MlQd+vfgUTc/0XebUCkqikPS2jeDwPNfzQrvWnK+TwtQ6cC/I0d3I3PgCOvHqLXFKKQ5Wo0OWLTzk+m9mHF5ElOXs1+VbvK9LMaiq9ddeZu8N5jIltaH78Yj0zWI18fQw= ARC-Authentication-Results: i=1; mx.zoho.com; spf=none (zoho.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1556554685954654.6769962305361; Mon, 29 Apr 2019 09:18:05 -0700 (PDT) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1hL8xP-0004X4-9M; Mon, 29 Apr 2019 16:16:43 +0000 Received: from us1-rack-dfw2.inumbo.com ([104.130.134.6]) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1hL8xN-0004Wh-Ma for xen-devel@lists.xenproject.org; Mon, 29 Apr 2019 16:16:41 +0000 Received: from SMTP03.CITRIX.COM (unknown [162.221.156.55]) by us1-rack-dfw2.inumbo.com (Halon) with ESMTPS id 2bb23458-6a9a-11e9-843c-bc764e045a96; Mon, 29 Apr 2019 16:16:40 +0000 (UTC) X-Inumbo-ID: 2bb23458-6a9a-11e9-843c-bc764e045a96 X-IronPort-AV: E=Sophos;i="5.60,410,1549929600"; d="scan'208";a="84670045" From: Andrew Cooper To: Xen-devel Date: Mon, 29 Apr 2019 17:16:29 +0100 Message-ID: <1556554590-25358-2-git-send-email-andrew.cooper3@citrix.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1556554590-25358-1-git-send-email-andrew.cooper3@citrix.com> References: <1556554590-25358-1-git-send-email-andrew.cooper3@citrix.com> MIME-Version: 1.0 Subject: [Xen-devel] [PATCH for-4.{11, 10} 1/2] xen: Fix backport of "xen/cmdline: Fix buggy strncmp(s, LITERAL, ss - s) construct" 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: Andrew Cooper , Jan Beulich Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" These were missed as a consequence of being rebased over other cmdline cleanup. Signed-off-by: Andrew Cooper Reviewed-by: Jan Beulich --- CC: Jan Beulich xen/arch/x86/dom0_build.c | 4 ++-- xen/arch/x86/hvm/vmx/vmcs.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/xen/arch/x86/dom0_build.c b/xen/arch/x86/dom0_build.c index b744791..dbd7d0d 100644 --- a/xen/arch/x86/dom0_build.c +++ b/xen/arch/x86/dom0_build.c @@ -237,10 +237,10 @@ static int __init parse_dom0_param(const char *s) if ( !ss ) ss =3D strchr(s, '\0'); =20 - if ( !strncmp(s, "pvh", ss - s) ) + if ( !cmdline_strcmp(s, "pvh") ) dom0_pvh =3D true; #ifdef CONFIG_SHADOW_PAGING - else if ( !strncmp(s, "shadow", ss - s) ) + else if ( !cmdline_strcmp(s, "shadow") ) opt_dom0_shadow =3D true; #endif else diff --git a/xen/arch/x86/hvm/vmx/vmcs.c b/xen/arch/x86/hvm/vmx/vmcs.c index 49c916b..19755f2 100644 --- a/xen/arch/x86/hvm/vmx/vmcs.c +++ b/xen/arch/x86/hvm/vmx/vmcs.c @@ -90,9 +90,9 @@ static int __init parse_ept_param(const char *s) if ( !ss ) ss =3D strchr(s, '\0'); =20 - if ( !strncmp(s, "pml", ss - s) ) + if ( !cmdline_strcmp(s, "pml") ) opt_pml_enabled =3D val; - else if ( !strncmp(s, "ad", ss - s) ) + else if ( !cmdline_strcmp(s, "ad") ) opt_ept_ad =3D val; else rc =3D -EINVAL; --=20 2.1.4 _______________________________________________ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel From nobody Mon Apr 29 17:56:35 2024 Delivered-To: importer@patchew.org Received-SPF: none (zoho.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; spf=none (zoho.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org ARC-Seal: i=1; a=rsa-sha256; t=1556554688; cv=none; d=zoho.com; s=zohoarc; b=KxH0EnXs/gEmFlfKQUNeKKOdR56W+RTAoWTcVApzBxCLkIrFtyOxsV/Xr/AQUgVGsjU+QFbEdVq9A6GmoxEMjbGonfUsdCOEow/3Dnql2WGCVSTvWLeHlmeT1+2OaOPAE9d6J1CqzZ6r/24jcnUIUp+WbsrMAns6UaCTVnQVdrA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1556554688; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=vKBPn4Tn4P6riyabsNtW7+UqwP/Gg4p0tomEhdmJnvU=; b=bLtflHs54ZfTrfc/MH3cCHxZusm+IgXQjhGhHd8ZY0OnT7Gydxctkn2+w8XVoti/m9+6a5jlu2XBCAzSpTHSJyZfu0Uuwyav8X1jSPlMPZOU4xG2E4W0FOG+X5c+bC6ilfR84D7qpTxpqmFWqsTzVH9FCb/BSFwFxA6xX1oDFW0= ARC-Authentication-Results: i=1; mx.zoho.com; spf=none (zoho.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1556554688121764.2786143273892; Mon, 29 Apr 2019 09:18:08 -0700 (PDT) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1hL8xP-0004XB-Hd; Mon, 29 Apr 2019 16:16:43 +0000 Received: from us1-rack-dfw2.inumbo.com ([104.130.134.6]) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1hL8xN-0004Wm-UI for xen-devel@lists.xenproject.org; Mon, 29 Apr 2019 16:16:41 +0000 Received: from SMTP03.CITRIX.COM (unknown [162.221.156.55]) by us1-rack-dfw2.inumbo.com (Halon) with ESMTPS id 2c449d07-6a9a-11e9-843c-bc764e045a96; Mon, 29 Apr 2019 16:16:41 +0000 (UTC) X-Inumbo-ID: 2c449d07-6a9a-11e9-843c-bc764e045a96 X-IronPort-AV: E=Sophos;i="5.60,410,1549929600"; d="scan'208";a="84670047" From: Andrew Cooper To: Xen-devel Date: Mon, 29 Apr 2019 17:16:30 +0100 Message-ID: <1556554590-25358-3-git-send-email-andrew.cooper3@citrix.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1556554590-25358-1-git-send-email-andrew.cooper3@citrix.com> References: <1556554590-25358-1-git-send-email-andrew.cooper3@citrix.com> MIME-Version: 1.0 Subject: [Xen-devel] [PATCH for 4.11 2/2] xen: Fix backport of "x86/tsx: Implement controls for RTM force-abort mode" 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: Andrew Cooper , Jan Beulich Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" The posted version of this patch depends on c/s 3c555295 "x86/vpmu: Improve documentation and parsing for vpmu=3D" (Xen 4.12 and later) to prevent `vpmu=3Drtm-abort` impliying `vpmu=3D1`, which is outside of security suppo= rt. Signed-off-by: Andrew Cooper Reviewed-by: Jan Beulich --- CC: Jan Beulich xen/arch/x86/cpu/vpmu.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/xen/arch/x86/cpu/vpmu.c b/xen/arch/x86/cpu/vpmu.c index 639ae0c..9a42e09 100644 --- a/xen/arch/x86/cpu/vpmu.c +++ b/xen/arch/x86/cpu/vpmu.c @@ -91,6 +91,10 @@ static int __init parse_vpmu_params(const char *s) =20 s =3D ss + 1; } while ( *ss ); + + if ( !vpmu_features ) /* rtm-abort doesn't imply vpmu=3D1 */ + break; + /* fall through */ case 1: /* Default VPMU mode */ --=20 2.1.4 _______________________________________________ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel