From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by spool.mail.gandi.net (Postfix) with ESMTPS id 7D017941C87 for ; Thu, 7 Sep 2023 22:01:52 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=ER0WQ9rmobIUxLRWNEalAlPhoiLWrxYPwa21AhI42Ko=; c=relaxed/simple; d=groups.io; h=ARC-Seal:ARC-Message-Signature:ARC-Authentication-Results:From:To:CC:Subject:Thread-Topic:Thread-Index:Date:Message-ID:References:In-Reply-To:Accept-Language:MIME-Version:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Language:Content-Type:Content-Transfer-Encoding; s=20140610; t=1694124111; v=1; b=tkZKfFcjrQBjzA4gcRZIKWryugIOr6LSEXUJqBq5N99LPNDrdbLozO22AcGMcfdGNam0KdoO MU7o+dy+dE8I8fXVda5WAOYqh6Vk0LvER3nltyrscKrivbK/7lSJdqXmeD2/2VSgM7GJFjQ8HHA poOwkkqcVEI+moB0vLtGyBvw= X-Received: by 127.0.0.2 with SMTP id iljBYY7687511xLEpDwR3vLY; Thu, 07 Sep 2023 15:01:51 -0700 X-Received: from mgamail.intel.com (mgamail.intel.com [192.55.52.151]) by mx.groups.io with SMTP id smtpd.web11.26490.1694124110678036841 for ; Thu, 07 Sep 2023 15:01:50 -0700 X-IronPort-AV: E=McAfee;i="6600,9927,10826"; a="357801081" X-IronPort-AV: E=Sophos;i="6.02,236,1688454000"; d="scan'208";a="357801081" X-Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Sep 2023 15:01:19 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10826"; a="777247027" X-IronPort-AV: E=Sophos;i="6.02,236,1688454000"; d="scan'208";a="777247027" X-Received: from fmsmsx603.amr.corp.intel.com ([10.18.126.83]) by orsmga001.jf.intel.com with ESMTP/TLS/AES256-GCM-SHA384; 07 Sep 2023 15:01:18 -0700 X-Received: from fmsmsx603.amr.corp.intel.com (10.18.126.83) by fmsmsx603.amr.corp.intel.com (10.18.126.83) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.32; Thu, 7 Sep 2023 15:01:18 -0700 X-Received: from FMSEDG603.ED.cps.intel.com (10.1.192.133) by fmsmsx603.amr.corp.intel.com (10.18.126.83) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.32 via Frontend Transport; Thu, 7 Sep 2023 15:01:18 -0700 X-Received: from NAM11-DM6-obe.outbound.protection.outlook.com (104.47.57.173) by edgegateway.intel.com (192.55.55.68) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.27; Thu, 7 Sep 2023 15:01:17 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=cHUJdL2ktJZjCgUibSzio9Fn4pFE99ve2l4xd70aQu4G/Zt21116LEUmVdeeMgN06lcR1SO0PYcE5PswytYVqp8g3M36T31kiacZDaZKfJ91PtTX//K6CXOW0q/5DDvPi77X7ZRzRi883Qic/u9PUBoBOvSwCAsfFZLyBdECbbVKUmE9VkBF6Cn7HXNAInunj3LaVpAOwDfVIpcAXeYL/Eg6dr0dmfO2tsLJwvtKJoER0qKMXNOWvDUstRxh9orxUCWmswb2+zSzZGLVH/8ZNlzP94rIF8o6KRTbLkjMxwjOztDW3TaF7l1aDcEY6JcQUA39R3cHz2xzhLi+rMTDMQ== 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-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=9njFj8K9mlYW+zmOtw/nf921heNZNG3rmXE4y0GJeeQ=; b=ZenKeWXB79r9EC0feXdKNY/dHkDIiw7wYDkAOYtaoZjiQe7mdEmlKnoTZ5XyuD1Mb4scKeYMusP76St0FBRRVm9+gdKUt43MUDTTPVySl/Jq+znUnzqmiwrWSGJUF4rkrTpU/IbUNlB+7RtYZ8e83rrqkYe+BdK9rYi2klFf73LrSXKAZVsNJfVRew9/+Co/KqJrXlPQgefB4JNLjkwNwWKVA5k3kyBysz2pG2oddf6om70gzad6TtrlEVphk8n4jx+L47Ja3ZsTxOOQO7Y299yAnTWGm74sHVlwWs4qRDbASEgBUl+EtAvFJsQWIsX5WdRyPYu7X5u2drXmojX25Q== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none X-Received: from CO1PR11MB4929.namprd11.prod.outlook.com (2603:10b6:303:6d::19) by SJ2PR11MB8588.namprd11.prod.outlook.com (2603:10b6:a03:56c::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6768.30; Thu, 7 Sep 2023 22:01:15 +0000 X-Received: from CO1PR11MB4929.namprd11.prod.outlook.com ([fe80::eaa6:1c0:c33f:2a11]) by CO1PR11MB4929.namprd11.prod.outlook.com ([fe80::eaa6:1c0:c33f:2a11%2]) with mapi id 15.20.6745.034; Thu, 7 Sep 2023 22:01:15 +0000 From: "Michael D Kinney" To: "mikuback@linux.microsoft.com" , "devel@edk2.groups.io" CC: "Gao, Liming" , "Liu, Zhiguang" , Rebecca Cran , "Kinney, Michael D" Subject: Re: [edk2-devel] [PATCH v1 1/1] MdePkg/Library/TdxLib: Remove unnecessary comparison Thread-Topic: [PATCH v1 1/1] MdePkg/Library/TdxLib: Remove unnecessary comparison Thread-Index: AQHZ4OiayZxBTypIDUi70f+zZwkDObAP68cA Date: Thu, 7 Sep 2023 22:01:15 +0000 Message-ID: References: <20230906173402.1842-1-mikuback@linux.microsoft.com> In-Reply-To: <20230906173402.1842-1-mikuback@linux.microsoft.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-publictraffictype: Email x-ms-traffictypediagnostic: CO1PR11MB4929:EE_|SJ2PR11MB8588:EE_ x-ms-office365-filtering-correlation-id: ab56dc4a-a02e-47d9-4a33-08dbafedf509 x-ld-processed: 46c98d88-e344-4ed4-8496-4ed7712e255d,ExtAddr x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam-message-info: t9xc0of+xJg9r7iTySzuUTE0c3+pMVXMePfBCs0xBJljHdshyMwJ4Qoe9iiKrdK/SeKLqIBLpSFyFStFiRBefL8coa9KXsNRtzdG5L+lccv1M0ADQJyKDmI+R8njgpczh1f7IHhUridd1jH5KtZH501eHrnfjV9zF8OH2BPVTS7MUQYawrAh3OW0VddYDsuTvsv71IbK3lfnJu85j5R5nngAwxakl7qIAU0pWupW09NyQ2LV50LS3VRlduK0nxYj2VoumdmIsWGxN3rEHNHsRg4Hs8Q9KSrRQTQtdHeAZXDuVTQPtbs0Z2IVfrtiOFA7ruEN/fzjZLxHIdrBCAnvi6ml4/tKPobVyPuRXigUcmhylwmw1CiZLBWofjVaxVUDfctD2ovvlWrJgKqGWTxl1Qy/nqjdZAm+op4/PmeuUd+OIhipWUHGv/3f9UioVPOlf77XzIBHT5fYFHCabETUCoUltUlcVjoFNEI77JUIx6gkc0ECwzfNPJ/QMeoT6KX5gxLVwDmhPqA8/fVOxoXtsRhvJUbVl0JtmvZQbl4JhkukrvdezeWG7KFsDmlIJyU/Xk6L9+NhAYXwXUxO1NMcQDFMZbrIbgU5GR6CDo2mMIoCUyHF078cMy5IvIwvUwMZ x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-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86mFUCMvQnaCAURmq4qOjJZx8rNJFj9xZJG4szmyj9?= =?us-ascii?Q?FUhEP0zLAJCYo1bjZsxdJBhb1igWci93JfVvUIcK91dhwYIuy+Pbevfsik5m?= =?us-ascii?Q?aM05y5xOpJw0l4NxfMCWSi3vnNq4YFjBVxzxXGub18xaa7N2tsatLlkQfwhm?= =?us-ascii?Q?Ddel5mcu/f+6mDucvGzIZkS9FIHB6LUgYp05SZBfpvd9FKui/41pLzS/APZt?= =?us-ascii?Q?8i9NYDWrRPCTM5NgR0zKuNdqtjaW6TLsOIQLeRkuNusQL41m/eqmddnUf3JZ?= =?us-ascii?Q?JHV/yW7ydJ0K2V9y3fe+CSOHNYSmzmS7OqcvlsBY/IXHpX6Nb/G35bIqSgbM?= =?us-ascii?Q?dIgVVydU39nHKuY2dgAEW5NSuG91u7zRlUAlFIDi0haS+J6dpH/GAz682R4x?= =?us-ascii?Q?mxHS6JkqO9TKb5grs+EVP9T9aznGELIaxfUxTHfmXZldNRKSd58+0k7rtNCp?= =?us-ascii?Q?mhuHVSKKzDru7b8MSGhCCl0q7YZmF+J63kgAtSysliAfWjLJgJbwfi6iv/po?= =?us-ascii?Q?o+ZawR22V80Q4DAhto+E1+XSFBd3TGWh7lFo/v/dhYSqapOv/e2K05F1yKxs?= =?us-ascii?Q?vU9CKLfYLeoeNpHcBB7pILtUXC5ayIKHmy53CtdCfI4RHRaxcdAMmkv8gU7L?= =?us-ascii?Q?vI/THLWiQQJoOQKWTo0HbHx4Awp1CjjMxLMm4YtdqUxRNYLQ2pESb1gvx4h6?= =?us-ascii?Q?TTUukjN8TiUVG47X0pyGYYITG6PH9ChxZW3fpKzsZvKBU29/ZdaM6W5l33K3?= =?us-ascii?Q?6w=3D=3D?= MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: CO1PR11MB4929.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: ab56dc4a-a02e-47d9-4a33-08dbafedf509 X-MS-Exchange-CrossTenant-originalarrivaltime: 07 Sep 2023 22:01:15.5700 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: r4q56ndZMzDiRu2OqkJg4YfCEwzzASCpRo7CRq3E4Q3lTBWvcr6Q6TQgOccw6NlpZVYMsfevFpDydg1pA9/kbzZ4tF/JWJnZ95M/YZb6Cro= X-MS-Exchange-Transport-CrossTenantHeadersStamped: SJ2PR11MB8588 X-OriginatorOrg: intel.com Precedence: Bulk List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,michael.d.kinney@intel.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: X-Gm-Message-State: zh09k0X2FWeKkhJpxShmtMLVx7686176AA= Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable X-GND-Status: LEGIT Authentication-Results: spool.mail.gandi.net; dkim=pass header.d=groups.io header.s=20140610 header.b=tkZKfFcj; dmarc=fail reason="SPF not aligned (relaxed), DKIM not aligned (relaxed)" header.from=intel.com (policy=none); spf=pass (spool.mail.gandi.net: domain of bounce@groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce@groups.io Reviewed-by: Michael D Kinney > -----Original Message----- > From: mikuback@linux.microsoft.com > Sent: Wednesday, September 6, 2023 10:34 AM > To: devel@edk2.groups.io > Cc: Kinney, Michael D ; Gao, Liming > ; Liu, Zhiguang ; > Rebecca Cran > Subject: [PATCH v1 1/1] MdePkg/Library/TdxLib: Remove unnecessary > comparison >=20 > From: Michael Kubacki >=20 > Removes the comparison since unsigned values are always greater than > or equal to 0. >=20 > See the following CodeQL query for more info: > /cpp/cpp-unsigned-comparison-zero/ >=20 > Cc: Michael D Kinney > Cc: Liming Gao > Cc: Zhiguang Liu > Cc: Rebecca Cran > Signed-off-by: Michael Kubacki > --- > MdePkg/Library/TdxLib/Rtmr.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) >=20 > diff --git a/MdePkg/Library/TdxLib/Rtmr.c b/MdePkg/Library/TdxLib/Rtmr.c > index a0283966b353..cbf1dda7bcff 100644 > --- a/MdePkg/Library/TdxLib/Rtmr.c > +++ b/MdePkg/Library/TdxLib/Rtmr.c > @@ -51,7 +51,7 @@ TdExtendRtmr ( >=20 > ASSERT (Data !=3D NULL); > ASSERT (DataLen =3D=3D SHA384_DIGEST_SIZE); > - ASSERT (Index >=3D 0 && Index < RTMR_COUNT); > + ASSERT (Index < RTMR_COUNT); >=20 > if ((Data =3D=3D NULL) || (DataLen !=3D SHA384_DIGEST_SIZE) || (Index = >=3D > RTMR_COUNT)) { > return EFI_INVALID_PARAMETER; > -- > 2.42.0.windows.2 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#108423): https://edk2.groups.io/g/devel/message/108423 Mute This Topic: https://groups.io/mt/101198214/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/leave/12367111/7686176/19134562= 12/xyzzy [rebecca@openfw.io] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-