From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by mx.groups.io with SMTP id smtpd.web12.56166.1643756291707238659 for ; Tue, 01 Feb 2022 14:58:12 -0800 Authentication-Results: mx.groups.io; dkim=fail reason="unable to parse pub key" header.i=@intel.com header.s=intel header.b=LZFVyohq; spf=pass (domain: intel.com, ip: 134.134.136.24, mailfrom: maurice.ma@intel.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1643756291; x=1675292291; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=Ptur6QkO9V/qeFV2mnPARrmfu1PFAjy4AwQm2DBI3/M=; b=LZFVyohq2iMgA0wl2Jaj/6aUV2fc0HSLKkBjEs3Q1ApkM8pLMUQ2CsDm 5bQDobsVxH2CWxKdBnSrtTxNfnGjwKmdf5rdOkmRFvwCAH2EHdQg2l3Yr vGvlLHrd6pI9boxUDqRFaGJ9l0JtoJgmW6P/7aQCGhdwBeluvn9cSSXjp FaW98wxidm8ZP3riLed1uzo32PeJbJ3KnZcvoefcFMGsBRLaYOiFiXqtj vYblE5tgaC8Ww+FRazFWEcvygkelOemcL/r+JEEPi/2grKWkaXW8WQeMa wjfKHsdG2ni0vGW3nN8TPpVUqnTJ6WQ+dVfbJ3j7PhiIFmawrqhCGCd7O Q==; X-IronPort-AV: E=McAfee;i="6200,9189,10245"; a="247583875" X-IronPort-AV: E=Sophos;i="5.88,335,1635231600"; d="scan'208";a="247583875" Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 01 Feb 2022 14:58:11 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.88,335,1635231600"; d="scan'208";a="599377481" Received: from orsmsx602.amr.corp.intel.com ([10.22.229.15]) by fmsmga004.fm.intel.com with ESMTP; 01 Feb 2022 14:58:10 -0800 Received: from orsmsx608.amr.corp.intel.com (10.22.229.21) by ORSMSX602.amr.corp.intel.com (10.22.229.15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.20; Tue, 1 Feb 2022 14:58:10 -0800 Received: from ORSEDG602.ED.cps.intel.com (10.7.248.7) by orsmsx608.amr.corp.intel.com (10.22.229.21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.20 via Frontend Transport; Tue, 1 Feb 2022 14:58:10 -0800 Received: from NAM11-CO1-obe.outbound.protection.outlook.com (104.47.56.174) by edgegateway.intel.com (134.134.137.103) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2308.20; Tue, 1 Feb 2022 14:58:09 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=KJ/8QKY2yUtgJhpLFDCY2VGlIXRKhavBuOV1Awkzm01ZyYipDtWIFx5mgPxD3JqfAiVe8g64Uwzrv87FppGQihdfyufJeoOggiyNisjfvMGAT770gb25qE+ic3SxLiVElTu1aI9eMtcpc1vkfgXxpOul4cslNA8zx8E14uAeABkducKVPkpwu0eYXimDU4RuzjScHSmtZzjXXHKf9mbY5qcs93UM3vtFrjaoOONIsttUaps/t6fEzF/l2BWyhViplkMzgFn48M/qwwt2SNu6e2Me9bbJVRbClUztb9n6uqyfWLPFSgrnAerf+5nJfpormqV2E9cvoZ4PL3Y/mNdwVA== 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=Qpd4pYbxcGcT3JOSRteK7a0HMPcLaE+KqmLS/k4oMmQ=; b=i9s+/wcaynFRij174MokofSYuc53PgAvzI4od50vye+wUH6O5X7ezUsmbVFelC3GYIBCln9nwKli+sJEg55L1BvkM+oBb1hmRpBfZWkw20raCY0vljfaV2Gkgbh06Gv0DtzAtv/wnVTLRxMFGSPSI4DxbCFqgPp5JMYOA7Ff3RYxKxlmd65stHis8rYoi24TtzfUSoXt4bVtLGG0SvVo8Ojk5uPqv4a6ppPCVDXuL+4C32x4VTmrr+mklQ0qvbtTuoh7jYj/U1qheXGNvzmaT5SZkFTq8X1lQV+vDGbrcjmwqFzI6ystJBdCGrVi2FaoEEnWu/BSTudbvY3ZUY7oVQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none Received: from CO1PR11MB4945.namprd11.prod.outlook.com (2603:10b6:303:9c::8) by BYAPR11MB2935.namprd11.prod.outlook.com (2603:10b6:a03:82::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4951.11; Tue, 1 Feb 2022 22:58:03 +0000 Received: from CO1PR11MB4945.namprd11.prod.outlook.com ([fe80::c9d4:be7:7abc:48c0]) by CO1PR11MB4945.namprd11.prod.outlook.com ([fe80::c9d4:be7:7abc:48c0%4]) with mapi id 15.20.4951.012; Tue, 1 Feb 2022 22:58:03 +0000 From: "Ma, Maurice" To: "Jiang, Guomin" , "devel@edk2.groups.io" CC: "Dong, Guo" , "Ni, Ray" , "You, Benjamin" Subject: Re: [PATCH 1/1] UefiPayloadPkg/PayloadLoaderPeim: Replace Delta type INTN with UINTN Thread-Topic: [PATCH 1/1] UefiPayloadPkg/PayloadLoaderPeim: Replace Delta type INTN with UINTN Thread-Index: AQHYFOqDxpUHVOOfAkCJI8VrNN1rLKx/Ubjw Date: Tue, 1 Feb 2022 22:58:03 +0000 Message-ID: References: <20220129083032.524-1-guomin.jiang@intel.com> In-Reply-To: <20220129083032.524-1-guomin.jiang@intel.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-version: 11.6.200.16 dlp-reaction: no-action 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: 38ba737c-a7de-44f6-2cce-08d9e5d64d59 x-ms-traffictypediagnostic: BYAPR11MB2935:EE_ x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:4125; x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: Z8rA24btPlfCdk319BUIcGv7v8L78biDK/FWnsggzoJ7ajJxS0XNYmF7u748iVe8elY7g6IUxE3fxkLSafBqQzksFXof8MEQqsIQvRAcDyGnwbnh7nor8UHsztP2tfbdWxAzJJOrplhQnBrxcCj/by5zj9D2tKdkmeV4lfDWXeRftgQkiE4XlqZhW1N0NVKCw7BB/h8p/n/WUNTKmknYNVC/+eag5outBjgNA0SDps0pH2IjroQ85pLwPmn+JTFqPXlMTeiGKtTygKMGS5I+Dxifgj2xPyyKSr0e1wlFkQCnfa0PH+xPDt1urLfhNcfFWDuZTPiGlw+Ffg/ye7jGEbRL822hATfqfbK6BQzqeDUC6AJJF9KH/sMWbxk6wH05+ZMQmfwPMRsZrSbbqSA689OJ+sxXjfX/c2gZPfw5LHiy12C3GNi9MMVprkvIH9RRH01h1xflHXUQdC1A9p+l3P8gDcCEWW8p8vzrXIPd6C/U7ZujoojMn2tNFbdtTzgOKxHdrF5vgtrgvAuSoIZnpWAGTtj0ZVUf4jns2h8xo86ZfaESI7nKFrSdfNXYhDUBghB7FtTcNQ69/Pf6iP/J8vlU9bTU6rMcFAYX8wfFRPNbq9cAGhYQRhYR3goa3ry4QfxID/CHt55iPY0wn+JkwmeQqtfpMzmK0tSrc3h7UYbQacxSa0BCQNcy8sc2OUjsTqXI4ykNbBWCJItHRVpTDVeBYpSz0KyOSUwoMck5lk64x9ulGwsZbjrpMkVN2GiUA0fFMAsEql2x6ox0HNIeBi7xublayd2yo1mzKJa+j0s= x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:CO1PR11MB4945.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230001)(366004)(86362001)(966005)(508600001)(64756008)(5660300002)(66476007)(4326008)(33656002)(66446008)(66556008)(83380400001)(66946007)(8936002)(52536014)(38070700005)(2906002)(8676002)(76116006)(54906003)(122000001)(19627235002)(26005)(82960400001)(38100700002)(7696005)(6506007)(53546011)(71200400001)(55016003)(107886003)(9686003)(186003)(316002)(110136005);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?8YVft39zo1ahsl2QUfLcOhM80a3L79xxkHawqvGwOjvREjp2BYUC11JMGzBy?= =?us-ascii?Q?GN8MS96HUx/lQJtvcU1W8+6+U+DMZW5GZmiyYm/AQGUqaz/PMCCraFSFG/YE?= =?us-ascii?Q?KOpQk6ZvF41bEysAWEDh3T/BtBb8SNkUuWuHIvnV3znts9liSPKc50HuICAN?= =?us-ascii?Q?hy1E2NDvgEndwbWI8OTUtBLIXqd1QuEuL6Z+uki+FxIz7CLtNmjfJOrNEaHt?= =?us-ascii?Q?PEKdyxWbxMo2Cf0Auxkqpw8T1nBx8YgRTSQF8of5ThLzc3MwkJWTWFE5IiM2?= =?us-ascii?Q?PjTx4soTLU0TjqsCnkEZtQJkvgfl4Jj6QpauX9qIHoyURmsclQymebFdQvMf?= =?us-ascii?Q?VeFS+NifsYkv1AhmB/pGqkhlJYThK/6wrrkyuQkVj3X1khyu92RiMaAY3VA0?= =?us-ascii?Q?mthBO72hFZYxlPRvZ+aIpgrXuRtaIzYSGmzHh4D/eS762snQb3c+kj84Dw8N?= =?us-ascii?Q?IIvkWmXV8SXCITGjDsucs5Ggjtvd/FSkceU1lgB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B/Mr9EzHIOUsmPyX/BcKlzxQAZt5PknouQPf5ZWWHFVtX9U29Q?= =?us-ascii?Q?ET2auCnPFbDKdVr2HNn0f67l9/w9Sudec8LQE6xAvJfe96yqz7HVZJdvpk9c?= =?us-ascii?Q?izh4/7sL/GAP/2adHr463nO1F2csQwhOC9Efn/JbGBlM9K9T9RJ+F71Z8uf/?= =?us-ascii?Q?gxxG2BfEHLjV7lD8Mr20BhPNCko3pjmT6+IitV4pB3AASemLlehScLP7Rclo?= =?us-ascii?Q?yg=3D=3D?= MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: CO1PR11MB4945.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 38ba737c-a7de-44f6-2cce-08d9e5d64d59 X-MS-Exchange-CrossTenant-originalarrivaltime: 01 Feb 2022 22:58:03.2775 (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: XeikueFaksFtmY6VZ8hI61+y1oHDVB7DkaixK86Fj5svtYH0d3hHFlPO0m3mm3OmqGFwzouWldPR7YT5B64VVw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BYAPR11MB2935 Return-Path: maurice.ma@intel.com X-OriginatorOrg: intel.com Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Shouldn't "Delta" be INTN type ? It can be either positive or negative, ri= ght ? For the case you explained below, I think the caller should pass in INTN t= ype instead of UINTN. =20 So maybe a better fix is to change "UINTN Delta" to "INTN Delta" in t= he caller function RelocateElf64Sections() inside file UefiPayloadPkg\Paylo= adLoaderPeim\ElfLib\Elf64Lib.c. Thanks Maurice > -----Original Message----- > From: Jiang, Guomin > Sent: Saturday, January 29, 2022 0:31 > To: devel@edk2.groups.io > Cc: Dong, Guo ; Ni, Ray ; Ma, > Maurice ; You, Benjamin > > Subject: [PATCH 1/1] UefiPayloadPkg/PayloadLoaderPeim: Replace Delta > type INTN with UINTN >=20 > REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3D3818 >=20 > ProcessRelocation64 use INTN Delta. However it force it to UINTN when ca= ll > it. >=20 > It will have some potential issue when memory larger than 2G because the > high memory address will be fill with 0xFFFFFFFF if use INTN. >=20 > 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(-) >=20 > diff --git a/UefiPayloadPkg/PayloadLoaderPeim/ElfLib/Elf64Lib.c > b/UefiPayloadPkg/PayloadLoaderPeim/ElfLib/Elf64Lib.c > index dc47a05c6e4a..ee530322d7ed 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 UINTN Delta, > IN BOOLEAN DynamicLinking > ) > { > -- > 2.30.0.windows.2