HI Mike I agree on this change. But I would like to mention that the protection does not takes effect, until all VLV2 binary uses this build option, too.
We should feedback to VLV2 binary provider as well. Reviewed-by: jiewen....@intel.com Thank you Yao Jiewen > -----Original Message----- > From: Kinney, Michael D > Sent: Wednesday, November 30, 2016 3:22 AM > To: edk2-devel@lists.01.org > Cc: Yao, Jiewen <jiewen....@intel.com>; Wei, David > <david....@intel.com>; Guo, Mang <mang....@intel.com> > Subject: [Patch] Vlv2TbltDevicePkg: Use 4K aligned PE/COFF sections > > Update [BuildOptions] to use of 4K aligned PE/COFF > image sections to support page level protection of > DXE_RUNTIME_DRIVER, SMM_CORE, and DXE_SMM_DRIVER > modules. > > Cc: Jiewen Yao <jiewen....@intel.com> > Cc: David Wei <david....@intel.com> > Cc: Mang Guo <mang....@intel.com> > Contributed-under: TianoCore Contribution Agreement 1.0 > Signed-off-by: Michael Kinney <michael.d.kin...@intel.com> > --- > Vlv2TbltDevicePkg/PlatformPkgGccX64.dsc | 16 ++++++++++++++++ > Vlv2TbltDevicePkg/PlatformPkgIA32.dsc | 16 ++++++++++++++++ > Vlv2TbltDevicePkg/PlatformPkgX64.dsc | 16 ++++++++++++++++ > 3 files changed, 48 insertions(+) > > diff --git a/Vlv2TbltDevicePkg/PlatformPkgGccX64.dsc > b/Vlv2TbltDevicePkg/PlatformPkgGccX64.dsc > index c3dc25f..6da2a8a 100644 > --- a/Vlv2TbltDevicePkg/PlatformPkgGccX64.dsc > +++ b/Vlv2TbltDevicePkg/PlatformPkgGccX64.dsc > @@ -1676,6 +1676,22 @@ > $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)$(TARGET)/IA32/fT > PMInitPeim.inf > INTEL:*_*_X64_GENFW_FLAGS = --keepexceptiontable > !endif > > +# > +# Force PE/COFF sections to be aligned at 4KB boundaries to support page > level > +# protection of DXE_RUNTIME_DRIVER modules > +# > +[BuildOptions.common.EDKII.DXE_RUNTIME_DRIVER] > + MSFT:*_*_*_DLINK_FLAGS = /ALIGN:4096 > + GCC:*_*_*_DLINK_FLAGS = -z common-page-size=0x1000 > + > +# > +# Force PE/COFF sections to be aligned at 4KB boundaries to support page > level > +# protection of DXE_SMM_DRIVER/SMM_CORE modules > +# > +[BuildOptions.common.EDKII.DXE_SMM_DRIVER, > BuildOptions.common.EDKII.SMM_CORE] > + MSFT:*_*_*_DLINK_FLAGS = /ALIGN:4096 > + GCC:*_*_*_DLINK_FLAGS = -z common-page-size=0x1000 > + > [BuildOptions.Common.EDK] > > # > diff --git a/Vlv2TbltDevicePkg/PlatformPkgIA32.dsc > b/Vlv2TbltDevicePkg/PlatformPkgIA32.dsc > index 3a5776a..5b5523f 100644 > --- a/Vlv2TbltDevicePkg/PlatformPkgIA32.dsc > +++ b/Vlv2TbltDevicePkg/PlatformPkgIA32.dsc > @@ -1659,6 +1659,22 @@ > $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)$(TARGET)/IA32/fT > PMInitPeim.inf > > !endif > > +# > +# Force PE/COFF sections to be aligned at 4KB boundaries to support page > level > +# protection of DXE_RUNTIME_DRIVER modules > +# > +[BuildOptions.common.EDKII.DXE_RUNTIME_DRIVER] > + MSFT:*_*_*_DLINK_FLAGS = /ALIGN:4096 > + GCC:*_*_*_DLINK_FLAGS = -z common-page-size=0x1000 > + > +# > +# Force PE/COFF sections to be aligned at 4KB boundaries to support page > level > +# protection of DXE_SMM_DRIVER/SMM_CORE modules > +# > +[BuildOptions.common.EDKII.DXE_SMM_DRIVER, > BuildOptions.common.EDKII.SMM_CORE] > + MSFT:*_*_*_DLINK_FLAGS = /ALIGN:4096 > + GCC:*_*_*_DLINK_FLAGS = -z common-page-size=0x1000 > + > [BuildOptions.Common.EDK] > > # > diff --git a/Vlv2TbltDevicePkg/PlatformPkgX64.dsc > b/Vlv2TbltDevicePkg/PlatformPkgX64.dsc > index 83cbb0a..54d2b81 100644 > --- a/Vlv2TbltDevicePkg/PlatformPkgX64.dsc > +++ b/Vlv2TbltDevicePkg/PlatformPkgX64.dsc > @@ -1668,6 +1668,22 @@ > $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)$(TARGET)/IA32/fT > PMInitPeim.inf > > !endif > > +# > +# Force PE/COFF sections to be aligned at 4KB boundaries to support page > level > +# protection of DXE_RUNTIME_DRIVER modules > +# > +[BuildOptions.common.EDKII.DXE_RUNTIME_DRIVER] > + MSFT:*_*_*_DLINK_FLAGS = /ALIGN:4096 > + GCC:*_*_*_DLINK_FLAGS = -z common-page-size=0x1000 > + > +# > +# Force PE/COFF sections to be aligned at 4KB boundaries to support page > level > +# protection of DXE_SMM_DRIVER/SMM_CORE modules > +# > +[BuildOptions.common.EDKII.DXE_SMM_DRIVER, > BuildOptions.common.EDKII.SMM_CORE] > + MSFT:*_*_*_DLINK_FLAGS = /ALIGN:4096 > + GCC:*_*_*_DLINK_FLAGS = -z common-page-size=0x1000 > + > [BuildOptions.Common.EDK] > > # > -- > 2.6.3.windows.1 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel