Revision: 15866
          http://sourceforge.net/p/edk2/code/15866
Author:   oliviermartin
Date:     2014-08-21 09:23:58 +0000 (Thu, 21 Aug 2014)
Log Message:
-----------
MdePkg: Introduced BaseStackCheckLib (cont.)

Liming proposed different changes compare to the latest patch.
This commit ensures the changes goes in his direction.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Andrew Fish <[email protected]>
Signed-off-by: Olivier Martin <[email protected]
Reviewed-by: Gao, Liming <[email protected]>

Modified Paths:
--------------
    trunk/edk2/MdePkg/Library/BaseStackCheckLib/BaseStackCheckGcc.c
    trunk/edk2/MdePkg/Library/BaseStackCheckLib/BaseStackCheckLib.inf
    trunk/edk2/MdePkg/MdePkg.dec
    trunk/edk2/MdePkg/MdePkg.dsc

Modified: trunk/edk2/MdePkg/Library/BaseStackCheckLib/BaseStackCheckGcc.c
===================================================================
--- trunk/edk2/MdePkg/Library/BaseStackCheckLib/BaseStackCheckGcc.c     
2014-08-21 07:51:21 UTC (rev 15865)
+++ trunk/edk2/MdePkg/Library/BaseStackCheckLib/BaseStackCheckGcc.c     
2014-08-21 09:23:58 UTC (rev 15866)
@@ -23,7 +23,7 @@
 #include <Library/PcdLib.h>
 
 /// "canary" value that is inserted by the compiler into the stack frame.
-VOID *__stack_chk_guard = (VOID*)FixedPcdGet64 (PcdBaseStackCanary);
+VOID *__stack_chk_guard = (VOID*)0x0AFF;
 
 // If ASLR was enabled we could use
 //void (*__stack_chk_guard)(void) = __stack_chk_fail;

Modified: trunk/edk2/MdePkg/Library/BaseStackCheckLib/BaseStackCheckLib.inf
===================================================================
--- trunk/edk2/MdePkg/Library/BaseStackCheckLib/BaseStackCheckLib.inf   
2014-08-21 07:51:21 UTC (rev 15865)
+++ trunk/edk2/MdePkg/Library/BaseStackCheckLib/BaseStackCheckLib.inf   
2014-08-21 09:23:58 UTC (rev 15866)
@@ -38,5 +38,4 @@
   DebugLib
 
 [FixedPcd]
-  gEfiMdePkgTokenSpaceGuid.PcdBaseStackCanary
   gEfiMdePkgTokenSpaceGuid.PcdDebugPropertyMask

Modified: trunk/edk2/MdePkg/MdePkg.dec
===================================================================
--- trunk/edk2/MdePkg/MdePkg.dec        2014-08-21 07:51:21 UTC (rev 15865)
+++ trunk/edk2/MdePkg/MdePkg.dec        2014-08-21 09:23:58 UTC (rev 15866)
@@ -1553,10 +1553,6 @@
   #  The required memory space is decided by the value of 
PcdMaximumGuidedExtractHandler.
   
gEfiMdePkgTokenSpaceGuid.PcdGuidedExtractHandlerTableAddress|0x1000000|UINT64|0x30001015
 
-  ## Canary value for the stack overflow protection. This PCD can be used by a 
firmware vendor
-  # or for debugging purposes to change the recommended value.
-  gEfiMdePkgTokenSpaceGuid.PcdBaseStackCanary|0x0AFF|UINT64|0x0000002A
-
 [PcdsFixedAtBuild.IPF]
   ## The base address of IO port space for IA64 arch
   
gEfiMdePkgTokenSpaceGuid.PcdIoBlockBaseAddressForIpf|0x0ffffc000000|UINT64|0x0000000f

Modified: trunk/edk2/MdePkg/MdePkg.dsc
===================================================================
--- trunk/edk2/MdePkg/MdePkg.dsc        2014-08-21 07:51:21 UTC (rev 15865)
+++ trunk/edk2/MdePkg/MdePkg.dsc        2014-08-21 09:23:58 UTC (rev 15866)
@@ -169,3 +169,6 @@
   
 [Components.EBC]
   MdePkg/Library/UefiRuntimeLib/UefiRuntimeLib.inf
+
+[Components.ARM, Components.AARCH64]
+  MdePkg/Library/BaseStackCheckLib/BaseStackCheckLib.inf

This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.


------------------------------------------------------------------------------
Slashdot TV.  
Video for Nerds.  Stuff that matters.
http://tv.slashdot.org/
_______________________________________________
edk2-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/edk2-commits

Reply via email to