From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by mx.groups.io with SMTP id smtpd.web12.1639.1625027400581368476 for ; Tue, 29 Jun 2021 21:30:02 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@intel.onmicrosoft.com header.s=selector2-intel-onmicrosoft-com header.b=AhqnaaGq; spf=pass (domain: intel.com, ip: 192.55.52.115, mailfrom: guo.dong@intel.com) X-IronPort-AV: E=McAfee;i="6200,9189,10030"; a="208105947" X-IronPort-AV: E=Sophos;i="5.83,311,1616482800"; d="scan'208";a="208105947" Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 29 Jun 2021 21:29:57 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.83,311,1616482800"; d="scan'208";a="457064885" Received: from orsmsx603.amr.corp.intel.com ([10.22.229.16]) by fmsmga008.fm.intel.com with ESMTP; 29 Jun 2021 21:29:57 -0700 Received: from orsmsx609.amr.corp.intel.com (10.22.229.22) by ORSMSX603.amr.corp.intel.com (10.22.229.16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.4; Tue, 29 Jun 2021 21:29:57 -0700 Received: from orsedg603.ED.cps.intel.com (10.7.248.4) by orsmsx609.amr.corp.intel.com (10.22.229.22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.4 via Frontend Transport; Tue, 29 Jun 2021 21:29:57 -0700 Received: from NAM02-DM3-obe.outbound.protection.outlook.com (104.47.56.47) 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.2242.4; Tue, 29 Jun 2021 21:29:57 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=F9EitRRcLXQ/WVH5P+86FRw8su6tYFevRyG+ogehqSGFrCjWkusGITP541gJYo99B5Id8hNbehYGJ8no78MRZthjEDNxtQCixdfi9zfzNMOiGXPFYHQJdO7Oqiwg5PZccIvTdcVuY+FX/lHpGEJwwtyIXpAjVR3o10FkQ9lVSP1imKnRdFIILdMV9QCZjU6WcObmivC/ieMNarwyy6W7nHpqtwXF7Ge6wg+WCX5TW4lG+dPbCiIlY+XdyP3nBJnW9DvK8Sh53NFiuiLX3j0gv21e3x+g9thBJh5aE0oqnC1W3vUyqp93xE6BkpogZSSnaWeQ1dOGuxaGHRs1L2XYng== 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-SenderADCheck; bh=dNXSsD9avD8E0s8D8j1ONMAc1lTRoNmS1plLpUj5hL8=; b=C5Wc7nYfu+/5eShdVXC4mh0iJVXDQKWvwMG+iuSliuUnwAf1dV20UNW40UYM59SNB1dxHCCM+8ti+uAktWcV0J9Rikl5nMQKoc6Liqicc6HHsKxed5sdFhnZWzD684DhG3s3sl6JmO/fTWkgFLpSQ4hd0KOr71zY9iwcjVfUrDaN8c8oJ2ZE7uGBXs//qqYVEy7U9b2ylZQ3T6pghOkKoM+5luQ/Hb4m31o+T67n9g7Uqaueyk7ReE6l7gYiWiX+IX/KTadgswCdm4QZDvkoGvQXeYb6mE6qpxfPIvo1kKO8GK1BuFVTOW7UayOMUMw/8q2UI4NCVYAPZXNeWfivwg== 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 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel.onmicrosoft.com; s=selector2-intel-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=dNXSsD9avD8E0s8D8j1ONMAc1lTRoNmS1plLpUj5hL8=; b=AhqnaaGqBXMw59ZGg1rLabrNqQsQUQz+z7KQWebS3JLE57b72bgSIDD3GZESnmuy4hIfxpGZyOJIsiE6hWzdjmLLmMf0S56tWi+Kn2PwO3mSaSQg1JGoqsuSMiDos/4sCUzZqBy/suTT0G2dGSaKUGuytyLhUFsJgF8b8MwFIIA= Received: from BYAPR11MB3622.namprd11.prod.outlook.com (2603:10b6:a03:fe::30) by BYAPR11MB2726.namprd11.prod.outlook.com (2603:10b6:a02:be::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4264.20; Wed, 30 Jun 2021 04:29:56 +0000 Received: from BYAPR11MB3622.namprd11.prod.outlook.com ([fe80::247b:262c:b8da:710b]) by BYAPR11MB3622.namprd11.prod.outlook.com ([fe80::247b:262c:b8da:710b%7]) with mapi id 15.20.4264.027; Wed, 30 Jun 2021 04:29:56 +0000 From: "Guo Dong" To: "Ni, Ray" , "devel@edk2.groups.io" CC: "Ma, Maurice" , "You, Benjamin" Subject: Re: [PATCH 2/2] UefiPayloadPkg/PayloadLoader: Remove assertion Thread-Topic: [PATCH 2/2] UefiPayloadPkg/PayloadLoader: Remove assertion Thread-Index: AQHXbK/iPDmwzPsvBkSd8lTBdZd63asr98FQ Date: Wed, 30 Jun 2021 04:29:56 +0000 Message-ID: References: <20210629062707.1855-1-ray.ni@intel.com> <20210629062707.1855-3-ray.ni@intel.com> In-Reply-To: <20210629062707.1855-3-ray.ni@intel.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-reaction: no-action dlp-version: 11.5.1.3 authentication-results: intel.com; dkim=none (message not signed) header.d=none;intel.com; dmarc=none action=none header.from=intel.com; x-originating-ip: [68.104.146.79] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 7cd407c0-1a42-4f97-697a-08d93b7fb6b1 x-ms-traffictypediagnostic: BYAPR11MB2726: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:4303; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: Up0nnFvGC+HPRjr2VvKVnyhfOJoI/zYa3WFEy2KBUM2WQrYSrEsRq2eInCnBXgy/AFcT8/a3GRVK8D19VSQwCdgaGj5xtU1Pd1NNE75PbYcL6Wru9h2mfnbQxo0synkArD4rvXzGCrJLOThHgAfRSKpNluiTNuNwsGg5Tkrp9BLViD8obGBWO+XIiJMHDmKnV2oRGIGC41UBPMGil3ItnryeEzEtL7MBRd1Nx2K51oOwiglNbh3VUHkT1t3VhGlsvkzzdiVGJXBPPwrBpk7ZuRf8m0cs41UeVQX5mGdWTufrAyaZjPMvXaIolH+3FEqCZJoZKhgMOelSsC6IPZbIHV+t9xovGLjzRvyjldpXXiPq2U1fpuonRWwh/FJkrO5KFO9UhFqDiGQS0T7h/h6/kFczuHHmxAEQT7oGCFYMUyBWRRYrc6bxyW9g1tE2/Tw7PkXd9tYXY23N0h3g5lZ3JceVNNzgkFPE1/MVY57b8XIoKPj3eyRG88Lo5XiPGPOESCdPBH4ZqQiGsrJedm/553oyaN0RShAQ68BHTEJXDe7Ii14m9xxzyBZ09pYamjyN2FsyGBcFndRogc+FT7ybLUF2VH4j+QYp5j6Bf3dhGe50WpytQ1rj5FQlyhyS723ub4AMJcnfQNr9IwyNGNBKGA== x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:BYAPR11MB3622.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFS:(366004)(376002)(346002)(396003)(39860400002)(136003)(7696005)(5660300002)(2906002)(478600001)(66446008)(66556008)(66476007)(6506007)(8676002)(86362001)(8936002)(53546011)(64756008)(66946007)(76116006)(110136005)(26005)(55016002)(107886003)(9686003)(19627235002)(316002)(4326008)(83380400001)(52536014)(122000001)(38100700002)(71200400001)(186003)(54906003)(33656002);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?euE3CSR5oC9MJWmjOMgbscwj8fP18kBnD5DkmiV14ZeZiKqIsggyxgDG5PHs?= =?us-ascii?Q?RRnI7qtFUDymZdfjRo95TE+hiEmXwo2Uoevl5EHyxZULPGuIWDQOfmqfl9C0?= =?us-ascii?Q?xM6Q6K0vWM/r27xfpRhzlB6mnnWxxabyepMVMmYL/pfJFBpY/33N63kmYkDc?= =?us-ascii?Q?ZlHfuouXanRzpNvNY/K1U9T/fZ3AiQS12Q8AjPT2QBBnYhMWhjnf8AGlN8c5?= =?us-ascii?Q?wi5SF6b+PsQn2dCeCmYzIfYtT1mpD8tK0xAl/Q1weWGpeyqkcPDYB2zxwm6Z?= =?us-ascii?Q?ovGvgoAjWcfxGHyj1xKsSK6TNL6uDQBou4RHajeLNHIpsK3ts9ADjKvvNIjt?= =?us-ascii?Q?zrXmmS2hNKPbAAa6iQqoMcWmaj6UXx6ZNbcJgbwFGh7Iv0VpdAKHjEHkSi4h?= =?us-ascii?Q?E/OUARmZlUp6mG3u8BxqagdGGyoH+RtNvt0SgprCd3skAY/ZBasqmTNV1yAe?= =?us-ascii?Q?40Y1mkeALIPw4wdIzSZk7rsSXKd0JawBZRFa9SxHMXsk+Ef3Wjf56fmQ8K/o?= =?us-ascii?Q?eAshp3vjR8ZM1yY61jX7/k4Q1EwUDSvKlKOACvs+PJwL9BPfWB+iuURXLAU4?= =?us-ascii?Q?VXi0sC10GpG8zr75Yszsfb2cMhOu4VQ5c9Mh6aqNmkvjyQkv1glQ3gEAnTtx?= =?us-ascii?Q?j2wWrRSBPNGtq/pWgUFY9mVZnguNkubf3FvgWMpLwyAByTmSb7RsyHf9BibM?= =?us-ascii?Q?/Nw4+9RlhFoGECm/tfKi1jUbfEwsvFnaXcj2GheXxMTLH+dtJxVjA7F3MgrC?= =?us-ascii?Q?LXfxkmq75a8uxdafnfqp88IeTfNKJYeKUTZHEnQdyA+fBLjcauCFxOmiryTz?= =?us-ascii?Q?58OaoTfQBL/CgTCHCEzNKjH/eDAG90hNZiTK5JrgINdnyHcdLmuQtOGu1NI3?= =?us-ascii?Q?wxjSG+SS6F/ij12JQC+go0YK83/ri6zIK1s5vCaSU18F1aD05PSHBwPpkK+v?= =?us-ascii?Q?7XoOuhDy2fUrMvUUULKr1/TK49eXIQIxCIj8EdNaS0b4mqUuzx3QX71m1Loi?= =?us-ascii?Q?OKNbUtU92cvGU+FqOW5rPyEgnAbdQmB0fYuxmcMN8BSRozpzDZJcQeuLKs3/?= =?us-ascii?Q?G4bIjGNRADhcSnq6XsPCjAmH9V3ECRqnHRKAnpLIB0Sv5ZORMIUfNtxnKPez?= =?us-ascii?Q?CFqSQnhKsVKGXAUtdDt/ZxJmBOYlM0pQwz4jfoDyLR+MOAvjyFqwRFMk4Omw?= =?us-ascii?Q?t5hI3HuDbL6mnWvW/UEENXdxzqUhZIBzQbjcsP24ZSYPImcSdX6jWtw3/coN?= =?us-ascii?Q?9vrzNKxxyeFmDVeZOx1y2o1KMonjtJcold79WHOwugYXb6TWbCDcB+rGLyvK?= =?us-ascii?Q?gEtTD5cKhCg0xHT95Y259XCK?= MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: BYAPR11MB3622.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 7cd407c0-1a42-4f97-697a-08d93b7fb6b1 X-MS-Exchange-CrossTenant-originalarrivaltime: 30 Jun 2021 04:29:56.0591 (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: N8ll8d5FyqXl0hWp3YinwcumyRNrmg1gh4ZgdSwbOz7K1QX6PlhDDvo8xb9Y9+ateV+h35MP4V6t3dlfvl3YuQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BYAPR11MB2726 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: Ni, Ray > Sent: Monday, June 28, 2021 11:27 PM > To: devel@edk2.groups.io > Cc: Ma, Maurice ; Dong, Guo > ; You, Benjamin > Subject: [PATCH 2/2] UefiPayloadPkg/PayloadLoader: Remove assertion >=20 > For R_386_RELATIVE and R_X86_64_RELATIVE, today's logic assumes that > the content pointed by the Rela->r_offset is 0 but it's not always > TRUE. We observed that linker may set the content to Rela->r_addend. >=20 > The patch removes the assertion. > There is no functionality impact for this patch. >=20 > Signed-off-by: Ray Ni > Cc: Maurice Ma > Cc: Guo Dong > Cc: Benjamin You > --- > UefiPayloadPkg/PayloadLoaderPeim/ElfLib/Elf32Lib.c | 1 - > UefiPayloadPkg/PayloadLoaderPeim/ElfLib/Elf64Lib.c | 1 - > 2 files changed, 2 deletions(-) >=20 > diff --git a/UefiPayloadPkg/PayloadLoaderPeim/ElfLib/Elf32Lib.c > b/UefiPayloadPkg/PayloadLoaderPeim/ElfLib/Elf32Lib.c > index dd27d3ce59..780f2d9507 100644 > --- a/UefiPayloadPkg/PayloadLoaderPeim/ElfLib/Elf32Lib.c > +++ b/UefiPayloadPkg/PayloadLoaderPeim/ElfLib/Elf32Lib.c > @@ -164,7 +164,6 @@ ProcessRelocation32 ( > // Calculation: B + A >=20 > // >=20 > if (RelaType =3D=3D SHT_RELA) { >=20 > - ASSERT (*Ptr =3D=3D 0); >=20 > *Ptr =3D (UINT32) Delta + Rela->r_addend; >=20 > } else { >=20 > // >=20 > diff --git a/UefiPayloadPkg/PayloadLoaderPeim/ElfLib/Elf64Lib.c > b/UefiPayloadPkg/PayloadLoaderPeim/ElfLib/Elf64Lib.c > index 3f4f12903c..0f1b06e8cc 100644 > --- a/UefiPayloadPkg/PayloadLoaderPeim/ElfLib/Elf64Lib.c > +++ b/UefiPayloadPkg/PayloadLoaderPeim/ElfLib/Elf64Lib.c > @@ -173,7 +173,6 @@ ProcessRelocation64 ( > // Calculation: B + A >=20 > // >=20 > if (RelaType =3D=3D SHT_RELA) { >=20 > - ASSERT (*Ptr =3D=3D 0); >=20 > *Ptr =3D Delta + Rela->r_addend; >=20 > } else { >=20 > // >=20 > -- > 2.31.1.windows.1