From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by mx.groups.io with SMTP id smtpd.web11.9300.1645506038421035746 for ; Mon, 21 Feb 2022 21:00:38 -0800 Authentication-Results: mx.groups.io; dkim=fail reason="unable to parse pub key" header.i=@intel.com header.s=intel header.b=I27x++aJ; spf=pass (domain: intel.com, ip: 134.134.136.20, mailfrom: ray.ni@intel.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1645506038; x=1677042038; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=tkJDPKZLFzEqecCqDvKGRTkL1LcmpQTvX5BnHVC8XFs=; b=I27x++aJ2d1CjnnCDaHhSrAJkIZxZhAQLo/3S+pZ8s2Pf5zCj6BWZMQP KwAk81L14s1tyjgaFdyFWaX5Vd6VXmLeZRXZt9m0iJNaw7/ACFGMO0jMS /hJj/yv+ZJyUEFYhBBEqZ/KynH4QclqhkEK2YP7VL1lSJEZXRGMl/usa1 rxp9WBGIbEXEcRg24fk8dkjhQERXdF/ui3iIXvvgreQ1JVMcDn5kO2Sj4 DkFY8v9EU7wtdW0XgJDm9yBcoDY+72aM2dlYw8JTR5XD+qwYjYC9vG3AD gNgtLpLkwh41ZC1cRqV2Seyr+53kiC+Qux/rmAkKZXI8qUl82m1Tl34b7 w==; X-IronPort-AV: E=McAfee;i="6200,9189,10265"; a="239030189" X-IronPort-AV: E=Sophos;i="5.88,387,1635231600"; d="scan'208";a="239030189" Received: from orsmga004.jf.intel.com ([10.7.209.38]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 21 Feb 2022 21:00:37 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.88,387,1635231600"; d="scan'208";a="638773841" Received: from fmsmsx605.amr.corp.intel.com ([10.18.126.85]) by orsmga004.jf.intel.com with ESMTP; 21 Feb 2022 21:00:37 -0800 Received: from fmsmsx609.amr.corp.intel.com (10.18.126.89) by fmsmsx605.amr.corp.intel.com (10.18.126.85) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.20; Mon, 21 Feb 2022 21:00:37 -0800 Received: from fmsmsx605.amr.corp.intel.com (10.18.126.85) 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; Mon, 21 Feb 2022 21:00:36 -0800 Received: from fmsedg601.ED.cps.intel.com (10.1.192.135) by fmsmsx605.amr.corp.intel.com (10.18.126.85) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.20 via Frontend Transport; Mon, 21 Feb 2022 21:00:36 -0800 Received: from NAM11-BN8-obe.outbound.protection.outlook.com (104.47.58.173) 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.20; Mon, 21 Feb 2022 21:00:36 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=MJhrD9xnAxe8OGmOvoHUCwrotx2aL11HntbT/IU74LU1fDH/sL5h0/YOiTR52QGtjT1+Mc/nRZ5zhLyNLFeW6tU1XiRd1acflfDKahrAqTxxHuVXI50OxyurbR58HbkeHshfq+Xz0T4AJcVyRbvXxn5cTrQWNViAS+ia7bVF+NPjz203zfHjejUYc5un19eHTrHzdaUAnb+E0RCxg67rHOjHkGQl03wsRv6gBOagzsfZwGeRzeDDxRkDEEHmk7Cf/7JnLIWNSjuYTDzUdY7Sg0kL2kixCpknyP6bk0hI995/9gh5tRGJ+IbeBazc+zlvO/gBVV35xBHdQbeLXK1IAg== 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=6hkz2xLHHC0rEsi/OcjR2KjSgXqRzFM2RFN+6y/Y8ME=; b=Rvh4CKJau53LKdjc1VJkvLeb2jnC0GEDNLq1HDl38zdRDMCNx9lBRocC0pIw2E5/h5SbC/TCz6WLdgfeTjvesmoTaQW/i9qjFPGXmv443I2RU/c8Dx26XnD+5Qip3aeVHe9bNFOCNdMrNdWMBJtmATAWrEf98WGfNX4LgONIf68Qq6nvhtaqDq5ayEuC6BWmEnbJ8HnKQTBbQsa1taCvl4Cxxpr9sPSsFVUGOC/q2WIrQzko6XY1IE02+J93pomMCTaJj39RlilQYhyyF14txmH4pLGSbrCw1mPQIqhSrMSRcVdLbIuAH0sKIenj2dUzR3cpX8SCPCk+aN4LXTw0Eg== 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 MWHPR11MB1631.namprd11.prod.outlook.com (2603:10b6:301:10::10) by CO1PR11MB4946.namprd11.prod.outlook.com (2603:10b6:303:9e::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4995.14; Tue, 22 Feb 2022 05:00:35 +0000 Received: from MWHPR11MB1631.namprd11.prod.outlook.com ([fe80::99b6:d326:2925:4d2f]) by MWHPR11MB1631.namprd11.prod.outlook.com ([fe80::99b6:d326:2925:4d2f%3]) with mapi id 15.20.4995.027; Tue, 22 Feb 2022 05:00:35 +0000 From: "Ni, Ray" To: "Jiang, Guomin" , "devel@edk2.groups.io" CC: "Dong, Guo" , "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: AQHYJu6GN3Ymd+1+LU24yj/d42c7bKyfA+1g Date: Tue, 22 Feb 2022 05:00:34 +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: 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: 244d3512-7b3f-4ef9-6604-08d9f5c042b0 x-ms-traffictypediagnostic: CO1PR11MB4946: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: mjfG756jDPnFKE77xV+gMU7EUL17oOXdCtzz2PELY2SaQkcn92EU5/R65nP6oG1MPFEMmY9lbF+VOsoPIgwFN9YVF+4rWftIW0UnA2BfouXp059dduHlKpCVH9OdNJ0+r4DrUQFjOJ5MbRa4OIUNnVaPcy7Cik9aKyiKaYdlKlHIZgTZKYHkL6+sLIuH15axeXesNzspoy3HDdQy4OemkO++9KbomgOvkQoJQUjEhl1e02e1sfbSKBrs85ypK4fWY3S4ryQvujkZV6sx7dsXrDTRQbJEA1LY9DIuPL27KGgtCt0qGDCpUcT5t9FKGDoh8eCh56rPE+NcOj309xxMm5WRcQ54yRW57nAaRzLA8kcwCjzAJaTCqgkoCcy/XUcw9VmIZaF8FuYQFL/sCSpy3TwLUcU7kmuml/DqSmSbtEVRsICIOcuoh7kmsXE6XBYs3/0+reSbyGn5uUUdaXTOn9pSdDhYRe75dOakW0/3fj0mG0gsyyJGmKQ+Iqu1F5zuF/h2c4ofPzySSB9yMlPOA+LP/YxVbkMKGr6hmuZJphhEKFdpt3Gk0mF6J0+a18Bx4jGQi8hkp2a0CJis0Ad330yR9MwXyPl9epC1nuUaQlr5hNytzC9cQCRe5tKCJdD2xyyWMeb2ZoTHvAok+M53NgruK675cjj6rKQ2GWQfr+J/mwV1DUhsXNCR44KoYWUrKpeot87RosJcnT7qaxkKCADiF0FQrAX8EbbSIAHQaTMHqjJm3WxkRqfTeJKAe24ZY7CI2c1kE5YN2Iet3L7fDQkaSigVntrUwSlxBisvmXM= x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:MWHPR11MB1631.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230001)(366004)(9686003)(66946007)(4326008)(5660300002)(76116006)(33656002)(66556008)(66476007)(66446008)(64756008)(508600001)(6506007)(7696005)(110136005)(19627235002)(966005)(316002)(107886003)(83380400001)(71200400001)(52536014)(8676002)(186003)(8936002)(26005)(38100700002)(82960400001)(2906002)(55016003)(122000001)(53546011)(54906003)(86362001)(38070700005);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?lWWs2nunP+/JFLPYCmbZV+ULwY9VAcMeHCjSzty1Fk45biciWxN39EpTgOMK?= =?us-ascii?Q?pYY+4p+TpUEDDo8ahWosW/fmm5y25kWcdA5HU4splRoiDyWmUWHqcR22j5xU?= =?us-ascii?Q?YeTkp6RKVSsZWmj1JkP/33DN2tGAzWr1YlHqwhN9NwpUD0Nrz4H+C4/nS0Ob?= =?us-ascii?Q?7W8087K0z8GtqszHqQOSzECyMysDDxr0i6VEsPIMBoZNzM2vlsNP2um2KBi8?= =?us-ascii?Q?81RUatZ5CcwKa4bPG2pSYjqxLZ/rcsrzPO+WNw+IBoRHuh8+X6P6IGtieCPc?= =?us-ascii?Q?P4EM7sbFQyFw3wT/91dakeP5etWBQYdjkZP3slXyQ6bAzS6mwfkNqQR3IjbU?= =?us-ascii?Q?N9kXDtzM/X7yRtBJ51/AfmJNxaT4zMGCOwFCJJNnsK/4x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aDmR08JvT/6Ir20WtpBh9EZOzUKu+0mf/6yu?= =?us-ascii?Q?dFyDPoYhCgueAvxxvxcb3btLUn1JEYPDACLkXZNkkz+PW07pwcc01qp1F3nn?= =?us-ascii?Q?6UI4XPBlf+4DwF2nFVRIapWR3DgM4Ayo3K9T38GWcPTqPKcIX6mvR6t7ti8h?= =?us-ascii?Q?KehZeFFyCRdUOHeR4xTK1dKSXIcopW06wLUgCGbotw+YqyIGOuNNg+ZjY5dN?= =?us-ascii?Q?tKi9RrXKuId1ZtnKwUIzn+tkCP3NIxVXw7PfRpZj6NcTDbthsuQKniDk9+q7?= =?us-ascii?Q?sGz942U7XCnhsMFA+lmhEoMN/FW4gfwdmD+K1dc37hZvs7ENmnpZrfq/kO9Z?= =?us-ascii?Q?+35IWnqU3nSqfJT6J0DkPNc=3D?= MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: MWHPR11MB1631.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 244d3512-7b3f-4ef9-6604-08d9f5c042b0 X-MS-Exchange-CrossTenant-originalarrivaltime: 22 Feb 2022 05:00:34.8831 (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: yoaWbg4NA7aCzeeVHwBU87nUFTvx2M4jBRoscqXHRfuvruKUcy/OLEFcyxCPOQ1Mk5HYwNqkA9PxD4MFZdkQLg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: CO1PR11MB4946 Return-Path: ray.ni@intel.com X-OriginatorOrg: intel.com Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Reviewed-by: Ray Ni -----Original Message----- From: Jiang, Guomin =20 Sent: Monday, February 21, 2022 2: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