From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by mx.groups.io with SMTP id smtpd.web10.26517.1680186362615505898 for ; Thu, 30 Mar 2023 07:26:02 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="unable to parse pub key" header.i=@intel.com header.s=intel header.b=WqBgx88V; spf=pass (domain: intel.com, ip: 192.55.52.136, 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=1680186362; x=1711722362; h=from:to:cc:subject:date:message-id:references: in-reply-to:mime-version; bh=98aZXxPNOl6JQ7UNi55BNZtRPI97p77RU3gf7GuI7mA=; b=WqBgx88VxGkEi4JkwdP0uHmXhpC2ENSyrXIbgGZwPfKM5O3CeejaHML+ z8QLFNW4xzSlnQ1oqhnW06zZ+DGlZEpm8jVMfAZXB3QAVxOd7yTyEf/H9 xQs22Z9WeS8eWAGEDlTjis0FNgjHjj052JA8b1GpbK5Z8niKwseU+9ZS8 hIG6+EVqYfKycfQFrS2oNrgTAX65apTQ8VLpjvW0n430rIt/wRyD5eOIi H0nmdwwwi+9Dk/iDSopz7DwSqehHybRQR1vdQpX/K400lFxIvfcy3ChrZ mE3+vayg5nRj57UPrULbGLfpgNIeB9l0ohJvpK4egwkhnVcx/xHXEO3s+ Q==; X-IronPort-AV: E=McAfee;i="6600,9927,10665"; a="320831510" X-IronPort-AV: E=Sophos;i="5.98,303,1673942400"; d="scan'208,217";a="320831510" Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 30 Mar 2023 07:25:33 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10665"; a="684722810" X-IronPort-AV: E=Sophos;i="5.98,303,1673942400"; d="scan'208,217";a="684722810" Received: from orsmsx601.amr.corp.intel.com ([10.22.229.14]) by orsmga002.jf.intel.com with ESMTP; 30 Mar 2023 07:25:32 -0700 Received: from orsmsx611.amr.corp.intel.com (10.22.229.24) by ORSMSX601.amr.corp.intel.com (10.22.229.14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.21; Thu, 30 Mar 2023 07:25:32 -0700 Received: from orsmsx610.amr.corp.intel.com (10.22.229.23) by ORSMSX611.amr.corp.intel.com (10.22.229.24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.21; Thu, 30 Mar 2023 07:25:32 -0700 Received: from orsedg603.ED.cps.intel.com (10.7.248.4) by orsmsx610.amr.corp.intel.com (10.22.229.23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.21 via Frontend Transport; Thu, 30 Mar 2023 07:25:32 -0700 Received: from NAM11-CO1-obe.outbound.protection.outlook.com (104.47.56.176) 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.2507.21; Thu, 30 Mar 2023 07:25:32 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=MatILYxyF86L2gX4X+U8bgwqa6eSC+v4KfrSdM+5tgIK45HoGIric6KjJmAqJf5kae7OLRpGZ5bqOkzxH0vcWwIzZtxFDa+PPux1J/pPV0lmnadEBU+gEBDImx2+KRX6HAlv/4XxK41TecQBsuJ/NK6EUbRM1wDiVuUzc5asq40UFfzUmTSMkC/ahfqtFLHFnORDG2KSxJOz4ipEy75ZxJKkTupWEiRaZGRVJCJuB10T6jJyu92xDc1DYuKQfk3z6nRJ6wJ0cJMOhTCl8WIfhg0ess4qelDDKcSsD6NjJ0FrBkT6pbR6ZvUp9MnqObCMaEU0FgXHxurJIKcZJh8ZiQ== 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=ZDoqej7W+vx7VQBhm28XZhuubudFGmUOp/5u4MTbgqw=; b=jctDlCt8HAq0LyLBpnnaR38zgO62pf5UgTAaBpT1+6mdtv37+Jbl57hc/ogSSknzOSr8ONjhk3dfpMPOn0sGobLgQNP5xuB79Zo5+ADgQV1r3LSB7yEOJckjWjFOD4whywu4alc8ImsSTg7Cto3lZTZsuwqxON8Dv3ZSQsylOWy7Prd0tDAJzBHL3sHxUiXDo/x846UF7q6A7z1EFTdwiM9Uaiy3i1MKjSwtTjoWNdAkLNnR0ojG5XfF5siVLbjDVHiLuwD56tN4WPz92KtSVYtIHXZ747wyDg4fKU6KKqWlbek1dXo3+59x+WauRoLHH007P7faXmUuff8OQZ10Jg== 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 MN6PR11MB8244.namprd11.prod.outlook.com (2603:10b6:208:470::14) by BL1PR11MB5464.namprd11.prod.outlook.com (2603:10b6:208:319::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6222.33; Thu, 30 Mar 2023 14:25:30 +0000 Received: from MN6PR11MB8244.namprd11.prod.outlook.com ([fe80::ae07:e96a:4a24:8a69]) by MN6PR11MB8244.namprd11.prod.outlook.com ([fe80::ae07:e96a:4a24:8a69%8]) with mapi id 15.20.6222.035; Thu, 30 Mar 2023 14:25:30 +0000 From: "Ni, Ray" To: Ard Biesheuvel , "devel@edk2.groups.io" , Rebecca Cran CC: Andrew Fish , "Kinney, Michael D" , "Liu, Zhiguang" Subject: Re: [edk2-devel] Is Xcode5ExceptionHandlerAsm.nasm still needed? Thread-Topic: [edk2-devel] Is Xcode5ExceptionHandlerAsm.nasm still needed? Thread-Index: Adli7+lrPEezFnSdTgChYnf5YhXIYQABTO8AAAIOwoAABWtxGw== Date: Thu, 30 Mar 2023 14:25:30 +0000 Message-ID: References: In-Reply-To: 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-traffictypediagnostic: MN6PR11MB8244:EE_|BL1PR11MB5464:EE_ x-ms-office365-filtering-correlation-id: fc191cff-7f2e-423f-54f0-08db312a9d9a x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: 25nt4vWJB0uFbu1rfoqCWVixsserJf09QB9/m1iVeTg3yO+/lF9hgba8uVITqy7zpnhcM4CMdW/Vx0lKbR8g7o3qwRQ2uwtyTAS7Vrw6lzD/5RRjaMAkv2vVqVB411CRSPz6k9hwRb9nFXulLTLM99HGR6QOeztBju0sXve4la8eW9UtGGsuG0RcDUcEieyh96CdNZ3kll55suiKBr5+NIB31aJVhf4R5RbVVCL1V7qFoP7eZ15HgRoYWEPG6fnMVsnglqDYhudng5dk/84vLsT4tdrED4nlt4gk7kUNyinrWXLXlCzVOzLwSlVqQrqd3q76hynAO5giFTRVxir9GZqrABI5s6RzIy2/8ueyBU/HbNsboQSX3e0+QnVfYivIvyg7xLxXaNShX1izdUufFC4BQ6kPWlKmNKQtoEHzREBL1GPZ53Z1C7TW08CIRorFCj8w3ZQgzCbDOBt38hLHweOYM25nhD5FM47yYXU7ogNvt1lrMbLE28MoMFuVUwrnlpIX0ojObx85OMKs6p9q2LX0D/E9DTI24UTq3zxw1gMgBu0EonFfWZDSTj5pdIRSg4HSnVdF3kzwSvICUc2U3o0PYUJ931GH/sDf3x1x4MYgKdMf31qOBoSRkDY86F/b x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:MN6PR11MB8244.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230028)(366004)(376002)(136003)(396003)(39860400002)(346002)(451199021)(6506007)(53546011)(33656002)(26005)(9686003)(186003)(8936002)(66446008)(52536014)(66556008)(91956017)(122000001)(66946007)(66476007)(64756008)(76116006)(316002)(110136005)(478600001)(5660300002)(55016003)(19627235002)(54906003)(8676002)(82960400001)(4326008)(41300700001)(38070700005)(7696005)(38100700002)(71200400001)(2906002)(107886003)(86362001);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?Windows-1252?Q?DrOcgO2u/gik6DHpbDedONd7tYMlHtFsvzKnxFTGBpA5PZRqGxAHG1dM?= =?Windows-1252?Q?dW+FNIoLNJO56HsvFZcmR67Q041p6PBARQsUP8ASc+PROpKRHGkRm0Wb?= =?Windows-1252?Q?YC977n6W7MaOShbqgV9fRJ07zK9yyuQzcS/kp/81Ozi4DNj2HJc7/NJ6?= =?Windows-1252?Q?QudX+icfknCMiCmJZrcJQ2kqmqvxXMRMCryBEaXTxsqvYBEn8PVbIt/g?= =?Windows-1252?Q?pcgQp24lMnUECR3Nti3cDIc/eCFjJK6H3stFsxZgH2bx0MkhLG15hNDa?= =?Windows-1252?Q?ca8d0PWuUqbOBtvOwBw1dXO2qt+QBFOvDXV/1OkET6+5+71qJwv/1eZP?= =?Windows-1252?Q?khGHv0YEDU56cpJv8VZtai37p0JvBQPz2G5EagonPW+v7kG8lgq+8oUj?= =?Windows-1252?Q?p2FQhfQBLukOJsuGAgpn9kq4khJIEHlFgMFX3h+XQTa6S5n5Y9cD73bc?= =?Windows-1252?Q?XpokB24FDp34+pPRU69IkhfS2g1adUy+9Gv8NRxFpyQuy7LuBxX1Ho/L?= =?Windows-1252?Q?j7hDW1SNwwfqIIQErPdVqVcnkAyi5oQAB9V7TMXYShGfCSIFXvul68P5?= =?Windows-1252?Q?baLPS5yd7JS0guQUjKbxbqhv7O/nrUB2AGb1zmiuWL4MJwnOqb9HdP2M?= =?Windows-1252?Q?W/CKWR92eyiMhfiJ1BT1F1ErcOs9tYWM++rPZbDBZ805mL7O/0sOCV77?= =?Windows-1252?Q?FENio0qvAsr34wO+MpbwO/lF0KbcwVqWwpQ3JMV6iJDJIew6hLHWnXu+?= =?Windows-1252?Q?tUSVDvaIYT3JxKXEDUDRzRPsnyILxMySc/qT0YLajHpPQyCJQTQ5zU5c?= =?Windows-1252?Q?n4zoY8mF4RDNPizW2saEfdMuZLF11sNKg8TAplfvA+nFrB5h5QjoQhOL?= =?Windows-1252?Q?VnUoIGcw7eiCssMmg6qxnGZz+nxama8J99FXVGEgl7wdQR0GBSsd7Hui?= =?Windows-1252?Q?+IPJnIcfKzl/1YI5deegroMgL90Jf28cj9qEqVMr07euHW8XX6DlI7Lq?= =?Windows-1252?Q?uP6EFE1NCQpeKE3OHhd7K2bRn7s8lIVnM5jPVGesvy3DVoydB3wsGaHi?= =?Windows-1252?Q?wfDRGd7fKf1/y05WMVMzK7TWOcsATua/aaCKmRIDSBBAwRDWWSW/x1Pg?= =?Windows-1252?Q?UubnVxRVykEBYwLjeWx8YhkTILr01mCJEvwcJ3GfTL2K4m9hrj7vS+Eg?= =?Windows-1252?Q?PpYuyZfqin4bJQ9+YRrmAtzNgqGtfHK5l3wCX+d6EQBHxPZBDO5mXshU?= =?Windows-1252?Q?rQw7x8f+DHcdUt2tHbsATCK3sHyhWD2g17RaU4ZnP9JyCkB4jYhU7l2J?= =?Windows-1252?Q?+OeYolT+QZbgJPCv0Dq9H8XS2IZThx4spoE6qtylX7LXLaL76jf4h6/y?= =?Windows-1252?Q?EMig0aAeCNu5tWe+7Yv1rsRjMAWHS4srtx3cxM3n7WcxXeirSeuN1AE5?= =?Windows-1252?Q?mbrbIkmc68LI6YVi1f+HDRv5Jm+fuNMlUkcOuPDDp5ojpWlrFFTkIKYH?= =?Windows-1252?Q?9ncYpUPvin2KK2r0uItj6ewpgQQ8kk5u1n23VfkKfBAbCW8FF5AzorUQ?= =?Windows-1252?Q?IqMPbjLyFQJpw1/caO9b+Yipsu/V0oVm6Uo2hKhUcWKoICoLj6cjwWtg?= =?Windows-1252?Q?0lQPkqI1ZvwyfDo+ALevG+iwjhEVUbmtuGiKxvapy2NBYUVnYTGgq09Q?= =?Windows-1252?Q?bRR9TgDfe2B1gqbmJegRwfIJ3TPqoFgXCbnoQZw75xVHx80Jv5C/8Q?= =?Windows-1252?Q?=3D=3D?= MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: MN6PR11MB8244.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: fc191cff-7f2e-423f-54f0-08db312a9d9a X-MS-Exchange-CrossTenant-originalarrivaltime: 30 Mar 2023 14:25:30.5267 (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: Djha4GYAt7Sq1f7ND1DisUa+AtFXhlUg0PQO32qC83vpNIwiVLKXHNplTK9kMpKnh9bRqD6P9XCuSLcpjowQLA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BL1PR11MB5464 Return-Path: ray.ni@intel.com X-OriginatorOrg: intel.com Content-Language: en-US Content-Type: multipart/alternative; boundary="_000_MN6PR11MB8244608E77DDA409C8CE7E5E8C8E9MN6PR11MB8244namp_" --_000_MN6PR11MB8244608E77DDA409C8CE7E5E8C8E9MN6PR11MB8244namp_ Content-Type: text/plain; charset="Windows-1252" Content-Transfer-Encoding: quoted-printable I am afraid they are not template code. That means if nx is set for data section, they can not be executed. thanks, ray ________________________________ From: Ard Biesheuvel Sent: Thursday, March 30, 2023 7:47:03 PM To: devel@edk2.groups.io ; Ni, Ray = ; Rebecca Cran Cc: Andrew Fish ; Kinney, Michael D ; Liu, Zhiguang Subject: Re: [edk2-devel] Is Xcode5ExceptionHandlerAsm.nasm still needed? (cc Rebecca) On Thu, 30 Mar 2023 at 12:48, Ard Biesheuvel wrote: > > On Thu, 30 Mar 2023 at 12:16, Ni, Ray wrote: > > > > Andrew, > > > > In UefiCpuPkg\Library\CpuExceptionHandlerLib\X64\, there are two nasm f= iles: ExceptionHandlerAsm.nasm and the other XCODE version. > > > > > > > > The major diff between the two is the second operand in =93mov rax, ASM= _PFX(CommonInterruptEntry)=94 is patched at runtime by code, instead of rel= ying on linker/loader to fix it. > > > > Can I know more background why it=92s needed for XCODE? > > > > > > > > Given Apple is switching away from X86 CPU, is the XCODE version still = needed? > > > > > > > > + Mike because I found another commit by you for bug: 565 =96 Fix X64 X= CODE5/NASM compatibility issue in UefiCpuPkg MpInitLib (tianocore.org). > > > > > > > Yes, we still need it, also for non-Xcode clang + lld > > The problem is that the little code templates use absolute addressing > to refer to the jump targets. This is necessary because these > templates are copied into the vector table, and so they are moved > independently from the code they refer to, and so relative addressing > is not an option here. > > One thing I haven't tried yet is to emit the template code into .data > instead of .text, which /should/ be fine given that the template code > is never executed directly, only the copied versions are executed. I had a quick go at this, and the change below appears to work: it moves the template code into .data, and changes the absolute references to relative ones in the code that executes from where it gets loaded. I'm not sure how to test this, though. --- a/UefiCpuPkg/Library/CpuExceptionHandlerLib/X64/ExceptionHandlerAsm.nas= m +++ b/UefiCpuPkg/Library/CpuExceptionHandlerLib/X64/ExceptionHandlerAsm.nas= m @@ -27,7 +27,6 @@ extern ASM_PFX(CommonExceptionHandler) SECTION .data DEFAULT REL -SECTION .text ALIGN 8 @@ -51,6 +50,9 @@ HookAfterStubHeaderBegin: push rax mov rax, HookAfterStubHeaderEnd jmp rax + +SECTION .text + HookAfterStubHeaderEnd: mov rax, rsp and sp, 0xfff0 ; make sure 16-byte aligned for exception context @@ -276,8 +278,7 @@ DrFinish: ; and make sure RSP is 16-byte aligned ; sub rsp, 4 * 8 + 8 - mov rax, ASM_PFX(CommonExceptionHandler) - call rax + call ASM_PFX(CommonExceptionHandler) add rsp, 4 * 8 + 8 cli @@ -384,10 +385,10 @@ DoIret: ; comments here for definition of address map global ASM_PFX(AsmGetTemplateAddressMap) ASM_PFX(AsmGetTemplateAddressMap): - mov rax, AsmIdtVectorBegin + lea rax, AsmIdtVectorBegin mov qword [rcx], rax mov qword [rcx + 0x8], (AsmIdtVectorEnd - AsmIdtVectorBegin) / 32 - mov rax, HookAfterStubHeaderBegin + lea rax, HookAfterStubHeaderBegin mov qword [rcx + 0x10], rax ret --_000_MN6PR11MB8244608E77DDA409C8CE7E5E8C8E9MN6PR11MB8244namp_ Content-Type: text/html; charset="Windows-1252" Content-Transfer-Encoding: quoted-printable
I am afraid they are not template code.
That means if nx is set for data section, they can not be = executed.


thanks,
ray

From: Ard Biesheuvel <ar= db@kernel.org>
Sent: Thursday, March 30, 2023 7:47:03 PM
To: devel@edk2.groups.io <devel@edk2.groups.io>; Ni, Ray <r= ay.ni@intel.com>; Rebecca Cran <rebecca@bsdio.com>
Cc: Andrew Fish <afish@apple.com>; Kinney, Michael D <micha= el.d.kinney@intel.com>; Liu, Zhiguang <zhiguang.liu@intel.com>
Subject: Re: [edk2-devel] Is Xcode5ExceptionHandlerAsm.nasm still ne= eded?
 
(cc Rebecca)

On Thu, 30 Mar 2023 at 12:48, Ard Biesheuvel <ardb@kernel.org> wrote:=
>
> On Thu, 30 Mar 2023 at 12:16, Ni, Ray <ray.ni@intel.com> wrote:<= br> > >
> > Andrew,
> >
> > In UefiCpuPkg\Library\CpuExceptionHandlerLib\X64\, there are two = nasm files: ExceptionHandlerAsm.nasm and the other XCODE version.
> >
> >
> >
> > The major diff between the two is the second operand in =93mov ra= x, ASM_PFX(CommonInterruptEntry)=94 is patched at runtime by code, instead = of relying on linker/loader to fix it.
> >
> > Can I know more background why it=92s needed for XCODE?
> >
> >
> >
> > Given Apple is switching away from X86 CPU, is the XCODE version = still needed?
> >
> >
> >
> > + Mike because I found another commit by you for bug: 565 =96 Fix= X64 XCODE5/NASM compatibility issue in UefiCpuPkg MpInitLib (tianocore.org= ).
> >
> >
>
>
> Yes, we still need it, also for non-Xcode clang + lld
>
> The problem is that the little code templates use absolute addressing<= br> > to refer to the jump targets. This is necessary because these
> templates are copied into the vector table, and so they are moved
> independently from the code they refer to, and so relative addressing<= br> > is not an option here.
>
> One thing I haven't tried yet is to emit the template code into .data<= br> > instead of .text, which /should/ be fine given that the template code<= br> > is never executed directly, only the copied versions are executed.

I had a quick go at this, and the change below appears to work: it
moves the template code into .data, and changes the absolute
references to relative ones in the code that executes from where it
gets loaded.

I'm not sure how to test this, though.



--- a/UefiCpuPkg/Library/CpuExceptionHandlerLib/X64/ExceptionHandlerAsm.nas= m
+++ b/UefiCpuPkg/Library/CpuExceptionHandlerLib/X64/ExceptionHandlerAsm.nas= m
@@ -27,7 +27,6 @@ extern ASM_PFX(CommonExceptionHandler)
 SECTION .data

 DEFAULT REL
-SECTION .text

 ALIGN   8

@@ -51,6 +50,9 @@ HookAfterStubHeaderBegin:
     push    rax
     mov     rax, HookAfterStubHead= erEnd
     jmp     rax
+
+SECTION .text
+
 HookAfterStubHeaderEnd:
     mov     rax, rsp
     and     sp,  0xfff0 =        ; make sure 16-byte aligned for
exception context
@@ -276,8 +278,7 @@ DrFinish:
     ; and make sure RSP is 16-byte aligned
     ;
     sub     rsp, 4 * 8 + 8
-    mov     rax, ASM_PFX(CommonExceptio= nHandler)
-    call    rax
+    call    ASM_PFX(CommonExceptionHandler)<= br>      add     rsp, 4 * 8 + 8

     cli
@@ -384,10 +385,10 @@ DoIret:
 ; comments here for definition of address map
 global ASM_PFX(AsmGetTemplateAddressMap)
 ASM_PFX(AsmGetTemplateAddressMap):
-    mov     rax, AsmIdtVectorBegin
+    lea     rax, AsmIdtVectorBegin
     mov     qword [rcx], rax
     mov     qword [rcx + 0x8],&nbs= p; (AsmIdtVectorEnd - AsmIdtVectorBegin) / 32
-    mov     rax, HookAfterStubHeaderBeg= in
+    lea     rax, HookAfterStubHeaderBeg= in
     mov     qword [rcx + 0x10], ra= x
     ret
--_000_MN6PR11MB8244608E77DDA409C8CE7E5E8C8E9MN6PR11MB8244namp_--