From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by mx.groups.io with SMTP id smtpd.web10.201.1658361617386247814 for ; Wed, 20 Jul 2022 17:00:17 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="unable to parse pub key" header.i=@intel.com header.s=intel header.b=KhHelGsc; spf=pass (domain: intel.com, ip: 192.55.52.136, mailfrom: guo.dong@intel.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1658361617; x=1689897617; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=o5wFAeBoaBd09mX4WcNGPBV+HxduAUgJP3Eb9BGdjzw=; b=KhHelGscOzvzB6mcOnzLuRR6odTPOEJwprEHnCP9dtyTyYBDCpTC2r2I 1XW+vqVrODb/ntEAlHhKDY8rDZEcQ/Egx1JGsBuEO655Z4po9UIca2Fos 5QuhaHavgJyAJHaEQEU2pml+vBv/9RKDki1Mty347Pcg9KiHyvchmxpPt MDslWbIwIU/iTJck6KWbfg3nUHWFz1Fg8W2nRdXTHFZCAjOryx0M/z5WX 4CyaZvJvqkwV67qFwJNN5kUOa3U2wwpoK1vf2wY569Lr9t4mntUTVjiCn gJMRhlSnW6Z2793/TN3Q8BYYI+nECTS9JeRnLZWMNXz+7NqYfRML169V6 w==; X-IronPort-AV: E=McAfee;i="6400,9594,10414"; a="266688191" X-IronPort-AV: E=Sophos;i="5.92,287,1650956400"; d="scan'208";a="266688191" Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Jul 2022 17:00:08 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.92,287,1650956400"; d="scan'208";a="925434154" Received: from fmsmsx601.amr.corp.intel.com ([10.18.126.81]) by fmsmga005.fm.intel.com with ESMTP; 20 Jul 2022 17:00:08 -0700 Received: from fmsmsx608.amr.corp.intel.com (10.18.126.88) by fmsmsx601.amr.corp.intel.com (10.18.126.81) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.28; Wed, 20 Jul 2022 17:00:07 -0700 Received: from fmsmsx611.amr.corp.intel.com (10.18.126.91) by fmsmsx608.amr.corp.intel.com (10.18.126.88) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.28; Wed, 20 Jul 2022 17:00:07 -0700 Received: from fmsedg602.ED.cps.intel.com (10.1.192.136) by fmsmsx611.amr.corp.intel.com (10.18.126.91) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.27 via Frontend Transport; Wed, 20 Jul 2022 17:00:07 -0700 Received: from NAM12-DM6-obe.outbound.protection.outlook.com (104.47.59.170) by edgegateway.intel.com (192.55.55.71) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2308.27; Wed, 20 Jul 2022 17:00:07 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=W1rlkG6aGbv4kZARdtse/3mTXdmMx37bkF1DX6y16/mgZZ+Q3gkRhRKxBJfIPbqYFtC0OMYfzAMsYOWDAMNk+inOwHBWWM5MwElVgmrQm8BfeP+CvBRJEcG+vdQkZ6+nphwQoYrtXuABQGUGWIYevRMt2QymyJ05MzJhbG/8dhyG3Ocmri18Ocfe/mqugdF8gfnMaakDnvTvj13401hNaBQvk/BgZujO/47pYW65nklzXF14NVnZpitI6KhFW2CyyEVz1T2GBcjJeOnQEosZDLpGVstip9IUs5+KEiZOMICxexjegn3L+K9/jRm69kMoT6dqictECMnmFmZeH/ppjA== 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=P8EoMGNOUs/jRMzFmDJgVZPQnJejFr7tQc55BxDGdYk=; b=dQ40VEMi8btiP+x6UOssqslHeXVCWjkeDoOa7Lov5QBduAVLr35qrdChhMbgRH2MbdafcEnVEA1x/VvM4GyDpiRQYpJ8BU4y5ZV4YVXabpqEBN3DlhMXeu0Jn3CpzNRGxjRfRo3T2ZYp5uq9qrjFXRnzhMpXAkHWeLXzyJfpBsjwO/6I7j454mATgzqMTiVQZ6rO9tS1nvaK6Ru6PDAwWDwgLygkANnEzALMfjJ+/po3+R0X3M13wVySSwNEBdJ2zn59tsyOTYcCrZWm9W3j/YwPhuFhcG69Z2m7p04V/Uu7NdBGyzv3Z5uKqKhdO0j/iCqTDZzMOMkv49jGonfxhg== 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 Received: from CY5PR11MB6260.namprd11.prod.outlook.com (2603:10b6:930:23::16) by DM5PR11MB1754.namprd11.prod.outlook.com (2603:10b6:3:10a::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5438.14; Thu, 21 Jul 2022 00:00:05 +0000 Received: from CY5PR11MB6260.namprd11.prod.outlook.com ([fe80::c1dc:5921:cba3:75a0]) by CY5PR11MB6260.namprd11.prod.outlook.com ([fe80::c1dc:5921:cba3:75a0%6]) with mapi id 15.20.5458.018; Thu, 21 Jul 2022 00:00:05 +0000 From: "Guo Dong" To: "Lu, James" , "devel@edk2.groups.io" CC: "Ni, Ray" , "Guo, Gua" Subject: Re: [PATCH] UefiPayloadPkg: Fix RelaAddress type always mismatch in if condition Thread-Topic: [PATCH] UefiPayloadPkg: Fix RelaAddress type always mismatch in if condition Thread-Index: AQHYlOPf7dm/nY1Hx0Oq8BEB+9aij62G4jqAgAEdohA= Date: Thu, 21 Jul 2022 00:00:05 +0000 Message-ID: References: <6749516ae40598938d4a7447d5d607aa6ad52756.1657515840.git.james.lu@intel.com> In-Reply-To: Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-reaction: no-action dlp-version: 11.6.500.17 authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: e31687bf-ba66-4df8-3c34-08da6aabf7e3 x-ms-traffictypediagnostic: DM5PR11MB1754:EE_ x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: C408l4j8DVdRU+58XfPIWUvN9COwb+MT+cD6ULmn2bipSYnugsRh+LTgKIubbrZ4vOmAq1X/u/UE/fgs7gfyOjxRc+YxdVIsJO9t/0nrIR+GUPeJpRakbHbt+OUSJ9SEWqMP1uWFZoBxm433YY/GyzHpXCAz3Z9t6+D3lCr7LxC+rEV7QJoWXdcSC0B8mQWdQtghWIEbGVB1/d8VfgepwAHsuLg6OcxtbTpVTD5cOkrbpxi6HqlpGec0kL9adzP+LxomIBnRCaJGMm/SQFrlp8F9GgMOPAoYhM0wuQCgd0QkBKnJY0hxvRN2+oSeL0aVIgwFy4EjF4OwqH/yRgsTHZsBIPN5B32cXJopDrnnCHMKZA9AI0eux5ZEgmTAig+T2KLZKPE1zfTXmjrERYmGsUuIDA/+eveR0X02qUUequxhf5Pmn72EOYVM3JWzeka6bLH452GH1ZkMNOzDbQcC7ZmMn5YdySzxXPagtVnHJmqrgimcCEJ1sULZ9Zy5P9osZJa4eM6z2SVJ9haqWlYbrfhTF3lrzEwdPUE3Pm+YHiioVo4i4mDPjmxkYL1mNBGM7kyJK51BjiibVdOJCsxwBm3FCQmWSMGu8et41oEWJr0KJPG2t/NCAHoKlY3aLZohugWpZ+2SyFU1xK2z0yhRDQLlYekUeKck3wwgAlAiKyCfjYkNzJ+OFDVYyU00fEND+KSebL3FG6/10avQn0GgajeNv8WtwsJu6AOjvzs1Ao7GIrP/GTEnwIjSLQiIHb8SXAHv4sUXGzxblGngpuki6LFySH4gnOXOqJflHvHOk+en9R568zipe3TctHMnieJat9KULJonnqDPX1ToRO5u2g== x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:CY5PR11MB6260.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230016)(136003)(39860400002)(366004)(346002)(376002)(396003)(52536014)(8936002)(33656002)(55016003)(82960400001)(54906003)(19627235002)(5660300002)(4326008)(110136005)(66476007)(2906002)(86362001)(8676002)(66556008)(76116006)(122000001)(71200400001)(38100700002)(107886003)(66446008)(6506007)(7696005)(316002)(9686003)(53546011)(186003)(83380400001)(966005)(478600001)(41300700001)(38070700005)(64756008)(66946007);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?LPJOlnLiUNVZkUT9/1dGEI6Oos6WEGEeDVwzaxqCbbqh3K8f0wlpdYZGc5gt?= =?us-ascii?Q?4Lk10EPYXq36UIjsJUTGZEjP3nPL3Fsh/AwNR/voT9EruoOxAi58BrOacma/?= =?us-ascii?Q?hsFilpSRRTwCxai+fLivXDK6VCEvHm1Hrv3Dv+7cI63dqeXDUQeikX8qH4+n?= =?us-ascii?Q?vXc2lYlerPvDNhoTV5Z6cbXT0krgGzuXcaxBkfDrtzCRIrKfwAs+yYqAMOgj?= =?us-ascii?Q?swK7xVuQSaJBWrpBNaWpL6fupSA1D/SElBOBvhHPBKyBAX6ACCk+sInt0/q5?= =?us-ascii?Q?llkW1Pr4cG/EQXbN4a7Txwmo2VCa6A8bdRHCuOcaYSf8wbjuD8lr2gEwTMO3?= =?us-ascii?Q?oFWd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DwbOnC6U0z54ydtUL2ET+A+y9/Z+I+?= =?us-ascii?Q?n8ReLuVlSPnojTFvUq0NLWmBW9yUZeoMk0C+R/bTWFSWkLcLfk8KMfnR0DXy?= =?us-ascii?Q?Hs8NG4bRt82ZdzIGRBDiI1LMtzWu/gHsYxbKGwLzgBljeoDwCuU1Y9jI5BrX?= =?us-ascii?Q?QQikI9zmu58bk4DxyC2kD/ADntJ0LlcD3WShLZINMloObqZl4Ixhba5fjhgq?= =?us-ascii?Q?op4cSWrz4fBHAeYUCcV9ct2/dRfpsDPWhPWwrPKYwT0MX/94KOnqesidGEbG?= =?us-ascii?Q?tX+/i4qTlLte6nEEUweJ/VtkR4VwpVo88G4TSHdj73RxRBsNQknUp8l/d25j?= =?us-ascii?Q?nR0X5mEzGv9Y0l9PN901g5FPeb/cwty4Vuo9yQw93o3t2UQrtnLlkpyx3vPK?= =?us-ascii?Q?pYCsCh4yMNTN3s7ZdsxldlJLNqk/EVOPm0fSYXMbq0Ip?= MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: CY5PR11MB6260.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: e31687bf-ba66-4df8-3c34-08da6aabf7e3 X-MS-Exchange-CrossTenant-originalarrivaltime: 21 Jul 2022 00:00:05.6537 (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: rjZSJACFIky+CDIK4LDYIVKQxD0Xy9TeeGx9GPkU4eD2rAGUp+lyqWL5MeOAlYvqxhgCxrih8SvhxjzMmdVxGg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR11MB1754 Return-Path: guo.dong@intel.com X-OriginatorOrg: intel.com Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Reviewed-by: Guo Dong -----Original Message----- From: Lu, James =20 Sent: Tuesday, July 19, 2022 11:58 PM To: devel@edk2.groups.io Cc: Ni, Ray ; Dong, Guo ; Guo, Gua Subject: RE: [PATCH] UefiPayloadPkg: Fix RelaAddress type always mismatch i= n if condition Hi Ray, Any comment on this patch? Thanks, James -----Original Message----- From: Lu, James =20 Sent: Monday, July 11, 2022 1:06 PM To: devel@edk2.groups.io Cc: Lu, James ; Ni, Ray ; Dong, Guo <= guo.dong@intel.com>; Guo, Gua Subject: [PATCH] UefiPayloadPkg: Fix RelaAddress type always mismatch in if= condition From: James Lu REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3D3984 Under function RolocateElfDynamic() in Elf32Lib.c if (RelaAddress =3D=3D MA= X_UINT64) is always FALSE while RelaAddress is UINT32 Fix is to modify if = condition check to "if (RelaAddress =3D=3D MAX_UINT32)" Cc: Ray Ni Cc: Guo Dong Cc: Gua Guo Signed-off-by: James Lu --- UefiPayloadPkg/PayloadLoaderPeim/ElfLib/Elf32Lib.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/UefiPayloadPkg/PayloadLoaderPeim/ElfLib/Elf32Lib.c b/UefiPaylo= adPkg/PayloadLoaderPeim/ElfLib/Elf32Lib.c index b002c4b9cf..cb915e7142 100644 --- a/UefiPayloadPkg/PayloadLoaderPeim/ElfLib/Elf32Lib.c +++ b/UefiPayloadPkg/PayloadLoaderPeim/ElfLib/Elf32Lib.c @@ -292,7 +292,7 @@ RelocateElf32Dynamic ( } } - if (RelaAddress =3D=3D MAX_UINT64) {+ if (RelaAddress =3D=3D= MAX_UINT32) { ASSERT (RelaCount =3D=3D 0); ASSERT (RelaEntrySi= ze =3D=3D 0); ASSERT (RelaSize =3D=3D 0);--=20 2.26.2.windows.1