From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by mx.groups.io with SMTP id smtpd.web08.2847.1645656142876197848 for ; Wed, 23 Feb 2022 14:42:23 -0800 Authentication-Results: mx.groups.io; dkim=fail reason="unable to parse pub key" header.i=@intel.com header.s=intel header.b=dfmSVk+/; spf=pass (domain: intel.com, ip: 192.55.52.120, 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=1645656142; x=1677192142; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=wsKQwnex/0Ux1JJi733fUrqjl4eKFKV0c1NiGhX+SHg=; b=dfmSVk+/ybnnczHtKUZ38DidLE4h8iTji+Otv0Dv/VJBDu2LJvj8+1Ry SObsWyT3biAfcFvUlarQN0rEPhNIOk3L+Hxcq6F6QWHWqkkQQBqEYDznT Gt1rwbbMCx59jcbdeFudjXUDpqpUsAGzFkzeKENlH4HbdyR44040I0yqV 5vhTIVV/95UX/IQ+nMVFHJaNl5bL+nIvy5RdcnUxUqJ8t3z1HsQWIkTnv AekTG5KohY7k3qIvaBltxq5bV/XQBfMg8KjPmYxEHwJ4mTkiSbAms8QEa 9iWIw2/LLoj/EdrESXYeqUEwxe2fsoNJ4QiTWtZM5lyUNrXrjOLMiEmu0 Q==; X-IronPort-AV: E=McAfee;i="6200,9189,10267"; a="250925237" X-IronPort-AV: E=Sophos;i="5.88,392,1635231600"; d="scan'208";a="250925237" Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 23 Feb 2022 14:42:21 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.88,392,1635231600"; d="scan'208";a="707218787" Received: from fmsmsx603.amr.corp.intel.com ([10.18.126.83]) by orsmga005.jf.intel.com with ESMTP; 23 Feb 2022 14:42:21 -0800 Received: from fmsmsx609.amr.corp.intel.com (10.18.126.89) 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.2308.21; Wed, 23 Feb 2022 14:42:21 -0800 Received: from fmsmsx607.amr.corp.intel.com (10.18.126.87) by fmsmsx609.amr.corp.intel.com (10.18.126.89) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.20; Wed, 23 Feb 2022 14:42:20 -0800 Received: from FMSEDG603.ED.cps.intel.com (10.1.192.133) by fmsmsx607.amr.corp.intel.com (10.18.126.87) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.20 via Frontend Transport; Wed, 23 Feb 2022 14:42:20 -0800 Received: from NAM02-BN1-obe.outbound.protection.outlook.com (104.47.51.46) 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.2308.20; Wed, 23 Feb 2022 14:42:20 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=QT/a7skrNswb7BC/KkmZItCu6ysJkJ6e5gsM3aLO9sKPqhbIQ892XjRzhBsCAh98IjDewwATgtZ+fHexv8o68l3gMJ7pW7HeTMOZqAWnigN+dFnzR4baubZDnZCmL7DIVxGavGc2+br5exAatcBgRIT8UvzJKZPM43eK1aVDbHUnlj6HaUDob1SeU9Zg7fAUOJEYnMfsiFLfvwxXFKanljrleVRpBMesbTenSzKVwpj40umn/4vCTbnDw76k81z4AmM6/OXEjokH14TPzo6wf+z2M37Xoeq3vzmsNJjLwd+ZR1HSbLyVwMoSqOiiMJEdLAeMYlW4nZQ8WqxY4dHrBw== 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=6KUzEUBqhjurg+tKdRxr9vxbIjl7Afx3ZuoBraqlfTs=; b=MTRVGU39p9rkUavT53uR8Fji4RYb0YEPWHLiWjesDSUQgSC0AKPuZ96poLrqMEK7n7cjjeesAtKuqISi+jPRf28TsmArXB10Mcve/rWhGgNFpuhix8D/yXsVabJnbNCVMbKxpi2SqHf8EcL2iBvrUG4uNSoDClMpQDyWiQDNu8O5bilsoiV2SiR+c7s4SCzO7Boipxhr/uzJyXViT8bbFbdVMkN31TE4FHBIxB9YLV5s1qQ273T/g1vP8lsr24jNA3ZDdWJkc9vyaIK9M3adOxcHpdUX1Tyo0mlBbNwgqFwnZJsJnQPkJstgaMYOyr80ho8AHr6wEE0UFhooPA+ANg== 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 BYAPR11MB3622.namprd11.prod.outlook.com (2603:10b6:a03:fe::30) by BYAPR11MB3768.namprd11.prod.outlook.com (2603:10b6:a03:fa::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5017.22; Wed, 23 Feb 2022 22:42:18 +0000 Received: from BYAPR11MB3622.namprd11.prod.outlook.com ([fe80::45c8:c9c6:42a:a43d]) by BYAPR11MB3622.namprd11.prod.outlook.com ([fe80::45c8:c9c6:42a:a43d%4]) with mapi id 15.20.4995.027; Wed, 23 Feb 2022 22:42:18 +0000 From: "Guo Dong" To: "Jiang, Guomin" , "devel@edk2.groups.io" CC: "Ni, Ray" , "Ma, Maurice" , "You, Benjamin" Subject: Re: [PATCH v3 1/1] UefiPayloadPkg/PayloadLoaderPeim: Use INT64 as input parameter Thread-Topic: [PATCH v3 1/1] UefiPayloadPkg/PayloadLoaderPeim: Use INT64 as input parameter Thread-Index: AQHYJu6G3R9URR48Nk+Hu6UsDm+Wi6yhv1ZQ Date: Wed, 23 Feb 2022 22:42:18 +0000 Message-ID: References: <20220221064428.1846-1-guomin.jiang@intel.com> In-Reply-To: <20220221064428.1846-1-guomin.jiang@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.6.200.16 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: 765730b4-f6ef-486f-e16e-08d9f71dbf3d x-ms-traffictypediagnostic: BYAPR11MB3768:EE_ x-microsoft-antispam-prvs: x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: mBxtE2doXc5ruiEqzgV3QmgCitt7DZvdKFHlxT7QrGEpn3/NsJ59m6CARckBJpyVN4/l3vnIB9PWjKt1ZCfp2DfjBI/5wuHiFSKgFJR6NPko+63+ktIg02wD383JtN6IhOoAy7FYcDdFxmx+oEmHV2Iv6TNbiU/Vq3CjMm5CQn4P2c1bYD7exDx4zsbtutTtTjeGxhEZ1OLjiEi05IgjegNU3UoPZKbfXTOf0UR57uV4AJg7+lQHvzsi1h7Z4uSPZ5fYilvWjEBVlLPztb/tvwInU8yHRD7uOkkUXU3dPcZxdB9fv06sh6UJbttP9r++n3idwEsg/3321QdurGJlUJgy3fVlr2ZhmwJll7/s0EidUipdsujQ6R4pNmw+rAoUb42VdsXuMbUFB5cm9yq7otCPWNUAuDRTehyHGymxuHGuh+0eBkdPk+3leIiNTsPMd93XB0EQYD0+KUdRC1bP3JgMw8mR7PhitdTR8IPBDcJITrTAhgk0LoMfmcuzRmloRaKsvrEcd4ZJGwHcmyGdB/gMLr5/YgTCOCUR+4uckwE5fvnRQoTr+pccD9cvOIa/1KnNjPLBKrVbzwqiouQV913aYDe6qdlQ+79sU5XwQUAiuZmhSjmIA/9sQ+2+z0wpIowENVMM9lrN/Hn9iG0UiWfGJs6b3khG+TTXFybEguiwTiG5qfsdVLNpLah+rJ0I0Mjm6pw892YrdvQM3SWuBgToNze+vVa9wvvopibtfgI8RWBbUtwZPUMk5p00Ru3qy/2gKl/Nvo1GNp24RWz7pCpF9375+fp/0QTXF1epeMs= 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:(13230001)(366004)(966005)(53546011)(508600001)(7696005)(33656002)(6506007)(71200400001)(122000001)(107886003)(38100700002)(26005)(9686003)(316002)(86362001)(83380400001)(82960400001)(110136005)(54906003)(19627235002)(186003)(66446008)(52536014)(76116006)(66946007)(8936002)(5660300002)(4326008)(8676002)(64756008)(66556008)(38070700005)(66476007)(2906002)(55016003);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?zKwbedqllflAHA/26m/34Efgi5OimZGIULmO8zsG+4JOH9qyYCUI2KOweVCV?= =?us-ascii?Q?Epa1eJFfnO2WsrDR6mjLEx4ozCh71Ih5D5v/z8MPFI7bIkCTnZZ/UPqTNRB7?= =?us-ascii?Q?diP0szRzBRYEPvEaOAakFF0Dim9iw1Fw8uHFqnHjrF16oWHrY0NLoTwbdDzU?= =?us-ascii?Q?XIzlxVIuYRVjWp1paItJ3ftIPQpEjlL8IQVLrs/NZ7NKtWNb2J3yWGaZ73yu?= =?us-ascii?Q?myj7Wiy4r25l0TQCc4KvoJaCor7h6xxWZ9s/QB53U9cZRF4MXkyglj51gsj9?= =?us-ascii?Q?iNiWFBbdU4sOUgFI8i6FyyfFe5BALDIDY3oVl8WSY5GxxolKvfaoytQTn5A+?= =?us-ascii?Q?5L8RTqbbq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de2NSeT27?= =?us-ascii?Q?HpKXGEkPOKpk/i9DB+LzJNzbOL/5Dvun2cfzVf3iyqo//xLnWcjW44xQTZ6v?= =?us-ascii?Q?MVvNJi6fLkSfT4mBrF9De3IgexjkkjfwEEbUTuZVDvpTYXQeNCjINylsBf0U?= =?us-ascii?Q?rL0sewlVvZoSIFZAA8EenHcM2LqCxBqroJ7k3IjerU+r8Wyrs+qcCaR9wt59?= =?us-ascii?Q?gL678Z3vsLsoTk0Cyj7+27p1LmYsrY9Ea2lmKErMZ6/Gs/NNbfJMZ6csC9T6?= =?us-ascii?Q?lNh3+vW1wll/N74XRcHVUrLEGfbBfcPei+ECII5P+d5SlsKZwVcVutMCWgo+?= =?us-ascii?Q?nhZ1BqOyBkbOHtaCqMAyu0RcvYeW5DxZvmm8K3VVxiNd+XVbDG1pbgnnu9Zn?= =?us-ascii?Q?DAwWkPsrXgYs64M1StfQdiw=3D?= 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: 765730b4-f6ef-486f-e16e-08d9f71dbf3d X-MS-Exchange-CrossTenant-originalarrivaltime: 23 Feb 2022 22:42:18.3314 (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: 7cvrfmGpCHTPkcZP0gAJzdayskhnpe1RHJfdhMPj9AdBEo2az5QdH3sKqOqv04O3w7APQK/XfP9YOiaT4O94KQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BYAPR11MB3768 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: Jiang, Guomin =20 Sent: Sunday, February 20, 2022 11:44 PM To: devel@edk2.groups.io Cc: Dong, Guo ; Ni, Ray ; Ma, Maurice= ; You, Benjamin Subject: [PATCH v3 1/1] UefiPayloadPkg/PayloadLoaderPeim: Use INT64 as inpu= t parameter REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3D3818 It will have some potential issue when memory larger than 2G because the hi= gh memory address will be fill with 0xFFFFFFFF when do the operation of INT= N + INT64 but it is 32 bit normal data in fact. Should use same data type INT64 + INT64. V3: 1. Use INT64 as input parameter because all date type is 64 bit V2: 1. Force the data type to UINTN to avoid high dword be filled with 0xFFFFFF= FF 2. Keep INTN because the offset may postive or negative. Cc: Guo Dong Cc: Ray Ni Cc: Maurice Ma Cc: Benjamin You Signed-off-by: Guomin Jiang --- UefiPayloadPkg/PayloadLoaderPeim/ElfLib/Elf64Lib.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/UefiPayloadPkg/PayloadLoaderPeim/ElfLib/Elf64Lib.c b/UefiPaylo= adPkg/PayloadLoaderPeim/ElfLib/Elf64Lib.c index dc47a05c6e4a..c8dbb887340b 100644 --- a/UefiPayloadPkg/PayloadLoaderPeim/ElfLib/Elf64Lib.c +++ b/UefiPayloadPkg/PayloadLoaderPeim/ElfLib/Elf64Lib.c @@ -108,7 +108,7 @@ ProcessRelocation64 ( IN UINT64 RelaSize, IN UINT64 RelaEntrySize, IN UINT64 RelaType, - IN INTN Delta, + IN INT64 Delta, IN BOOLEAN DynamicLinking ) { -- 2.35.1.windows.2