public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Yao, Jiewen" <jiewen.yao@intel.com>
To: "Kinney, Michael D" <michael.d.kinney@intel.com>,
	"edk2-devel@lists.01.org" <edk2-devel@lists.01.org>
Cc: "Wei, David" <david.wei@intel.com>, "Guo, Mang" <mang.guo@intel.com>
Subject: Re: [Patch] Vlv2TbltDevicePkg: Use 4K aligned PE/COFF sections
Date: Wed, 30 Nov 2016 01:47:42 +0000	[thread overview]
Message-ID: <74D8A39837DF1E4DA445A8C0B3885C50386DC7B2@shsmsx102.ccr.corp.intel.com> (raw)
In-Reply-To: <1480447327-13908-1-git-send-email-michael.d.kinney@intel.com>

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.yao@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.yao@intel.com>; Wei, David
> <david.wei@intel.com>; Guo, Mang <mang.guo@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.yao@intel.com>
> Cc: David Wei <david.wei@intel.com>
> Cc: Mang Guo <mang.guo@intel.com>
> Contributed-under: TianoCore Contribution Agreement 1.0
> Signed-off-by: Michael Kinney <michael.d.kinney@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



  reply	other threads:[~2016-11-30  1:47 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-29 19:22 [Patch] Vlv2TbltDevicePkg: Use 4K aligned PE/COFF sections Michael Kinney
2016-11-30  1:47 ` Yao, Jiewen [this message]
2016-11-30  2:15   ` Kinney, Michael D

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=74D8A39837DF1E4DA445A8C0B3885C50386DC7B2@shsmsx102.ccr.corp.intel.com \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox