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 52E66941E50 for ; Wed, 6 Sep 2023 23:32:17 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=su9Y1Xw+KedQsw6Xb2i0EanBMi1Nl6sjOQPzbBWPA4g=; 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=1694043136; v=1; b=p4vHGE1syBjSat5FDtUfGOQFeVyFTIKkNdD3qs/QbEyKmX9SP/cm/ZJsA+HPSr/eUPBfqdvS gnsMwEkq/ZaLfZJMCDJqrf5MyTmXFBGLlt3nJlx9E0mhY959ofMnt18GM3sdhonbUdQ6VWo2+3k nt6WOaXQgNd1Skzuf9xl9fCA= X-Received: by 127.0.0.2 with SMTP id LB9qYY7687511x9A4CyXOQFc; Wed, 06 Sep 2023 16:32:16 -0700 X-Received: from mgamail.intel.com (mgamail.intel.com [134.134.136.65]) by mx.groups.io with SMTP id smtpd.web11.1108.1694043134952865768 for ; Wed, 06 Sep 2023 16:32:15 -0700 X-IronPort-AV: E=McAfee;i="6600,9927,10825"; a="381002781" X-IronPort-AV: E=Sophos;i="6.02,233,1688454000"; d="scan'208";a="381002781" X-Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 06 Sep 2023 16:32:13 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10825"; a="776824269" X-IronPort-AV: E=Sophos;i="6.02,233,1688454000"; d="scan'208";a="776824269" X-Received: from orsmsx601.amr.corp.intel.com ([10.22.229.14]) by orsmga001.jf.intel.com with ESMTP/TLS/AES256-GCM-SHA384; 06 Sep 2023 16:32:13 -0700 X-Received: from orsmsx611.amr.corp.intel.com (10.22.229.24) by ORSMSX601.amr.corp.intel.com (10.22.229.14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.32; Wed, 6 Sep 2023 16:32:13 -0700 X-Received: from orsmsx601.amr.corp.intel.com (10.22.229.14) by ORSMSX611.amr.corp.intel.com (10.22.229.24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.27; Wed, 6 Sep 2023 16:32:12 -0700 X-Received: from orsedg603.ED.cps.intel.com (10.7.248.4) by orsmsx601.amr.corp.intel.com (10.22.229.14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.32 via Frontend Transport; Wed, 6 Sep 2023 16:32:12 -0700 X-Received: from NAM11-DM6-obe.outbound.protection.outlook.com (104.47.57.173) by edgegateway.intel.com (134.134.137.100) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.27; Wed, 6 Sep 2023 16:32:12 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=n4Dz36wuok7nCuTscAKU8FKhI6wgIjGqZCILBidh8InDviQhlClDwYNvwTg4dkkyK9OW+XNk+2zRBowzjAWbFwMS/wXeL7cqzi3MdpkS73GAD4JHBnQn3/5Humguy+oRIBu4gClcFAL+Ea9cpXqWT8yXQsbxjcLjGWPLpx24/P/8x8bM6oH1qzO3XFZxdMwpcrV8ATvPIb1h2CepZ8lQ09O7nIQb6xMKqCYU3yqk7PvHoxWRBcpfLYPOeM9HKoqplk5tGH0QNSaciO+R4ydxJHzlhG8reIAxWZ8WL413N7VoD2dhxn4N17HWwVXAESszNpGk1BYpEZ/lBYM75oe9cw== 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=Ll0JDpO8r7/o3x7esJheU7FyivEQghM0+9WdNeRAp40=; b=NvkMWp5OJpPbB/AYpzOnIZO+yTxjcacEpaQBO2pSMsMeXsWnYSnzkruPnsed4gwFBn3nUg32OLhd0sc/qTFLK2wyb9kNIE4Q6iDUf/Y8n/ALPCpWdqDMwAYCZzUMChoq4Fhv33cg7QNjLppHPNjsUPzhtddQaHfNzT+dyIzlJSlLN1if7rgjBW16uzyZGOhZGc8KlM2CMDSF9gmxW6WPa3z4MkG2bon10sAZmTM6SfAN9rIzkX1z/zVsb2NrOsd8xoONrS4gMI47G2sv5NvCp/dI+zk6/712JJNzenIV6j9ttp1UoGfxX5ScoasHs6B1qZcuEM3871eAZanwL/iW2Q== 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 MW4PR11MB5872.namprd11.prod.outlook.com (2603:10b6:303:169::14) by CY5PR11MB6487.namprd11.prod.outlook.com (2603:10b6:930:31::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6745.34; Wed, 6 Sep 2023 23:32:10 +0000 X-Received: from MW4PR11MB5872.namprd11.prod.outlook.com ([fe80::fdf8:dc0e:db69:f35b]) by MW4PR11MB5872.namprd11.prod.outlook.com ([fe80::fdf8:dc0e:db69:f35b%4]) with mapi id 15.20.6745.034; Wed, 6 Sep 2023 23:32:10 +0000 From: "Yao, Jiewen" To: "devel@edk2.groups.io" , "mikuback@linux.microsoft.com" CC: "Kinney, Michael D" , "Gao, Liming" , "Liu, Zhiguang" , "Rebecca Cran" Subject: Re: [edk2-devel] [PATCH v1 1/1] MdePkg/Library/TdxLib: Remove unnecessary comparison Thread-Topic: [edk2-devel] [PATCH v1 1/1] MdePkg/Library/TdxLib: Remove unnecessary comparison Thread-Index: AQHZ4Ow7UVWlRfqTukeCHd/v+HDwa7AOcsnQ Date: Wed, 6 Sep 2023 23:32:10 +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: MW4PR11MB5872:EE_|CY5PR11MB6487:EE_ x-ms-office365-filtering-correlation-id: 99c010da-efe0-44c8-93a1-08dbaf317e2a 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: vpQK3s3ml2Tnt7YGRpB3b5IJTyG4XsbJPADFgTDiIt6m5YJNaz9JrrhT6/7OlZ+CdDYLIqCkU8p2kndshozFR9Ay/TnCso9TYGKX6V7gdVFn20ZcFnU92weYetzST6Te1kwBeGq1WhonGFTSwn4dhzdX3Tqs2U+6TTkxZDIYzOXTFwi1JU8xnJyt46XmxY2fHNUTOakri8JcYxzRfA44QRL0Ti3E+I9YtjTDfyiaTuhYtRyWVjNMgDJCaaZevNdFm8/3njiwUAH0I5eeAcMHfhpFqMTJrA4jDqfdEGOiIseSID+0XUk5/ZzWFqWk2tqVHtmFMMi4CYw5QP5wMQ9Rch/epkBRjgI3zZZzR79LQgtFgqkYWcADQBuwsk4ONIjC/rfZ9WHiolpuz0+PCAJSi7F1/Prv36bp5ouEdWYtm6DOlaGx5VvFf/Dl452cKb/hsPcsWKQlP4DGv2DuFpNq/AWW7WqjFi9KwHYdS6gjg4zyU61wh6DqKCuwTiv0IWLmravmynpgeaoAd13ID3MrS/MO0+RJLlJ1QOLCRFxKX5AhoCujiMefBb/6sJRsTeHLr+Tr/xXBPz1ZvLeoixNbMm9tZ5PvrMk7/b01Wd20yBdrPerfPn9pwpNKG0wMW9MsESKh46hIlzOWVDaDvuvvIQ== x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?hlhDSySu/2CiVoiRfq/VTX10nhSqUoxk+8TH8Ww3no4gNCjPr6/dnZj9ko73?= =?us-ascii?Q?1EYV/WrZVV5Nh/PDEh8crHqh4rEpuDDS7QfI91rWgG0K8hAKC0/eXxX0ksLD?= =?us-ascii?Q?lyua4w/9qeQToSYsCAe8kLIE7pwPIF6HLzjcWev2TG5do8g1RWreDSRZ5IdG?= =?us-ascii?Q?X1Do/rjgK72fTLgYLYasSOI6oPj6gl8YkkLgO9Yz6dkekzNCw/+6AzipYZ1i?= =?us-ascii?Q?VUQsXI7F5K6dXpyudohvsS/tE1FKOBYjtZVap/BvIfPdjGEynfkEzpuyMuoU?= =?us-ascii?Q?sQGVoS152No3s/leBlG/oIjEyF2O1GynHtx/a8kv9NE0LMYyAC7+fHk/eypN?= =?us-ascii?Q?en1SGH+z6Bq0cWHxQ92ue1VyYZ9iGRS6D1Gq6qM1mF1ndCDTTavrD3EDhx8W?= =?us-ascii?Q?oO2Bey0KCRMWsBiaPrMbSQ6g8f5xj/qqw6TxhjUjPqW+JWX8f5CUd1KNcAJv?= =?us-ascii?Q?HnipRq6bKrE3zvJHzUou9ieFVuSpccP63QxJTIw1iO6Dgr5H1vBryjs6e4LD?= =?us-ascii?Q?bld/t2Wpine1KhgtQi9ccug7WYDjs6ak7J9QIvTuoTFUN+u19fKTTNrQJyUu?= =?us-ascii?Q?1wOZmq6GWLus4LIzu+Inu1WtCX3t32pNCANqLS51SYxY8BzUaOZnfMRMDhIb?= =?us-ascii?Q?PZ3BkqBWHK6RN9omKtdAD6ucwdJvQ3i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ascii?Q?KxP3YLS4bnxue5xeIZm3YnCA70OfrCgm4iGRFHIF?= MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: MW4PR11MB5872.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 99c010da-efe0-44c8-93a1-08dbaf317e2a X-MS-Exchange-CrossTenant-originalarrivaltime: 06 Sep 2023 23:32:10.8007 (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: YA5W8i+AmcJUwnGC6r4Jirsm0pNB3/7U4JnZHTxrrpzc8q4fx8xBYbLY8Ar7S2UBrDDWouOIvwZwjwjN+swBMQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY5PR11MB6487 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,jiewen.yao@intel.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: X-Gm-Message-State: zEBDCfhHnOi6inExwnRZ8Cvvx7686176AA= 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=p4vHGE1s; 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: Jiewen Yao > -----Original Message----- > From: devel@edk2.groups.io On Behalf Of Michael > Kubacki > Sent: Thursday, September 7, 2023 1:34 AM > To: devel@edk2.groups.io > Cc: Kinney, Michael D ; Gao, Liming > ; Liu, Zhiguang ; Rebec= ca > Cran > Subject: [edk2-devel] [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 >=20 >=20 >=20 > -=3D-=3D-=3D-=3D-=3D-=3D > Groups.io Links: You receive all messages sent to this group. > View/Reply Online (#108335): https://edk2.groups.io/g/devel/message/10833= 5 > Mute This Topic: https://groups.io/mt/101198214/1772286 > Group Owner: devel+owner@edk2.groups.io > Unsubscribe: https://edk2.groups.io/g/devel/unsub [jiewen.yao@intel.com] > -=3D-=3D-=3D-=3D-=3D-=3D >=20 -=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 (#108346): https://edk2.groups.io/g/devel/message/108346 Mute This Topic: https://groups.io/mt/101198214/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-