From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by mx.groups.io with SMTP id smtpd.web09.50732.1658300272992247863 for ; Tue, 19 Jul 2022 23:57:53 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="unable to parse pub key" header.i=@intel.com header.s=intel header.b=cq0gAtS7; spf=pass (domain: intel.com, ip: 192.55.52.151, mailfrom: james.lu@intel.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1658300272; x=1689836272; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=NObKtZVgNo9oofhh2GSW6xyLeG6cCGUGLOHmQErv3+E=; b=cq0gAtS7ttztJ0hNH27leuCzKfH2ZZuD998j1Qx9MwN9ePEadH2BCMnN c+hS1sUz+YK4tnbwWC+9wzRpaHqBs462W9nTo8AWNP6pCvBmeNh/sit2u JQpDtLVopBylSkTWLwZ8H5DseoBjzO+DoSh/7hWuxBpQqUQRvL8NETRyK ym2B5ff0d61XNRq8yG/5aghd9bwqMjSVRcrjgdm+NwnwCOohCGrByBkJn GzBbVT1kmp6uq3e2cgca5VWz15b118eTODInHu31Xe92UOHPgvjTuWdCx ZggNKVFbdEKXGbCW9QY59/0tm+DGijqkhiCbFerAafMiD+b7E1ouaSvRI w==; X-IronPort-AV: E=McAfee;i="6400,9594,10413"; a="267096739" X-IronPort-AV: E=Sophos;i="5.92,286,1650956400"; d="scan'208";a="267096739" Received: from orsmga004.jf.intel.com ([10.7.209.38]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 Jul 2022 23:57:52 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.92,286,1650956400"; d="scan'208";a="724552828" Received: from fmsmsx604.amr.corp.intel.com ([10.18.126.84]) by orsmga004.jf.intel.com with ESMTP; 19 Jul 2022 23:57:52 -0700 Received: from fmsmsx602.amr.corp.intel.com (10.18.126.82) by fmsmsx604.amr.corp.intel.com (10.18.126.84) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.28; Tue, 19 Jul 2022 23:57:51 -0700 Received: from fmsedg601.ED.cps.intel.com (10.1.192.135) by fmsmsx602.amr.corp.intel.com (10.18.126.82) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.28 via Frontend Transport; Tue, 19 Jul 2022 23:57:51 -0700 Received: from NAM11-DM6-obe.outbound.protection.outlook.com (104.47.57.177) by edgegateway.intel.com (192.55.55.70) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2308.27; Tue, 19 Jul 2022 23:57:50 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=NhVVKYu6+gWXfrkV2MGheScdAEnQeqWKGz8gZLpCnKDoHKsDqI+C+dLxkv1L2xHe5d4hXjN1QzGfeP1Y3iRolB4o46tUR0Afd8bZiGaGk6LsNgxbUob4eRsBH9ahungfB7dWz8CGCuuS+urEX2Ks/SKu5c8nkhHzGwoL/V4bXJAxOt7hW9TLbYuQrDettVtjviVkPU7LIaFIh4cPv1ErOWqI5YFrFtNxyAKuqAxTVlzi4sjobQ+oxAjp96YiZSAkx0ZdkcY7gFt8dgpooUiYZgAwh7avVLCHFTjQJndoJ5Rtd0C/eaCrX+YS+QGaEdwLyILZVvGc6T7RNndK8fX1hw== 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=bGi4qvz9n50kzdgWpXCytTZRWq5BRlCwj7c620OS/HI=; b=dKagNlaXkxNxPDeJ8Sa4E6mLhoy48oJ8JNCOtQelh3WE8i049sdMRN7+6d3D4quVg5E8UXspyy4HhYEkpgZwBkC+gW0BrGYJ0hNpWMrMIC36OuyjrhcCJjqQazaRNWGN+jCE0SVk+JZDQifdzYsjh0kGr5K3qKlkIjEnZ8w2+ZyEaNr13iEs2hg2d3q7MoWhz564rtFhPQhaKC0Fc4i53B7/iFZ+zBaWDsUj2dApDhV8hu8hrIqiC8wqptL+fdK+wlvCAeUiO7Ta9OGKSxP0YxNzN7F9x27P2HP5SoqaSX6XJnDBh7zvT/+zXjfK0E41JPCILzbMPgZT3alEgx1SWA== 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 BN6PR11MB1908.namprd11.prod.outlook.com (2603:10b6:404:103::13) by MWHPR1101MB2080.namprd11.prod.outlook.com (2603:10b6:301:56::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5438.21; Wed, 20 Jul 2022 06:57:42 +0000 Received: from BN6PR11MB1908.namprd11.prod.outlook.com ([fe80::d980:aec4:5d03:4373]) by BN6PR11MB1908.namprd11.prod.outlook.com ([fe80::d980:aec4:5d03:4373%7]) with mapi id 15.20.5458.018; Wed, 20 Jul 2022 06:57:41 +0000 From: "Lu, James" To: "devel@edk2.groups.io" CC: "Ni, Ray" , "Dong, Guo" , "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: AQHYlOPfj4QiB6BaRkyfNzO1WXT9zK2G4h2Q Date: Wed, 20 Jul 2022 06:57:41 +0000 Message-ID: References: <6749516ae40598938d4a7447d5d607aa6ad52756.1657515840.git.james.lu@intel.com> In-Reply-To: <6749516ae40598938d4a7447d5d607aa6ad52756.1657515840.git.james.lu@intel.com> Accept-Language: en-001, en-US, zh-TW X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-reaction: no-action dlp-version: 11.6.500.17 dlp-product: dlpe-windows 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: b80899e1-b213-4762-ca26-08da6a1d23c5 x-ms-traffictypediagnostic: MWHPR1101MB2080:EE_ x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: PdY3yCEwI8w/aznvi5sXqzYZWBM5xxSYR0Ja5yTHcnrV9nP/TQtLO79fgsLzRFjSqKpyM+nBjCOZxz91r7CencmSPbD2Zw2WYq3XIJFwjR5T3k1nDk5l0firqYqs/MLUKb3JJ7XDd1Hah0Yqj2Ws85G6vS6Dskgu8tQEZ9dURVupT6xhz3RYOd8MZVGjxw10ZWGMe7pJTPW6b2/a4yX59ZAioJuh0iWnWfgb1GY6tO4qps2KyYnhScPyLtp6y/Vo1UV/yJ3PYijLf00STzyFuqLA+nsPDLtPdPEEdPA5b/mAqeT2NInoNET5it3ufP8gTukDd4BBJcGMlB0HV+0v7/m2qG1apo6SOjhtDrC1KXh+qO6veqgGIkN0ISI9BQ7S2tdeBxf1R/yLeeNg4Pc/5SPqEj9emYJ64Rf0tjWVKAURUZfaAX4piq3m3a5GJRzXNPLUrFbTDkl0/9/IfpfD328xfrfPFBflaYOdzc+E3Y3LReVRIFBFN2o7XbfgHELC9d8hUIp6t3PFEAVhk2tu2w7T4VdbEsKtC1OHxzpM2SidRtlYkIfvcWXpsET4CscTF++34J91MMQv0VQlyYzovtn7Tby9mAKpRCqGgHPJnaow6rrCQP4H4XyMRPqNc4Sa06CBYVkFJx0Q6JjGbdHHF4+GcBng04S9GxwBUMKAm6bX/fNF3DObuXxcv/i6Nsi8tbo8oP+4Ow6Qp37oS3SwNhA/+K2EYUCvphvweI/u90JB7UvplQ0mD1woMa3b0T5zXqv/Hdh0ss50ry749REFjRQNQyKzcRf+s/ZumjBJtRl2fsH7cG3JDFODIZ8DGqzqp8qBjB3c4OFcpcP4N/LOqA== x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:BN6PR11MB1908.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230016)(39860400002)(396003)(346002)(136003)(366004)(376002)(966005)(82960400001)(38100700002)(122000001)(33656002)(54906003)(71200400001)(86362001)(41300700001)(478600001)(19627235002)(186003)(6506007)(26005)(316002)(9686003)(6916009)(107886003)(55016003)(66946007)(4326008)(53546011)(76116006)(5660300002)(66476007)(66446008)(64756008)(8936002)(66556008)(8676002)(52536014)(83380400001)(7696005)(2906002)(38070700005);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?ig/vFoDVtOBzNuaoIQROsPg8HB+Bd4tfnrTGvVtwmYr68pIr1PMaND8niwzS?= =?us-ascii?Q?zbR1hronnEUS4iyH5QFv8xZ2c/GmzM8eu082+UNWX+wbr8MH691NbkU7sEOl?= =?us-ascii?Q?nVGmpILZODZv3Cu/tPdurEcSycSptTK79YLwUANKJMNffNYub2lgLOzpQ/wp?= =?us-ascii?Q?DgH/pUL0fgxrbjsFy1GngqC5q5aDHFhMmBP5mUj91PggkNdtv0bfckXjlrdc?= =?us-ascii?Q?B44S5j1VPgm17qFXIfK+MMNxaQuiHr2XWQUOdwNpyzKfHPhq5AEj++CExB2N?= =?us-ascii?Q?tjkfCOfM5WRIjXlpSr14y/3g8LMw8dRCpvz7IHD6Z9A9uLuhUx7CgOtS/w4G?= =?us-ascii?Q?RdX8bARzzQOnMwsE7D76X5ABVFmoOZv+hQSbEfMCc4zncgye94Yj9UMXepdC?= =?us-ascii?Q?iCI1QoZLmigo/YMWTWkl1ODChwkBwG7Igz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ascii?Q?Nz4uBCTutIWMOWqJAs9S787yNWLnqrgmAKJPYSaR4XfI8fGsqLnFvzY24i9U?= =?us-ascii?Q?vvZNgyH7+LiGxjsQSdAEiu0gXeDf/P5T+mg/MynH3VYHKIVNOel6ppS1oW3F?= =?us-ascii?Q?piz/RQW7yHpXeACHWxeqjf1uZVMGxgPiuqY+XgMfwmCFsZRZOHVVRYu3D5bh?= =?us-ascii?Q?xh8jeGhQugQ7Oex4Kxkjv5nx++VThyE3OasEY6S4OUQJgg6OKRLXZyKLx7m5?= =?us-ascii?Q?OoCC4CBJtGlOLznpLfE7qDMNFrk9u35HbED3LpH9?= MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: BN6PR11MB1908.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: b80899e1-b213-4762-ca26-08da6a1d23c5 X-MS-Exchange-CrossTenant-originalarrivaltime: 20 Jul 2022 06:57:41.2638 (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: yUEma2hKLUZHfaC/Mm0nuK8rxcm4N7UEqrHhzkosyciYSdunVm4dIIp2Nh1QG7jBoq+58yT3xnaLaHyyNVcwGg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR1101MB2080 Return-Path: james.lu@intel.com X-OriginatorOrg: intel.com Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable 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