From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail.byosoft.com.cn (mail.byosoft.com.cn [58.240.74.242]) by mx.groups.io with SMTP id smtpd.web12.3627.1602559600924132768 for ; Mon, 12 Oct 2020 20:26:41 -0700 Authentication-Results: mx.groups.io; dkim=missing; spf=none, err=permanent DNS error (domain: byosoft.com.cn, ip: 58.240.74.242, mailfrom: gaoliming@byosoft.com.cn) Received: from DESKTOPS6D0PVI ([58.246.60.130]) (envelope-sender ) by 192.168.6.13 with ESMTP for ; Tue, 13 Oct 2020 11:26:35 +0800 X-WM-Sender: gaoliming@byosoft.com.cn X-WM-AuthFlag: YES X-WM-AuthUser: gaoliming@byosoft.com.cn From: "gaoliming" To: , , "'Jan Bobek'" , "'Kinney, Michael D'" , "'Ard Biesheuvel'" Cc: "'Leif Lindholm'" , "'Liu, Zhiguang'" , "'Jeff Brasen'" , "'Ashish Singhal'" References: <20201001161507.48710-1-jbobek@nvidia.com> <20201001161507.48710-2-jbobek@nvidia.com> <91988ebd-49cd-4a47-1c95-0e9e970d819d@arm.com> <87blh7jmun.fsf@nvidia.com> <163D68004C6050DB.25724@groups.io> In-Reply-To: <163D68004C6050DB.25724@groups.io> Subject: =?UTF-8?B?5Zue5aSNOiBbZWRrMi1kZXZlbF0g5Zue5aSNOiBbUEFUQ0ggdjIgMS8xXSBNZGVQa2cvQmFzZUxpYjogRml4IGludmFsaWQgbWVtb3J5IGFjY2VzcyBpbiBBQXJjaDY0IFNldEp1bXAvTG9uZ0p1bXA=?= Date: Tue, 13 Oct 2020 11:26:35 +0800 Message-ID: <006901d6a110$a7e91f70$f7bb5e50$@byosoft.com.cn> MIME-Version: 1.0 X-Mailer: Microsoft Outlook 16.0 Thread-Index: AQGDLEdGDBQEp5mfPWTx6RI8D7+g/QLZLayZAoBQXT4CWqOJRAJgzDimAWOHyiGp4AUE8A== Content-Type: text/plain; charset="gb2312" Content-Transfer-Encoding: quoted-printable Content-Language: zh-cn Pull request https://github.com/tianocore/edk2/pull/1007 has been merged.= =20 > -----=D3=CA=BC=FE=D4=AD=BC=FE----- > =B7=A2=BC=FE=C8=CB: bounce+27952+66140+4905953+8761045@groups.io > =B4=FA=B1=ED gaoliming > =B7=A2=CB=CD=CA=B1=BC=E4: 2020=C4=EA10=D4=C213=C8=D5 9:10 > =CA=D5=BC=FE=C8=CB: 'Jan Bobek' ; 'Kinney, Michael D' > ; 'Ard Biesheuvel' ; > devel@edk2.groups.io > =B3=AD=CB=CD: 'Leif Lindholm' ; 'Liu, Zhiguang' > ; 'Jeff Brasen' ; 'Ashish > Singhal' > =D6=F7=CC=E2: [edk2-devel] =BB=D8=B8=B4: [PATCH v2 1/1] MdePkg/BaseLib: = Fix invalid > memory access in AArch64 SetJump/LongJump >=20 > Ack-by: Liming Gao >=20 > I will merge this change today. >=20 > Thanks > Liming > > -----=D3=CA=BC=FE=D4=AD=BC=FE----- > > =B7=A2=BC=FE=C8=CB: Jan Bobek > > =B7=A2=CB=CD=CA=B1=BC=E4: 2020=C4=EA10=D4=C213=C8=D5 2:55 > > =CA=D5=BC=FE=C8=CB: Kinney, Michael D ; Ar= d Biesheuvel > > ; devel@edk2.groups.io; Liming Gao > > > > =B3=AD=CB=CD: Leif Lindholm ; Liu, Zhiguang > > ; Jeff Brasen ; Ashish > Singhal > > > > =D6=F7=CC=E2: Re: [PATCH v2 1/1] MdePkg/BaseLib: Fix invalid memory ac= cess in > > AArch64 SetJump/LongJump > > > > Hey guys, > > > > just wondering, are we waiting for more reviews before this is good to > > merge? > > > > Best, > > -Jan > > > > Kinney, Michael D writes: > > > No concerns. > > > > > > Acked-by: Michael D Kinney > > > > > > Mike > > > > > >> -----Original Message----- > > >> From: Ard Biesheuvel > > >> Sent: Monday, October 5, 2020 7:33 AM > > >> To: Jan Bobek ; devel@edk2.groups.io; Kinney, > > Michael D ; Liming Gao > > >> > > >> Cc: Leif Lindholm ; Liu, Zhiguang > > ; Jeff Brasen ; Ashish > Singhal > > >> > > >> Subject: Re: [PATCH v2 1/1] MdePkg/BaseLib: Fix invalid memory acce= ss > in > > AArch64 SetJump/LongJump > > >> > > >> On 10/1/20 6:15 PM, Jan Bobek wrote: > > >> > Correct the memory offsets used in REG_ONE/REG_PAIR macros to > > >> > synchronize them with definition of the BASE_LIBRARY_JUMP_BUFFER > > >> > structure on AArch64. > > >> > > > >> > The REG_ONE macro declares only a single 64-bit register be > > >> > read/written; however, the subsequent offset is 16 bytes larger, > > >> > creating an unused memory gap in the middle of the structure and > > >> > causing SetJump/LongJump functions to read/write 8 bytes of memor= y > > >> > past the end of the jump buffer struct. > > >> > > > >> > Signed-off-by: Jan Bobek > > >> > > >> Thanks Jan, > > >> > > >> Reviewed-by: Ard Biesheuvel > > >> > > >> Liming, Michael: any concerns? > > >> > > >> Thanks, > > >> > > >> > > >> > --- > > >> > MdePkg/Library/BaseLib/AArch64/SetJumpLongJump.S | 8 > > ++++---- > > >> > MdePkg/Library/BaseLib/AArch64/SetJumpLongJump.asm | 8 > > ++++---- > > >> > 2 files changed, 8 insertions(+), 8 deletions(-) > > >> > > > >> > diff --git a/MdePkg/Library/BaseLib/AArch64/SetJumpLongJump.S > > b/MdePkg/Library/BaseLib/AArch64/SetJumpLongJump.S > > >> > index 72cea259e913..deefdf526b95 100644 > > >> > --- a/MdePkg/Library/BaseLib/AArch64/SetJumpLongJump.S > > >> > +++ b/MdePkg/Library/BaseLib/AArch64/SetJumpLongJump.S > > >> > @@ -20,10 +20,10 @@ GCC_ASM_EXPORT(InternalLongJump) > > >> > REG_ONE (x16, 96) /*IP0*/ > > >> > > > >> > #define FPR_LAYOUT \ > > >> > - REG_PAIR ( d8, d9, 112); \ > > >> > - REG_PAIR (d10, d11, 128); \ > > >> > - REG_PAIR (d12, d13, 144); \ > > >> > - REG_PAIR (d14, d15, 160); > > >> > + REG_PAIR ( d8, d9, 104); \ > > >> > + REG_PAIR (d10, d11, 120); \ > > >> > + REG_PAIR (d12, d13, 136); \ > > >> > + REG_PAIR (d14, d15, 152); > > >> > > > >> > #/** > > >> > # Saves the current CPU context that can be restored with a ca= ll > to > > LongJump() and returns 0.# > > >> > diff --git a/MdePkg/Library/BaseLib/AArch64/SetJumpLongJump.asm > > b/MdePkg/Library/BaseLib/AArch64/SetJumpLongJump.asm > > >> > index 20dd0f1b850f..df70f298998e 100644 > > >> > --- a/MdePkg/Library/BaseLib/AArch64/SetJumpLongJump.asm > > >> > +++ b/MdePkg/Library/BaseLib/AArch64/SetJumpLongJump.asm > > >> > @@ -19,10 +19,10 @@ > > >> > REG_ONE (x16, #96) /*IP0*/ > > >> > > > >> > #define FPR_LAYOUT \ > > >> > - REG_PAIR ( d8, d9, #112); \ > > >> > - REG_PAIR (d10, d11, #128); \ > > >> > - REG_PAIR (d12, d13, #144); \ > > >> > - REG_PAIR (d14, d15, #160); > > >> > + REG_PAIR ( d8, d9, #104); \ > > >> > + REG_PAIR (d10, d11, #120); \ > > >> > + REG_PAIR (d12, d13, #136); \ > > >> > + REG_PAIR (d14, d15, #152); > > >> > > > >> > ;/** > > >> > ; Saves the current CPU context that can be restored with a ca= ll > to > > LongJump() and returns 0.# > > >> > >=20 >=20 >=20 >=20 >=20 >=20 >=20