[edk2-devel] [PATCH v5 1/2] MdePkg/Include: Add CET instructions to Nasm.inc

Michael D Kinney michael.d.kinney at intel.com
Tue Feb 23 02:21:30 UTC 2021


Liming,

I thought we decided against adding macros and instead want to use newer NASM version that supports these instructions.

Mike

> -----Original Message-----
> From: gaoliming <gaoliming at byosoft.com.cn>
> Sent: Monday, February 22, 2021 5:01 PM
> To: devel at edk2.groups.io; Liu, Zhiguang <zhiguang.liu at intel.com>; Sheng, W <w.sheng at intel.com>
> Cc: Kinney, Michael D <michael.d.kinney at intel.com>; Yao, Jiewen <jiewen.yao at intel.com>
> Subject: 回复: [edk2-devel] [PATCH v5 1/2] MdePkg/Include: Add CET instructions to Nasm.inc
> 
> Wei:
>   This is a patch set. If all patches pass the review by the package maintainer, I will help merge it.
> 
>   Seemly, this is a bug fix. So, it can still be merged in 202102 stable tag soft feature freeze phase.
> 
> Thanks
> Liming
> > -----邮件原件-----
> > 发件人: bounce+27952+71908+4905953+8761045 at groups.io
> > <bounce+27952+71908+4905953+8761045 at groups.io> 代表 Zhiguang Liu
> > 发送时间: 2021年2月22日 10:23
> > 收件人: Sheng, W <w.sheng at intel.com>; gaoliming
> > <gaoliming at byosoft.com.cn>; devel at edk2.groups.io
> > 抄送: Kinney, Michael D <michael.d.kinney at intel.com>; Yao, Jiewen
> > <jiewen.yao at intel.com>
> > 主题: Re: [edk2-devel] [PATCH v5 1/2] MdePkg/Include: Add CET instructions
> > to Nasm.inc
> >
> > Hi Sheng Wei,
> > I don't have the access to push patch.
> >
> > Hi Liming,
> > Can you help merge this patch? Thanks
> >
> > Thanks
> > Zhiguang
> >
> > > -----Original Message-----
> > > From: Sheng, W <w.sheng at intel.com>
> > > Sent: Monday, February 22, 2021 10:12 AM
> > > To: gaoliming <gaoliming at byosoft.com.cn>; devel at edk2.groups.io; Liu,
> > > Zhiguang <zhiguang.liu at intel.com>
> > > Cc: Kinney, Michael D <michael.d.kinney at intel.com>; Yao, Jiewen
> > > <jiewen.yao at intel.com>
> > > Subject: RE: [edk2-devel] [PATCH v5 1/2] MdePkg/Include: Add CET
> > > instructions to Nasm.inc
> > >
> > > Hi Zhiguang,
> > > Could you help to merge the patch to the master branch ?
> > >
> > > @gaoliming
> > > Thank you for giving the review-by.
> > > BR
> > > Sheng Wei
> > >
> > > > -----Original Message-----
> > > > From: gaoliming <gaoliming at byosoft.com.cn>
> > > > Sent: 2021年2月20日 13:35
> > > > To: devel at edk2.groups.io; Sheng, W <w.sheng at intel.com>
> > > > Cc: Kinney, Michael D <michael.d.kinney at intel.com>; Liu, Zhiguang
> > > > <zhiguang.liu at intel.com>; Yao, Jiewen <jiewen.yao at intel.com>
> > > > Subject: 回复: [edk2-devel] [PATCH v5 1/2] MdePkg/Include: Add CET
> > > > instructions to Nasm.inc
> > > >
> > > > Reviewed-by: Liming Gao <gaoliming at byosoft.com.cn>
> > > >
> > > > > -----邮件原件-----
> > > > > 发件人: bounce+27952+71865+4905953+8761045 at groups.io
> > > > > <bounce+27952+71865+4905953+8761045 at groups.io> 代表 Sheng
> > Wei
> > > > > 发送时间: 2021年2月20日 11:15
> > > > > 收件人: devel at edk2.groups.io
> > > > > 抄送: Michael D Kinney <michael.d.kinney at intel.com>; Liming Gao
> > > > > <gaoliming at byosoft.com.cn>; Zhiguang Liu <zhiguang.liu at intel.com>;
> > > > > Jiewen Yao <jiewen.yao at intel.com>
> > > > > 主题: [edk2-devel] [PATCH v5 1/2] MdePkg/Include: Add CET
> > instructions
> > > > > to Nasm.inc
> > > > >
> > > > > This is to add instruction SAVEPREVSSP, CLRSSBSY and RSTORSSP_RAX in
> > > > > Nasm.
> > > > > The open CI is using NASM 2.14.02.
> > > > > CET instructions are supported since NASM 2.15.01.
> > > > >
> > > > > DB-encoded CET instructions need to be removed after open CI update
> > > > > to NASM 2.15.01.
> > > > > The BZ ticket is https://bugzilla.tianocore.org/show_bug.cgi?id=3227 .
> > > > >
> > > > > REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3192
> > > > >
> > > > > Signed-off-by: Sheng Wei <w.sheng at intel.com>
> > > > > Cc: Michael D Kinney <michael.d.kinney at intel.com>
> > > > > Cc: Liming Gao <gaoliming at byosoft.com.cn>
> > > > > Cc: Zhiguang Liu <zhiguang.liu at intel.com>
> > > > > Cc: Jiewen Yao <jiewen.yao at intel.com>
> > > > > ---
> > > > >  MdePkg/Include/Ia32/Nasm.inc | 12 ++++++++++++
> > > > > MdePkg/Include/X64/Nasm.inc  | 12 ++++++++++++
> > > > >  2 files changed, 24 insertions(+)
> > > > >
> > > > > diff --git a/MdePkg/Include/Ia32/Nasm.inc
> > > > > b/MdePkg/Include/Ia32/Nasm.inc index 31ce861f1e..fa42f9d3e9
> > 100644
> > > > > --- a/MdePkg/Include/Ia32/Nasm.inc
> > > > > +++ b/MdePkg/Include/Ia32/Nasm.inc
> > > > > @@ -9,6 +9,18 @@
> > > > >  ;
> > > > >
> > > > ;---------------------------------------------------------------------
> > > > ------
> > > > ---
> > > > >
> > > > > +%macro SAVEPREVSSP     0
> > > > > +    DB 0xF3, 0x0F, 0x01, 0xEA
> > > > > +%endmacro
> > > > > +
> > > > > +%macro CLRSSBSY_EAX    0
> > > > > +    DB 0x67, 0xF3, 0x0F, 0xAE, 0x30 %endmacro
> > > > > +
> > > > > +%macro RSTORSSP_EAX    0
> > > > > +    DB 0x67, 0xF3, 0x0F, 0x01, 0x28 %endmacro
> > > > > +
> > > > >  %macro SETSSBSY        0
> > > > >      DB 0xF3, 0x0F, 0x01, 0xE8
> > > > >  %endmacro
> > > > > diff --git a/MdePkg/Include/X64/Nasm.inc
> > > > b/MdePkg/Include/X64/Nasm.inc
> > > > > index 42412735ea..e57a803c81 100644
> > > > > --- a/MdePkg/Include/X64/Nasm.inc
> > > > > +++ b/MdePkg/Include/X64/Nasm.inc
> > > > > @@ -9,6 +9,18 @@
> > > > >  ;
> > > > >
> > > > ;---------------------------------------------------------------------
> > > > ------
> > > > ---
> > > > >
> > > > > +%macro SAVEPREVSSP     0
> > > > > +    DB 0xF3, 0x0F, 0x01, 0xEA
> > > > > +%endmacro
> > > > > +
> > > > > +%macro CLRSSBSY_RAX    0
> > > > > +    DB 0xF3, 0x0F, 0xAE, 0x30
> > > > > +%endmacro
> > > > > +
> > > > > +%macro RSTORSSP_RAX    0
> > > > > +    DB 0xF3, 0x0F, 0x01, 0x28
> > > > > +%endmacro
> > > > > +
> > > > >  %macro SETSSBSY        0
> > > > >      DB 0xF3, 0x0F, 0x01, 0xE8
> > > > >  %endmacro
> > > > > --
> > > > > 2.16.2.windows.1
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > >
> > > >
> >
> >
> >
> > 
> >
> 
> 



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#72018): https://edk2.groups.io/g/devel/message/72018
Mute This Topic: https://groups.io/mt/80842757/1813853
Group Owner: devel+owner at edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [edk2-devel-archive at redhat.com]
-=-=-=-=-=-=-=-=-=-=-=-






More information about the edk2-devel-archive mailing list