You can subscribe to this list here.
2010 |
Jan
(1) |
Feb
(2) |
Mar
(12) |
Apr
(3) |
May
(2) |
Jun
(16) |
Jul
(24) |
Aug
(3) |
Sep
(9) |
Oct
(9) |
Nov
(1) |
Dec
(10) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2011 |
Jan
(8) |
Feb
(4) |
Mar
(6) |
Apr
(9) |
May
(4) |
Jun
(32) |
Jul
(14) |
Aug
|
Sep
(24) |
Oct
(26) |
Nov
(34) |
Dec
(15) |
2012 |
Jan
(16) |
Feb
(27) |
Mar
(44) |
Apr
(10) |
May
(8) |
Jun
(15) |
Jul
(10) |
Aug
(15) |
Sep
(12) |
Oct
(4) |
Nov
(3) |
Dec
(16) |
2013 |
Jan
(8) |
Feb
(4) |
Mar
(8) |
Apr
(7) |
May
(22) |
Jun
(17) |
Jul
(18) |
Aug
(31) |
Sep
(19) |
Oct
(16) |
Nov
(26) |
Dec
(11) |
2014 |
Jan
(21) |
Feb
(23) |
Mar
(17) |
Apr
(19) |
May
(39) |
Jun
(33) |
Jul
(86) |
Aug
(11) |
Sep
(5) |
Oct
(19) |
Nov
(1) |
Dec
(2) |
2015 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(2) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2017 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(4) |
Nov
|
Dec
|
2018 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(1) |
Aug
|
Sep
|
Oct
|
Nov
(6) |
Dec
|
2019 |
Jan
|
Feb
|
Mar
(2) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Jordan J. <jlj...@gm...> - 2014-07-11 23:07:34
|
On Fri, Jul 11, 2014 at 3:53 PM, Andrew Fish <af...@ap...> wrote: > On Jul 10, 2014, at 4:11 PM, Kinney, Michael D <mic...@in...> > 3) Delete Win32 binaries from EDK II BaseTools and replace with an SVN > extern. > a. Default will continue to pull Win32 binaries > b. Developers that do not want Win32 binaries can opt-out by ignoring > externs. > > How does this work with a git mirror? Is it possible to setup an officially > supported git mirror for the svn? I will set this up to be mirrored to a separate git repo similar to the other mirrors. -Jordan |
From: Andrew F. <af...@ap...> - 2014-07-11 22:53:54
|
On Jul 10, 2014, at 4:11 PM, Kinney, Michael D <mic...@in...> wrote: > Hello, > > I am looking for comments on a proposal on how EDK II BaseTools is maintained. The goal is to move all tool related development activities to the EDK II BaseTools. This is to address community feedback that there are long delays between changes made to the edk2-buildtools sub-project and the changes being propagated to EDK II BaseTools. There has also been feedback that some developers do not want the overhead of pulling Win32 binaries when they are not required. I am interested in your feedback (positive or negative) on this proposal and if you think steps should be added or removed or modified. > > I would appreciate feedback by 7/18/2014. Please let us know if you need more time to evaluate this proposal. > > Proposed steps: > =============== > 1) Create new sub-project for BaseTools binaries > a. SVN Link: https://svn.code.sf.net/p/edk2-toolbinaries/code/trunk/ > b. Status: Done. > 2) Intel to provide build server for BaseTools Win32 binaries > a. SVN Link: https://svn.code.sf.net/p/edk2-toolbinaries/code/trunk/Win32/ > b. Build Frequency: Once per day, but only if there are source changes since last build. > c. Build Time: 3 AM PDT > d. Build server to send email with build log when build is performed. > e. Build server send email that no build was required if no source changes since last build. > f. Status: In progress. Need a few more validation steps. > 3) Delete Win32 binaries from EDK II BaseTools and replace with an SVN extern. > a. Default will continue to pull Win32 binaries > b. Developers that do not want Win32 binaries can opt-out by ignoring externs. How does this work with a git mirror? Is it possible to setup an officially supported git mirror for the svn? Thanks, Andrew Fish > c. Date: TBD. Goal is immediately after build server is stable. > 4) Merge sources from Edk2-buildtools to EDK II BaseTools > a. Date: TBD. Goal is immediately after build server is stable. > 5) Change permissions on Edk2-buildtools sub-project to read-only and mark sub-project as inactive. > a. Date: TBD. Goal is immediately after EDK II BaseTools is synced with EDK2-buildtools. > 6) Retire edk...@li... mailing list. All commits to BaseTools sources will show up on edk...@li.... > 7) Retire edk...@li... and move all BaseTools related discussions to edk...@li... > > Thanks, > > Mike |
From: Jordan J. <jor...@in...> - 2014-07-11 22:48:50
|
On 2014-07-10 16:11:50, Kinney, Michael D wrote: > Hello, > > I am looking for comments on a proposal on how EDK II BaseTools is > maintained. The goal is to move all tool related development > activities to the EDK II BaseTools. This is to address community > feedback that there are long delays between changes made to the > edk2-buildtools sub-project and the changes being propagated to EDK > II BaseTools. There has also been feedback that some developers do > not want the overhead of pulling Win32 binaries when they are not > required. I am interested in your feedback (positive or negative) > on this proposal and if you think steps should be added or removed > or modified. > > I would appreciate feedback by 7/18/2014. Please let us know if you > need more time to evaluate this proposal. > > Proposed steps: > =============== > 1) Create new sub-project for BaseTools binaries > a. SVN Link: https://svn.code.sf.net/p/edk2-toolbinaries/code/trunk/ > b. Status: Done. > 2) Intel to provide build server for BaseTools Win32 binaries > a. SVN Link: https://svn.code.sf.net/p/edk2-toolbinaries/code/trunk/Win32/ > b. Build Frequency: Once per day, but only if there are > source changes since last build. > c. Build Time: 3 AM PDT > d. Build server to send email with build log when build is performed. > e. Build server send email that no build was required if no > source changes since last build. I think we should point out that this email is planned to be sent to edk2-devel. We had further discussion on this after you sent the email, and it sounds like we can update this proposal to only send emails if the build fails. Correct? I could also see an email also being sent once if the build goes from failing to passing, but an email everyday when everything is passing seems overkill. (I think daily results could be logged in the edk2-toolbinaries repo though.) Thanks, -Jordan > f. Status: In progress. Need a few more validation steps. > 3) Delete Win32 binaries from EDK II BaseTools and replace with an SVN extern. > a. Default will continue to pull Win32 binaries > b. Developers that do not want Win32 binaries can opt-out by ignoring externs. > c. Date: TBD. Goal is immediately after build server is stable. > 4) Merge sources from Edk2-buildtools to EDK II BaseTools > a. Date: TBD. Goal is immediately after build server is stable. > 5) Change permissions on Edk2-buildtools sub-project to read-only > and mark sub-project as inactive. > a. Date: TBD. Goal is immediately after EDK II BaseTools is > synced with EDK2-buildtools. > 6) Retire edk...@li... mailing > list. All commits to BaseTools sources will show up on > edk...@li.... > 7) Retire edk...@li... and move all > BaseTools related discussions to edk...@li... > > Thanks, > > Mike > > > ------------------------------------------------------------------------------ > Open source business process management suite built on Java and Eclipse > Turn processes into business applications with Bonita BPM Community Edition > Quickly connect people, data, and systems into organized workflows > Winner of BOSSIE, CODIE, OW2 and Gartner awards > http://p.sf.net/sfu/Bonitasoft > _______________________________________________ > edk2-buildtools-devel mailing list > edk...@li... > https://lists.sourceforge.net/lists/listinfo/edk2-buildtools-devel |
From: Kinney, M. D <mic...@in...> - 2014-07-11 15:53:19
|
Olivier, Developers that do development on windows typically use the pre-built binaries. By building each day, the BaseTools source and BaseToosl binaries are very close to always being in sync. This should make it easier to report and root cause bugs against BaseTools independent of the use if BaseTools sources or BaseTools binaries. It also means that updates to BaseTools sources are used immediately by everyone using the trunk. Thanks, Mike -----Original Message----- From: Olivier Martin [mailto:oli...@ar...] Sent: Friday, July 11, 2014 7:09 AM To: Kinney, Michael D; edk...@li...; edk...@li... Subject: RE: [edk2-buildtools] [edk2][RFC] Proposal to retire edk2-buildtools sub-project It looks good to me. Except it seems to add a lot of complexity in term of infrastructure support to only pull off the Win32 BaseTools binaries. An easier approach would have been to only rebuild the Win32 BaseTools once in a while such as it is already done with the FatBinPkg/EdkShellBinPkg/ShellBinPkg. Olivier > -----Original Message----- > From: Kinney, Michael D [mailto:mic...@in...] > Sent: 11 July 2014 00:12 > To: edk...@li...; edk2-buildtools- > de...@li... > Subject: [edk2-buildtools] [edk2][RFC] Proposal to retire edk2- > buildtools sub-project > > Hello, > > I am looking for comments on a proposal on how EDK II BaseTools is > maintained. The goal is to move all tool related development > activities to the EDK II BaseTools. This is to address community > feedback that there are long delays between changes made to the edk2- > buildtools sub-project and the changes being propagated to EDK II > BaseTools. There has also been feedback that some developers do not > want the overhead of pulling Win32 binaries when they are not required. > I am interested in your feedback (positive or negative) on this > proposal and if you think steps should be added or removed or modified. > > I would appreciate feedback by 7/18/2014. Please let us know if you > need more time to evaluate this proposal. > > Proposed steps: > =============== > 1) Create new sub-project for BaseTools binaries > a. SVN Link: https://svn.code.sf.net/p/edk2- > toolbinaries/code/trunk/ > b. Status: Done. > 2) Intel to provide build server for BaseTools Win32 binaries > a. SVN Link: https://svn.code.sf.net/p/edk2- > toolbinaries/code/trunk/Win32/ > b. Build Frequency: Once per day, but only if there are source > changes since last build. > c. Build Time: 3 AM PDT > d. Build server to send email with build log when build is > performed. > e. Build server send email that no build was required if no > source changes since last build. > f. Status: In progress. Need a few more validation steps. > 3) Delete Win32 binaries from EDK II BaseTools and replace with an SVN > extern. > a. Default will continue to pull Win32 binaries > b. Developers that do not want Win32 binaries can opt-out by > ignoring externs. > c. Date: TBD. Goal is immediately after build server is stable. > 4) Merge sources from Edk2-buildtools to EDK II BaseTools > a. Date: TBD. Goal is immediately after build server is stable. > 5) Change permissions on Edk2-buildtools sub-project to read-only and > mark sub-project as inactive. > a. Date: TBD. Goal is immediately after EDK II BaseTools is > synced with EDK2-buildtools. > 6) Retire edk...@li... mailing list. > All commits to BaseTools sources will show up on edk2- > co...@li.... > 7) Retire edk...@li... and move all > BaseTools related discussions to edk...@li... > > Thanks, > > Mike > > > ----------------------------------------------------------------------- > ------- > Open source business process management suite built on Java and Eclipse > Turn processes into business applications with Bonita BPM Community > Edition > Quickly connect people, data, and systems into organized workflows > Winner of BOSSIE, CODIE, OW2 and Gartner awards > http://p.sf.net/sfu/Bonitasoft > _______________________________________________ > edk2-buildtools-devel mailing list > edk...@li... > https://lists.sourceforge.net/lists/listinfo/edk2-buildtools-devel |
From: Olivier M. <oli...@ar...> - 2014-07-11 14:10:12
|
It looks good to me. Except it seems to add a lot of complexity in term of infrastructure support to only pull off the Win32 BaseTools binaries. An easier approach would have been to only rebuild the Win32 BaseTools once in a while such as it is already done with the FatBinPkg/EdkShellBinPkg/ShellBinPkg. Olivier > -----Original Message----- > From: Kinney, Michael D [mailto:mic...@in...] > Sent: 11 July 2014 00:12 > To: edk...@li...; edk2-buildtools- > de...@li... > Subject: [edk2-buildtools] [edk2][RFC] Proposal to retire edk2- > buildtools sub-project > > Hello, > > I am looking for comments on a proposal on how EDK II BaseTools is > maintained. The goal is to move all tool related development > activities to the EDK II BaseTools. This is to address community > feedback that there are long delays between changes made to the edk2- > buildtools sub-project and the changes being propagated to EDK II > BaseTools. There has also been feedback that some developers do not > want the overhead of pulling Win32 binaries when they are not required. > I am interested in your feedback (positive or negative) on this > proposal and if you think steps should be added or removed or modified. > > I would appreciate feedback by 7/18/2014. Please let us know if you > need more time to evaluate this proposal. > > Proposed steps: > =============== > 1) Create new sub-project for BaseTools binaries > a. SVN Link: https://svn.code.sf.net/p/edk2- > toolbinaries/code/trunk/ > b. Status: Done. > 2) Intel to provide build server for BaseTools Win32 binaries > a. SVN Link: https://svn.code.sf.net/p/edk2- > toolbinaries/code/trunk/Win32/ > b. Build Frequency: Once per day, but only if there are source > changes since last build. > c. Build Time: 3 AM PDT > d. Build server to send email with build log when build is > performed. > e. Build server send email that no build was required if no > source changes since last build. > f. Status: In progress. Need a few more validation steps. > 3) Delete Win32 binaries from EDK II BaseTools and replace with an SVN > extern. > a. Default will continue to pull Win32 binaries > b. Developers that do not want Win32 binaries can opt-out by > ignoring externs. > c. Date: TBD. Goal is immediately after build server is stable. > 4) Merge sources from Edk2-buildtools to EDK II BaseTools > a. Date: TBD. Goal is immediately after build server is stable. > 5) Change permissions on Edk2-buildtools sub-project to read-only and > mark sub-project as inactive. > a. Date: TBD. Goal is immediately after EDK II BaseTools is > synced with EDK2-buildtools. > 6) Retire edk...@li... mailing list. > All commits to BaseTools sources will show up on edk2- > co...@li.... > 7) Retire edk...@li... and move all > BaseTools related discussions to edk...@li... > > Thanks, > > Mike > > > ----------------------------------------------------------------------- > ------- > Open source business process management suite built on Java and Eclipse > Turn processes into business applications with Bonita BPM Community > Edition > Quickly connect people, data, and systems into organized workflows > Winner of BOSSIE, CODIE, OW2 and Gartner awards > http://p.sf.net/sfu/Bonitasoft > _______________________________________________ > edk2-buildtools-devel mailing list > edk...@li... > https://lists.sourceforge.net/lists/listinfo/edk2-buildtools-devel |
From: Laszlo E. <le...@re...> - 2014-07-11 13:45:52
|
On 07/11/14 01:11, Kinney, Michael D wrote: > Hello, > > I am looking for comments on a proposal on how EDK II BaseTools is > maintained. The goal is to move all tool related development > activities to the EDK II BaseTools. This is to address community > feedback that there are long delays between changes made to the > edk2-buildtools sub-project and the changes being propagated to EDK > II BaseTools. There has also been feedback that some developers do > not want the overhead of pulling Win32 binaries when they are not > required. I am interested in your feedback (positive or negative) on > this proposal and if you think steps should be added or removed or > modified. Looks good to me. Thanks Laszlo |
From: Kinney, M. D <mic...@in...> - 2014-07-10 23:12:14
|
Hello, I am looking for comments on a proposal on how EDK II BaseTools is maintained. The goal is to move all tool related development activities to the EDK II BaseTools. This is to address community feedback that there are long delays between changes made to the edk2-buildtools sub-project and the changes being propagated to EDK II BaseTools. There has also been feedback that some developers do not want the overhead of pulling Win32 binaries when they are not required. I am interested in your feedback (positive or negative) on this proposal and if you think steps should be added or removed or modified. I would appreciate feedback by 7/18/2014. Please let us know if you need more time to evaluate this proposal. Proposed steps: =============== 1) Create new sub-project for BaseTools binaries a. SVN Link: https://svn.code.sf.net/p/edk2-toolbinaries/code/trunk/ b. Status: Done. 2) Intel to provide build server for BaseTools Win32 binaries a. SVN Link: https://svn.code.sf.net/p/edk2-toolbinaries/code/trunk/Win32/ b. Build Frequency: Once per day, but only if there are source changes since last build. c. Build Time: 3 AM PDT d. Build server to send email with build log when build is performed. e. Build server send email that no build was required if no source changes since last build. f. Status: In progress. Need a few more validation steps. 3) Delete Win32 binaries from EDK II BaseTools and replace with an SVN extern. a. Default will continue to pull Win32 binaries b. Developers that do not want Win32 binaries can opt-out by ignoring externs. c. Date: TBD. Goal is immediately after build server is stable. 4) Merge sources from Edk2-buildtools to EDK II BaseTools a. Date: TBD. Goal is immediately after build server is stable. 5) Change permissions on Edk2-buildtools sub-project to read-only and mark sub-project as inactive. a. Date: TBD. Goal is immediately after EDK II BaseTools is synced with EDK2-buildtools. 6) Retire edk...@li... mailing list. All commits to BaseTools sources will show up on edk...@li.... 7) Retire edk...@li... and move all BaseTools related discussions to edk...@li... Thanks, Mike |
From: Gao, L. <lim...@in...> - 2014-07-09 02:42:21
|
Martin: Per Andrew comment, this value is the recommended constant. If so, we don't need to add one PCD for it unless someone has the strong request to configure it. Thanks Liming From: Olivier Martin [mailto:oli...@ar...] Sent: Tuesday, July 08, 2014 9:26 PM To: 'Andrew Fish'; Gao, Liming Cc: Kinney, Michael D; edk...@li...; edk...@li... Subject: RE: [edk2-buildtools] [PATCH 2/3] MdePkg: Introduced BaseStackCheckLib Actually, I was thinking to replace this canary value by a FixedPcd but I do not remember why I have not done it. I might have just forgot it. Olivier From: Andrew Fish [mailto:af...@ap...] Sent: 08 July 2014 02:14 To: Gao, Liming Cc: Olivier Martin; Mike Kinney; edk...@li...<mailto:edk...@li...>; edk...@li...<mailto:edk...@li...> Subject: Re: [edk2-buildtools] [PATCH 2/3] MdePkg: Introduced BaseStackCheckLib On Jul 7, 2014, at 5:40 PM, Gao, Liming <lim...@in...<mailto:lim...@in...>> wrote: Martin: What is 0x0AFF for? Is it an address or a value? This value is the recommended constant if you can not generate a real random number for the "canary" value. It has NULL (will terminate strings), LF, and -1. http://wiki.osdev.org/GCC_Stack_Smashing_Protector. So it helps contains read based overruns. __stack_chk_guard is the "canary" placed on the stack by the compiler. __stack_check_fail() is called if the "canary" has been over written. These are both compiler intrinsics. Thanks, Andrew Fish ~/work/Compiler>cat stack.c void test (int i, char v) { char test[0x100]; test[i] = v; return; } ~/work/Compiler>clang -S stack.c ~/work/Compiler>cat stack.S .section __TEXT,__text,regular,pure_instructions .globl _test .align 4, 0x90 _test: ## @test .cfi_startproc ## BB#0: pushq %rbp Ltmp2: .cfi_def_cfa_offset 16 Ltmp3: .cfi_offset %rbp, -16 movq %rsp, %rbp Ltmp4: .cfi_def_cfa_register %rbp subq $272, %rsp ## imm = 0x110 movb %sil, %al movq ___stack_chk_guard@GOTPCREL(%rip), %rcx movq (%rcx), %rcx movq %rcx, -8(%rbp) movq ___stack_chk_guard@GOTPCREL(%rip), %rcx movl %edi, -12(%rbp) movb %al, -13(%rbp) movb -13(%rbp), %al movslq -12(%rbp), %rdx movb %al, -272(%rbp,%rdx) movq (%rcx), %rcx movq -8(%rbp), %rdx cmpq %rdx, %rcx jne LBB0_2 ## BB#1: ## %SP_return addq $272, %rsp ## imm = 0x110 popq %rbp ret LBB0_2: ## %CallStackCheckFailBlk callq ___stack_chk_fail .cfi_endproc .subsections_via_symbols +/// "canary" value that is inserted by the compiler into the stack frame. +VOID *__stack_chk_guard = (VOID*)0x0AFF; And, this library instance is used as NULL class instance. Its library class should be NULL. Thanks Liming -----Original Message----- From: Olivier Martin [mailto:oli...@ar...] Sent: Monday, July 07, 2014 11:44 PM To: Kinney, Michael D; edk...@li...<mailto:edk...@li...> Cc: and...@ap...<mailto:and...@ap...>; edk...@li...<mailto:edk...@li...> Subject: [edk2-buildtools] [PATCH 2/3] MdePkg: Introduced BaseStackCheckLib This library only support GCC and XCode for now. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Andrew Fish <and...@ap...<mailto:and...@ap...>> Signed-off-by: Olivier Martin <oli...@ar...<mailto:oli...@ar...> Change-Id: Ib51239b7d315637fd22c34a9a78a7a830f2ffdc7 --- .../Library/BaseStackCheckLib/BaseStackCheckGcc.c | 62 ++++++++++++++++++++++ .../BaseStackCheckLib/BaseStackCheckLib.inf | 41 ++++++++++++++ 2 files changed, 103 insertions(+) create mode 100644 MdePkg/Library/BaseStackCheckLib/BaseStackCheckGcc.c create mode 100644 MdePkg/Library/BaseStackCheckLib/BaseStackCheckLib.inf diff --git a/MdePkg/Library/BaseStackCheckLib/BaseStackCheckGcc.c b/MdePkg/Library/BaseStackCheckLib/BaseStackCheckGcc.c new file mode 100644 index 0000000..9ec76d8 --- /dev/null +++ b/MdePkg/Library/BaseStackCheckLib/BaseStackCheckGcc.c @@ -0,0 +1,62 @@ +/** @file + Base Stack Check library for GCC/clang. + + Use -fstack-protector-all compiler flag to make the compiler insert + the __stack_chk_guard "canary" value into the stack and check the + value prior to exiting the function. If the "canary" is overwritten + __stack_chk_fail() is called. This is GCC specific code. + + Copyright (c) 2012, Apple Inc. All rights reserved.<BR> This program + and the accompanying materials are licensed and made available under + the terms and conditions of the BSD License which accompanies this + distribution. The full text of the license may be found at + http://opensource.org/licenses/bsd-license.php. + + THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, + WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. + +**/ + +#include <Base.h> +#include <Library/BaseLib.h> +#include <Library/DebugLib.h> +#include <Library/PcdLib.h> + +VOID +__stack_chk_fail ( + VOID + ); + + +/// "canary" value that is inserted by the compiler into the stack frame. +VOID *__stack_chk_guard = (VOID*)0x0AFF; + +// If ASLR was enabled we could use +//void (*__stack_chk_guard)(void) = __stack_chk_fail; + +/** + Error path for compiler generated stack "canary" value check code. If +the stack canary has been overwritten this function gets called on +exit of the function. +**/ +VOID +__stack_chk_fail ( + VOID + ) +{ + UINT8 DebugPropertyMask; + + DEBUG ((DEBUG_ERROR, "STACK FAULT: Buffer Overflow in function + %a.\n", __builtin_return_address(0))); + + // + // Generate a Breakpoint, DeadLoop, or NOP based on PCD settings even +if + // BaseDebugLibNull is in use. + // + DebugPropertyMask = PcdGet8 (PcdDebugPropertyMask); + if ((DebugPropertyMask & DEBUG_PROPERTY_ASSERT_BREAKPOINT_ENABLED) != 0) { + CpuBreakpoint (); + } else if ((DebugPropertyMask & DEBUG_PROPERTY_ASSERT_DEADLOOP_ENABLED) != 0) { + CpuDeadLoop (); + } +} + diff --git a/MdePkg/Library/BaseStackCheckLib/BaseStackCheckLib.inf b/MdePkg/Library/BaseStackCheckLib/BaseStackCheckLib.inf new file mode 100644 index 0000000..4e2285d --- /dev/null +++ b/MdePkg/Library/BaseStackCheckLib/BaseStackCheckLib.inf @@ -0,0 +1,41 @@ +## @file +# Stack Check Library +# +# Copyright (c) 2014, ARM Ltd. All rights reserved.<BR> # # This +program and the accompanying materials # are licensed and made +available under the terms and conditions of the BSD License # which +accompanies this distribution. The full text of the license may be +found at # http://opensource.org/licenses/bsd-license.php. +# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" +BASIS, # WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. +# +# +## + +[Defines] + INF_VERSION = 0x00010005 + BASE_NAME = BaseStackCheckLib + FILE_GUID = 5f6579f7-b648-4fdb-9f19-4c17e27e8eff + MODULE_TYPE = BASE + VERSION_STRING = 1.0 + LIBRARY_CLASS = BaseStackCheckLib + + +# +# VALID_ARCHITECTURES = ARM AARCH64 +# + +[Sources] + BaseStackCheckGcc.c | GCC + +[Packages] + MdePkg/MdePkg.dec + +[LibraryClasses] + BaseLib + DebugLib + +[Pcd] + gEfiMdePkgTokenSpaceGuid.PcdDebugPropertyMask + -- 1.8.5 ------------------------------------------------------------------------------ Open source business process management suite built on Java and Eclipse Turn processes into business applications with Bonita BPM Community Edition Quickly connect people, data, and systems into organized workflows Winner of BOSSIE, CODIE, OW2 and Gartner awards http://p.sf.net/sfu/Bonitasoft _______________________________________________ edk2-buildtools-devel mailing list edk...@li...<mailto:edk...@li...> https://lists.sourceforge.net/lists/listinfo/edk2-buildtools-devel ------------------------------------------------------------------------------ Open source business process management suite built on Java and Eclipse Turn processes into business applications with Bonita BPM Community Edition Quickly connect people, data, and systems into organized workflows Winner of BOSSIE, CODIE, OW2 and Gartner awards http://p.sf.net/sfu/Bonitasoft _______________________________________________ edk2-buildtools-devel mailing list edk...@li...<mailto:edk...@li...> https://lists.sourceforge.net/lists/listinfo/edk2-buildtools-devel |
From: Liu, Y. D <yin...@in...> - 2014-07-09 00:42:07
|
The change is good to me. Reviewed-by: Yingke Liu <yin...@in...> Dennis From: Andrew Fish [mailto:af...@ap...] Sent: Tuesday, July 08, 2014 11:54 PM To: edk...@li...; edk...@li... Subject: [edk2-buildtools] Update the Guid.xref file to have only upper case GUIDs. I ran into some 3rd party INF files that use mixed case for the FILE_GUID and this was confusing my debugger Python scripts. I think it is better for the Guid.xref file to output the GUID strings in upper case. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Andrew Fish <and...@ap...<mailto:and...@ap...>> Index: Source/Python/GenFds/GenFds.py =================================================================== --- Source/Python/GenFds/GenFds.py (revision 2670) +++ Source/Python/GenFds/GenFds.py (working copy) @@ -517,7 +517,7 @@ PlatformDataBase = BuildDb.BuildObject[GenFdsGlobalVariable.ActivePlatform, Arch, GenFdsGlobalVariable.TargetName, GenFdsGlobalVariable.ToolChainTag] for ModuleFile in PlatformDataBase.Modules: Module = BuildDb.BuildObject[ModuleFile, Arch, GenFdsGlobalVariable.TargetName, GenFdsGlobalVariable.ToolChainTag] - GuidXRefFile.write("%s %s\n" % (Module.Guid, Module.BaseName)) + GuidXRefFile.write("%s %s\n" % (Module.Guid.upper(), Module.BaseName)) for key, item in Module.Protocols.items(): GuidDict[key] = item for key, item in Module.Guids.items(): Thanks, Andrew Fish |
From: Andrew F. <af...@ap...> - 2014-07-08 15:54:21
|
I ran into some 3rd party INF files that use mixed case for the FILE_GUID and this was confusing my debugger Python scripts. I think it is better for the Guid.xref file to output the GUID strings in upper case. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Andrew Fish <and...@ap...> Index: Source/Python/GenFds/GenFds.py =================================================================== --- Source/Python/GenFds/GenFds.py (revision 2670) +++ Source/Python/GenFds/GenFds.py (working copy) @@ -517,7 +517,7 @@ PlatformDataBase = BuildDb.BuildObject[GenFdsGlobalVariable.ActivePlatform, Arch, GenFdsGlobalVariable.TargetName, GenFdsGlobalVariable.ToolChainTag] for ModuleFile in PlatformDataBase.Modules: Module = BuildDb.BuildObject[ModuleFile, Arch, GenFdsGlobalVariable.TargetName, GenFdsGlobalVariable.ToolChainTag] - GuidXRefFile.write("%s %s\n" % (Module.Guid, Module.BaseName)) + GuidXRefFile.write("%s %s\n" % (Module.Guid.upper(), Module.BaseName)) for key, item in Module.Protocols.items(): GuidDict[key] = item for key, item in Module.Guids.items(): Thanks, Andrew Fish |
From: Olivier M. <oli...@ar...> - 2014-07-08 13:26:44
|
Actually, I was thinking to replace this canary value by a FixedPcd but I do not remember why I have not done it. I might have just forgot it. Olivier From: Andrew Fish [mailto:af...@ap...] Sent: 08 July 2014 02:14 To: Gao, Liming Cc: Olivier Martin; Mike Kinney; edk...@li...; edk...@li... Subject: Re: [edk2-buildtools] [PATCH 2/3] MdePkg: Introduced BaseStackCheckLib On Jul 7, 2014, at 5:40 PM, Gao, Liming <lim...@in...> wrote: Martin: What is 0x0AFF for? Is it an address or a value? This value is the recommended constant if you can not generate a real random number for the "canary" value. It has NULL (will terminate strings), LF, and -1. http://wiki.osdev.org/GCC_Stack_Smashing_Protector. So it helps contains read based overruns. __stack_chk_guard is the "canary" placed on the stack by the compiler. __stack_check_fail() is called if the "canary" has been over written. These are both compiler intrinsics. Thanks, Andrew Fish ~/work/Compiler>cat stack.c void test (int i, char v) { char test[0x100]; test[i] = v; return; } ~/work/Compiler>clang -S stack.c ~/work/Compiler>cat stack.S .section __TEXT,__text,regular,pure_instructions .globl _test .align 4, 0x90 _test: ## @test .cfi_startproc ## BB#0: pushq %rbp Ltmp2: .cfi_def_cfa_offset 16 Ltmp3: .cfi_offset %rbp, -16 movq %rsp, %rbp Ltmp4: .cfi_def_cfa_register %rbp subq $272, %rsp ## imm = 0x110 movb %sil, %al movq ___stack_chk_guard@GOTPCREL(%rip), %rcx movq (%rcx), %rcx movq %rcx, -8(%rbp) movq ___stack_chk_guard@GOTPCREL(%rip), %rcx movl %edi, -12(%rbp) movb %al, -13(%rbp) movb -13(%rbp), %al movslq -12(%rbp), %rdx movb %al, -272(%rbp,%rdx) movq (%rcx), %rcx movq -8(%rbp), %rdx cmpq %rdx, %rcx jne LBB0_2 ## BB#1: ## %SP_return addq $272, %rsp ## imm = 0x110 popq %rbp ret LBB0_2: ## %CallStackCheckFailBlk callq ___stack_chk_fail .cfi_endproc .subsections_via_symbols +/// "canary" value that is inserted by the compiler into the stack frame. +VOID *__stack_chk_guard = (VOID*)0x0AFF; And, this library instance is used as NULL class instance. Its library class should be NULL. Thanks Liming -----Original Message----- From: Olivier Martin [mailto:oli...@ar...] Sent: Monday, July 07, 2014 11:44 PM To: Kinney, Michael D; edk...@li... Cc: and...@ap...; edk...@li... Subject: [edk2-buildtools] [PATCH 2/3] MdePkg: Introduced BaseStackCheckLib This library only support GCC and XCode for now. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Andrew Fish <and...@ap...> Signed-off-by: Olivier Martin <oli...@ar... Change-Id: Ib51239b7d315637fd22c34a9a78a7a830f2ffdc7 --- .../Library/BaseStackCheckLib/BaseStackCheckGcc.c | 62 ++++++++++++++++++++++ .../BaseStackCheckLib/BaseStackCheckLib.inf | 41 ++++++++++++++ 2 files changed, 103 insertions(+) create mode 100644 MdePkg/Library/BaseStackCheckLib/BaseStackCheckGcc.c create mode 100644 MdePkg/Library/BaseStackCheckLib/BaseStackCheckLib.inf diff --git a/MdePkg/Library/BaseStackCheckLib/BaseStackCheckGcc.c b/MdePkg/Library/BaseStackCheckLib/BaseStackCheckGcc.c new file mode 100644 index 0000000..9ec76d8 --- /dev/null +++ b/MdePkg/Library/BaseStackCheckLib/BaseStackCheckGcc.c @@ -0,0 +1,62 @@ +/** @file + Base Stack Check library for GCC/clang. + + Use -fstack-protector-all compiler flag to make the compiler insert + the __stack_chk_guard "canary" value into the stack and check the + value prior to exiting the function. If the "canary" is overwritten + __stack_chk_fail() is called. This is GCC specific code. + + Copyright (c) 2012, Apple Inc. All rights reserved.<BR> This program + and the accompanying materials are licensed and made available under + the terms and conditions of the BSD License which accompanies this + distribution. The full text of the license may be found at + http://opensource.org/licenses/bsd-license.php. + + THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, + WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. + +**/ + +#include <Base.h> +#include <Library/BaseLib.h> +#include <Library/DebugLib.h> +#include <Library/PcdLib.h> + +VOID +__stack_chk_fail ( + VOID + ); + + +/// "canary" value that is inserted by the compiler into the stack frame. +VOID *__stack_chk_guard = (VOID*)0x0AFF; + +// If ASLR was enabled we could use +//void (*__stack_chk_guard)(void) = __stack_chk_fail; + +/** + Error path for compiler generated stack "canary" value check code. If +the stack canary has been overwritten this function gets called on +exit of the function. +**/ +VOID +__stack_chk_fail ( + VOID + ) +{ + UINT8 DebugPropertyMask; + + DEBUG ((DEBUG_ERROR, "STACK FAULT: Buffer Overflow in function + %a.\n", __builtin_return_address(0))); + + // + // Generate a Breakpoint, DeadLoop, or NOP based on PCD settings even +if + // BaseDebugLibNull is in use. + // + DebugPropertyMask = PcdGet8 (PcdDebugPropertyMask); + if ((DebugPropertyMask & DEBUG_PROPERTY_ASSERT_BREAKPOINT_ENABLED) != 0) { + CpuBreakpoint (); + } else if ((DebugPropertyMask & DEBUG_PROPERTY_ASSERT_DEADLOOP_ENABLED) != 0) { + CpuDeadLoop (); + } +} + diff --git a/MdePkg/Library/BaseStackCheckLib/BaseStackCheckLib.inf b/MdePkg/Library/BaseStackCheckLib/BaseStackCheckLib.inf new file mode 100644 index 0000000..4e2285d --- /dev/null +++ b/MdePkg/Library/BaseStackCheckLib/BaseStackCheckLib.inf @@ -0,0 +1,41 @@ +## @file +# Stack Check Library +# +# Copyright (c) 2014, ARM Ltd. All rights reserved.<BR> # # This +program and the accompanying materials # are licensed and made +available under the terms and conditions of the BSD License # which +accompanies this distribution. The full text of the license may be +found at # http://opensource.org/licenses/bsd-license.php. +# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" +BASIS, # WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. +# +# +## + +[Defines] + INF_VERSION = 0x00010005 + BASE_NAME = BaseStackCheckLib + FILE_GUID = 5f6579f7-b648-4fdb-9f19-4c17e27e8eff + MODULE_TYPE = BASE + VERSION_STRING = 1.0 + LIBRARY_CLASS = BaseStackCheckLib + + +# +# VALID_ARCHITECTURES = ARM AARCH64 +# + +[Sources] + BaseStackCheckGcc.c | GCC + +[Packages] + MdePkg/MdePkg.dec + +[LibraryClasses] + BaseLib + DebugLib + +[Pcd] + gEfiMdePkgTokenSpaceGuid.PcdDebugPropertyMask + -- 1.8.5 ---------------------------------------------------------------------------- -- Open source business process management suite built on Java and Eclipse Turn processes into business applications with Bonita BPM Community Edition Quickly connect people, data, and systems into organized workflows Winner of BOSSIE, CODIE, OW2 and Gartner awards http://p.sf.net/sfu/Bonitasoft _______________________________________________ edk2-buildtools-devel mailing list edk...@li... https://lists.sourceforge.net/lists/listinfo/edk2-buildtools-devel ---------------------------------------------------------------------------- -- Open source business process management suite built on Java and Eclipse Turn processes into business applications with Bonita BPM Community Edition Quickly connect people, data, and systems into organized workflows Winner of BOSSIE, CODIE, OW2 and Gartner awards http://p.sf.net/sfu/Bonitasoft _______________________________________________ edk2-buildtools-devel mailing list edk...@li... https://lists.sourceforge.net/lists/listinfo/edk2-buildtools-devel |
From: Andrew F. <af...@ap...> - 2014-07-08 01:14:40
|
On Jul 7, 2014, at 5:40 PM, Gao, Liming <lim...@in...> wrote: > Martin: > What is 0x0AFF for? Is it an address or a value? This value is the recommended constant if you can not generate a real random number for the “canary” value. It has NULL (will terminate strings), LF, and -1. http://wiki.osdev.org/GCC_Stack_Smashing_Protector. So it helps contains read based overruns. __stack_chk_guard is the “canary” placed on the stack by the compiler. __stack_check_fail() is called if the “canary” has been over written. These are both compiler intrinsics. Thanks, Andrew Fish ~/work/Compiler>cat stack.c void test (int i, char v) { char test[0x100]; test[i] = v; return; } ~/work/Compiler>clang -S stack.c ~/work/Compiler>cat stack.S .section __TEXT,__text,regular,pure_instructions .globl _test .align 4, 0x90 _test: ## @test .cfi_startproc ## BB#0: pushq %rbp Ltmp2: .cfi_def_cfa_offset 16 Ltmp3: .cfi_offset %rbp, -16 movq %rsp, %rbp Ltmp4: .cfi_def_cfa_register %rbp subq $272, %rsp ## imm = 0x110 movb %sil, %al movq ___stack_chk_guard@GOTPCREL(%rip), %rcx movq (%rcx), %rcx movq %rcx, -8(%rbp) movq ___stack_chk_guard@GOTPCREL(%rip), %rcx movl %edi, -12(%rbp) movb %al, -13(%rbp) movb -13(%rbp), %al movslq -12(%rbp), %rdx movb %al, -272(%rbp,%rdx) movq (%rcx), %rcx movq -8(%rbp), %rdx cmpq %rdx, %rcx jne LBB0_2 ## BB#1: ## %SP_return addq $272, %rsp ## imm = 0x110 popq %rbp ret LBB0_2: ## %CallStackCheckFailBlk callq ___stack_chk_fail .cfi_endproc .subsections_via_symbols > +/// "canary" value that is inserted by the compiler into the stack frame. > +VOID *__stack_chk_guard = (VOID*)0x0AFF; > > And, this library instance is used as NULL class instance. Its library class should be NULL. > > Thanks > Liming > -----Original Message----- > From: Olivier Martin [mailto:oli...@ar...] > Sent: Monday, July 07, 2014 11:44 PM > To: Kinney, Michael D; edk...@li... > Cc: and...@ap...; edk...@li... > Subject: [edk2-buildtools] [PATCH 2/3] MdePkg: Introduced BaseStackCheckLib > > This library only support GCC and XCode for now. > > Contributed-under: TianoCore Contribution Agreement 1.0 > Signed-off-by: Andrew Fish <and...@ap...> > Signed-off-by: Olivier Martin <oli...@ar... > > Change-Id: Ib51239b7d315637fd22c34a9a78a7a830f2ffdc7 > --- > .../Library/BaseStackCheckLib/BaseStackCheckGcc.c | 62 ++++++++++++++++++++++ > .../BaseStackCheckLib/BaseStackCheckLib.inf | 41 ++++++++++++++ > 2 files changed, 103 insertions(+) > create mode 100644 MdePkg/Library/BaseStackCheckLib/BaseStackCheckGcc.c > create mode 100644 MdePkg/Library/BaseStackCheckLib/BaseStackCheckLib.inf > > diff --git a/MdePkg/Library/BaseStackCheckLib/BaseStackCheckGcc.c b/MdePkg/Library/BaseStackCheckLib/BaseStackCheckGcc.c > new file mode 100644 > index 0000000..9ec76d8 > --- /dev/null > +++ b/MdePkg/Library/BaseStackCheckLib/BaseStackCheckGcc.c > @@ -0,0 +1,62 @@ > +/** @file > + Base Stack Check library for GCC/clang. > + > + Use -fstack-protector-all compiler flag to make the compiler insert > + the __stack_chk_guard "canary" value into the stack and check the > + value prior to exiting the function. If the "canary" is overwritten > + __stack_chk_fail() is called. This is GCC specific code. > + > + Copyright (c) 2012, Apple Inc. All rights reserved.<BR> This program > + and the accompanying materials are licensed and made available under > + the terms and conditions of the BSD License which accompanies this > + distribution. The full text of the license may be found at > + http://opensource.org/licenses/bsd-license.php. > + > + THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, > + WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. > + > +**/ > + > +#include <Base.h> > +#include <Library/BaseLib.h> > +#include <Library/DebugLib.h> > +#include <Library/PcdLib.h> > + > +VOID > +__stack_chk_fail ( > + VOID > + ); > + > + > +/// "canary" value that is inserted by the compiler into the stack frame. > +VOID *__stack_chk_guard = (VOID*)0x0AFF; > + > +// If ASLR was enabled we could use > +//void (*__stack_chk_guard)(void) = __stack_chk_fail; > + > +/** > + Error path for compiler generated stack "canary" value check code. If > +the stack canary has been overwritten this function gets called on > +exit of the function. > +**/ > +VOID > +__stack_chk_fail ( > + VOID > + ) > +{ > + UINT8 DebugPropertyMask; > + > + DEBUG ((DEBUG_ERROR, "STACK FAULT: Buffer Overflow in function > + %a.\n", __builtin_return_address(0))); > + > + // > + // Generate a Breakpoint, DeadLoop, or NOP based on PCD settings even > +if > + // BaseDebugLibNull is in use. > + // > + DebugPropertyMask = PcdGet8 (PcdDebugPropertyMask); > + if ((DebugPropertyMask & DEBUG_PROPERTY_ASSERT_BREAKPOINT_ENABLED) != 0) { > + CpuBreakpoint (); > + } else if ((DebugPropertyMask & DEBUG_PROPERTY_ASSERT_DEADLOOP_ENABLED) != 0) { > + CpuDeadLoop (); > + } > +} > + > diff --git a/MdePkg/Library/BaseStackCheckLib/BaseStackCheckLib.inf b/MdePkg/Library/BaseStackCheckLib/BaseStackCheckLib.inf > new file mode 100644 > index 0000000..4e2285d > --- /dev/null > +++ b/MdePkg/Library/BaseStackCheckLib/BaseStackCheckLib.inf > @@ -0,0 +1,41 @@ > +## @file > +# Stack Check Library > +# > +# Copyright (c) 2014, ARM Ltd. All rights reserved.<BR> # # This > +program and the accompanying materials # are licensed and made > +available under the terms and conditions of the BSD License # which > +accompanies this distribution. The full text of the license may be > +found at # http://opensource.org/licenses/bsd-license.php. > +# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" > +BASIS, # WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. > +# > +# > +## > + > +[Defines] > + INF_VERSION = 0x00010005 > + BASE_NAME = BaseStackCheckLib > + FILE_GUID = 5f6579f7-b648-4fdb-9f19-4c17e27e8eff > + MODULE_TYPE = BASE > + VERSION_STRING = 1.0 > + LIBRARY_CLASS = BaseStackCheckLib > + > + > +# > +# VALID_ARCHITECTURES = ARM AARCH64 > +# > + > +[Sources] > + BaseStackCheckGcc.c | GCC > + > +[Packages] > + MdePkg/MdePkg.dec > + > +[LibraryClasses] > + BaseLib > + DebugLib > + > +[Pcd] > + gEfiMdePkgTokenSpaceGuid.PcdDebugPropertyMask > + > -- > 1.8.5 > > > ------------------------------------------------------------------------------ > Open source business process management suite built on Java and Eclipse > Turn processes into business applications with Bonita BPM Community Edition > Quickly connect people, data, and systems into organized workflows > Winner of BOSSIE, CODIE, OW2 and Gartner awards > http://p.sf.net/sfu/Bonitasoft > _______________________________________________ > edk2-buildtools-devel mailing list > edk...@li... > https://lists.sourceforge.net/lists/listinfo/edk2-buildtools-devel > > ------------------------------------------------------------------------------ > Open source business process management suite built on Java and Eclipse > Turn processes into business applications with Bonita BPM Community Edition > Quickly connect people, data, and systems into organized workflows > Winner of BOSSIE, CODIE, OW2 and Gartner awards > http://p.sf.net/sfu/Bonitasoft > _______________________________________________ > edk2-buildtools-devel mailing list > edk...@li... > https://lists.sourceforge.net/lists/listinfo/edk2-buildtools-devel |
From: Liu, Y. D <yin...@in...> - 2014-07-08 01:11:57
|
Hi Olivier, The patch looks good. Reviewed-by: Yingke Liu <yin...@in...> Dennis -----Original Message----- From: Olivier Martin [mailto:oli...@ar...] Sent: Monday, July 07, 2014 11:44 PM To: Kinney, Michael D; edk...@li... Cc: and...@ap...; edk...@li... Subject: [edk2-buildtools] [PATCH 1/3] BaseTools: Added support for GCC stack protector for ARM architecture Change-Id: Ifcc8c94297bb91cfec958718ac4d4727da9d506a --- BaseTools/Conf/tools_def.template | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/BaseTools/Conf/tools_def.template b/BaseTools/Conf/tools_def.template index 4d2c01c..21092fb 100755 --- a/BaseTools/Conf/tools_def.template +++ b/BaseTools/Conf/tools_def.template @@ -3162,9 +3162,9 @@ DEFINE GCC_IPF_RC_FLAGS = -I binary -O elf64-ia64-little -B ia64 DEFINE GCC_ARM_RC_FLAGS = -I binary -O elf32-littlearm -B arm --rename-section .data=.hii DEFINE GCC_AARCH64_RC_FLAGS = -I binary -O elf64-littleaarch64 -B aarch64 --rename-section .data=.hii -DEFINE GCC44_ALL_CC_FLAGS = -g -fshort-wchar -fno-stack-protector -fno-strict-aliasing -Wall -Werror -Wno-array-bounds -ffunction-sections -fdata-sections -c -include AutoGen.h -DSTRING_ARRAY_NAME=$(BASE_NAME)Strings -DEFINE GCC44_IA32_CC_FLAGS = DEF(GCC44_ALL_CC_FLAGS) -m32 -malign-double -D EFI32 -DEFINE GCC44_X64_CC_FLAGS = DEF(GCC44_ALL_CC_FLAGS) -m64 "-DEFIAPI=__attribute__((ms_abi))" -DNO_BUILTIN_VA_FUNCS -mno-red-zone -Wno-address -mcmodel=large +DEFINE GCC44_ALL_CC_FLAGS = -g -fshort-wchar -fno-strict-aliasing -Wall -Werror -Wno-array-bounds -ffunction-sections -fdata-sections -c -include AutoGen.h -DSTRING_ARRAY_NAME=$(BASE_NAME)Strings +DEFINE GCC44_IA32_CC_FLAGS = DEF(GCC44_ALL_CC_FLAGS) -m32 -malign-double -fno-stack-protector -D EFI32 +DEFINE GCC44_X64_CC_FLAGS = DEF(GCC44_ALL_CC_FLAGS) -m64 -fno-stack-protector "-DEFIAPI=__attribute__((ms_abi))" -DNO_BUILTIN_VA_FUNCS -mno-red-zone -Wno-address -mcmodel=large DEFINE GCC44_IA32_X64_DLINK_COMMON = -nostdlib -n -q --gc-sections --script=$(EDK_TOOLS_PATH)/Scripts/gcc4.4-ld-script DEFINE GCC44_IA32_X64_ASLDLINK_FLAGS = DEF(GCC44_IA32_X64_DLINK_COMMON) --entry ReferenceAcpiTable -u ReferenceAcpiTable DEFINE GCC44_IA32_X64_DLINK_FLAGS = DEF(GCC44_IA32_X64_DLINK_COMMON) --entry $(IMAGE_ENTRY_POINT) -u $(IMAGE_ENTRY_POINT) -Map $(DEST_DIR_DEBUG)/$(BASE_NAME).map @@ -3187,7 +3187,7 @@ DEFINE GCC46_IA32_X64_DLINK_FLAGS = DEF(GCC45_IA32_X64_DLINK_FLAGS) DEFINE GCC46_X64_DLINK_FLAGS = DEF(GCC45_X64_DLINK_FLAGS) DEFINE GCC46_ASM_FLAGS = DEF(GCC45_ASM_FLAGS) DEFINE GCC46_ARM_ASM_FLAGS = $(ARCHASM_FLAGS) $(PLATFORM_FLAGS) DEF(GCC_ASM_FLAGS) -mlittle-endian -DEFINE GCC46_ARM_CC_FLAGS = $(ARCHCC_FLAGS) $(PLATFORM_FLAGS) DEF(GCC44_ALL_CC_FLAGS) DEF(GCC_ARM_CC_FLAGS) -mno-unaligned-access +DEFINE GCC46_ARM_CC_FLAGS = $(ARCHCC_FLAGS) $(PLATFORM_FLAGS) DEF(GCC44_ALL_CC_FLAGS) DEF(GCC_ARM_CC_FLAGS) -mno-unaligned-access -fstack-protector DEFINE GCC46_ARM_DLINK_FLAGS = DEF(GCC_ARM_AARCH64_DLINK_COMMON) --oformat=elf32-littlearm DEFINE GCC46_ARM_ASLDLINK_FLAGS = DEF(GCC_ARM_AARCH64_ASLDLINK_FLAGS) --oformat=elf32-littlearm @@ -5463,8 +5463,8 @@ RELEASE_XCODE32_ARM_ASM_FLAGS = $(ARCHASM_FLAGS) *_XCODE32_ARM_PP_FLAGS = $(ARCHCC_FLAGS) $(PLATFORM_FLAGS) -E -x assembler-with-cpp -include $(DEST_DIR_DEBUG)/AutoGen.h *_XCODE32_ARM_VFRPP_FLAGS = $(ARCHCC_FLAGS) $(PLATFORM_FLAGS) -x c -E -P -DVFRCOMPILE --include $(DEST_DIR_DEBUG)/$(MODULE_NAME)StrDefs.h - DEBUG_XCODE32_ARM_CC_FLAGS = $(ARCHCC_FLAGS) $(PLATFORM_FLAGS) -mthumb-interwork -g -Oz -mabi=aapcs -mapcs -fno-short-enums -save-temps -combine -fshort-wchar -fno-strict-aliasing -Wall -Werror -Wno-missing-braces -fomit-frame-pointer -c -include AutoGen.h -fno-stack-protector -RELEASE_XCODE32_ARM_CC_FLAGS = $(ARCHCC_FLAGS) $(PLATFORM_FLAGS) -mthumb-interwork -Oz -mabi=aapcs -mapcs -fno-short-enums -save-temps -combine -fshort-wchar -fno-strict-aliasing -Wall -Werror -Wno-missing-braces -fomit-frame-pointer -c -include AutoGen.h -fno-stack-protector + DEBUG_XCODE32_ARM_CC_FLAGS = $(ARCHCC_FLAGS) $(PLATFORM_FLAGS) -mthumb-interwork -g -Oz -mabi=aapcs -mapcs -fno-short-enums -save-temps -combine -fshort-wchar -fno-strict-aliasing -Wall -Werror -Wno-missing-braces -fomit-frame-pointer -c -include AutoGen.h +RELEASE_XCODE32_ARM_CC_FLAGS = $(ARCHCC_FLAGS) $(PLATFORM_FLAGS) -mthumb-interwork -Oz -mabi=aapcs -mapcs -fno-short-enums -save-temps -combine -fshort-wchar -fno-strict-aliasing -Wall -Werror -Wno-missing-braces -fomit-frame-pointer -c -include AutoGen.h #################################################################################### @@ -5597,8 +5597,8 @@ RELEASE_LLVM_AARCH64_CC_FLAGS = DEF(LLVM_ALL_CC_FLAGS) -target armv8-none-eab #################################################################################### DEFINE RVCT_ALL_ASM_FLAGS = --diag_suppress=1786 --diag_error=warning --apcs /interwork -DEFINE RVCT_ALL_CC_FLAGS = --c90 -c --no_autoinline --asm --gnu --apcs /interwork --signed_chars --no_unaligned_access --split_sections --enum_is_int --preinclude AutoGen.h --diag_suppress=186 --diag_warning 167 --diag_error=warning --diag_style=ide -DEFINE RVCT_ALL_DLINK_FLAGS = --ro-base 0 --no_scanlib --reloc --no_exceptions --datacompressor off --strict --symbols --diag_style=ide +DEFINE RVCT_ALL_CC_FLAGS = --c90 -c --no_autoinline --asm --gnu --apcs /interwork --signed_chars --no_unaligned_access --split_sections --enum_is_int --preinclude AutoGen.h --diag_suppress=186 --diag_warning 167 --diag_error=warning --diag_style=ide --protect_stack +DEFINE RVCT_ALL_DLINK_FLAGS = --ro-base 0 --no_scanlib --reloc +--no_exceptions --datacompressor off --strict --symbols +--diag_style=ide #################################################################################### # @@ -5969,8 +5969,8 @@ RELEASE_ARMLINUXGCC_ARM_ASM_FLAGS = $(ARCHASM_FLAGS) $(PLATFORM_FLAGS) -mlittl *_ARMLINUXGCC_ARM_SLINK_FLAGS = -rc *_ARMLINUXGCC_ARM_DLINK_FLAGS = $(ARCHDLINK_FLAGS) DEF(GCC_ARM_AARCH64_DLINK_COMMON) --oformat=elf32-littlearm - DEBUG_ARMLINUXGCC_ARM_CC_FLAGS = $(ARCHCC_FLAGS) $(PLATFORM_FLAGS) DEF(GCC_ARM_CC_FLAGS) -fno-stack-protector -mno-unaligned-access -O0 -RELEASE_ARMLINUXGCC_ARM_CC_FLAGS = $(ARCHCC_FLAGS) $(PLATFORM_FLAGS) DEF(GCC_ARM_CC_FLAGS) -fno-stack-protector -mno-unaligned-access -Wno-unused-but-set-variable + DEBUG_ARMLINUXGCC_ARM_CC_FLAGS = $(ARCHCC_FLAGS) $(PLATFORM_FLAGS) +DEF(GCC_ARM_CC_FLAGS) -mno-unaligned-access -O0 +RELEASE_ARMLINUXGCC_ARM_CC_FLAGS = $(ARCHCC_FLAGS) $(PLATFORM_FLAGS) +DEF(GCC_ARM_CC_FLAGS) -mno-unaligned-access +-Wno-unused-but-set-variable ###################### # AArch64 definitions @@ -6059,8 +6059,8 @@ RELEASE_ARMLINUXGCC_AARCH64_CC_FLAGS = $(ARCHCC_FLAGS) $(PLATFORM_FLAGS) DEF(GCC DEBUG_WINGCC_ARM_ASM_FLAGS = $(ARCHASM_FLAGS) $(PLATFORM_FLAGS) -mlittle-endian -g RELEASE_WINGCC_ARM_ASM_FLAGS = $(ARCHASM_FLAGS) $(PLATFORM_FLAGS) -mlittle-endian - DEBUG_WINGCC_ARM_CC_FLAGS = $(ARCHCC_FLAGS) $(PLATFORM_FLAGS) DEF(GCC_ARM_CC_FLAGS) -fno-stack-protector -O0 -mno-unaligned-access -RELEASE_WINGCC_ARM_CC_FLAGS = $(ARCHCC_FLAGS) $(PLATFORM_FLAGS) DEF(GCC_ARM_CC_FLAGS) -fno-stack-protector -Wno-unused-but-set-variable -mno-unaligned-access + DEBUG_WINGCC_ARM_CC_FLAGS = $(ARCHCC_FLAGS) $(PLATFORM_FLAGS) +DEF(GCC_ARM_CC_FLAGS) -O0 -mno-unaligned-access +RELEASE_WINGCC_ARM_CC_FLAGS = $(ARCHCC_FLAGS) $(PLATFORM_FLAGS) +DEF(GCC_ARM_CC_FLAGS) -Wno-unused-but-set-variable +-mno-unaligned-access ###################### # AArch64 definitions -- 1.8.5 ------------------------------------------------------------------------------ Open source business process management suite built on Java and Eclipse Turn processes into business applications with Bonita BPM Community Edition Quickly connect people, data, and systems into organized workflows Winner of BOSSIE, CODIE, OW2 and Gartner awards http://p.sf.net/sfu/Bonitasoft _______________________________________________ edk2-buildtools-devel mailing list edk...@li... https://lists.sourceforge.net/lists/listinfo/edk2-buildtools-devel |
From: Gao, L. <lim...@in...> - 2014-07-08 00:41:10
|
Martin: What is 0x0AFF for? Is it an address or a value? +/// "canary" value that is inserted by the compiler into the stack frame. +VOID *__stack_chk_guard = (VOID*)0x0AFF; And, this library instance is used as NULL class instance. Its library class should be NULL. Thanks Liming -----Original Message----- From: Olivier Martin [mailto:oli...@ar...] Sent: Monday, July 07, 2014 11:44 PM To: Kinney, Michael D; edk...@li... Cc: and...@ap...; edk...@li... Subject: [edk2-buildtools] [PATCH 2/3] MdePkg: Introduced BaseStackCheckLib This library only support GCC and XCode for now. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Andrew Fish <and...@ap...> Signed-off-by: Olivier Martin <oli...@ar... Change-Id: Ib51239b7d315637fd22c34a9a78a7a830f2ffdc7 --- .../Library/BaseStackCheckLib/BaseStackCheckGcc.c | 62 ++++++++++++++++++++++ .../BaseStackCheckLib/BaseStackCheckLib.inf | 41 ++++++++++++++ 2 files changed, 103 insertions(+) create mode 100644 MdePkg/Library/BaseStackCheckLib/BaseStackCheckGcc.c create mode 100644 MdePkg/Library/BaseStackCheckLib/BaseStackCheckLib.inf diff --git a/MdePkg/Library/BaseStackCheckLib/BaseStackCheckGcc.c b/MdePkg/Library/BaseStackCheckLib/BaseStackCheckGcc.c new file mode 100644 index 0000000..9ec76d8 --- /dev/null +++ b/MdePkg/Library/BaseStackCheckLib/BaseStackCheckGcc.c @@ -0,0 +1,62 @@ +/** @file + Base Stack Check library for GCC/clang. + + Use -fstack-protector-all compiler flag to make the compiler insert + the __stack_chk_guard "canary" value into the stack and check the + value prior to exiting the function. If the "canary" is overwritten + __stack_chk_fail() is called. This is GCC specific code. + + Copyright (c) 2012, Apple Inc. All rights reserved.<BR> This program + and the accompanying materials are licensed and made available under + the terms and conditions of the BSD License which accompanies this + distribution. The full text of the license may be found at + http://opensource.org/licenses/bsd-license.php. + + THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, + WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. + +**/ + +#include <Base.h> +#include <Library/BaseLib.h> +#include <Library/DebugLib.h> +#include <Library/PcdLib.h> + +VOID +__stack_chk_fail ( + VOID + ); + + +/// "canary" value that is inserted by the compiler into the stack frame. +VOID *__stack_chk_guard = (VOID*)0x0AFF; + +// If ASLR was enabled we could use +//void (*__stack_chk_guard)(void) = __stack_chk_fail; + +/** + Error path for compiler generated stack "canary" value check code. If +the stack canary has been overwritten this function gets called on +exit of the function. +**/ +VOID +__stack_chk_fail ( + VOID + ) +{ + UINT8 DebugPropertyMask; + + DEBUG ((DEBUG_ERROR, "STACK FAULT: Buffer Overflow in function + %a.\n", __builtin_return_address(0))); + + // + // Generate a Breakpoint, DeadLoop, or NOP based on PCD settings even +if + // BaseDebugLibNull is in use. + // + DebugPropertyMask = PcdGet8 (PcdDebugPropertyMask); + if ((DebugPropertyMask & DEBUG_PROPERTY_ASSERT_BREAKPOINT_ENABLED) != 0) { + CpuBreakpoint (); + } else if ((DebugPropertyMask & DEBUG_PROPERTY_ASSERT_DEADLOOP_ENABLED) != 0) { + CpuDeadLoop (); + } +} + diff --git a/MdePkg/Library/BaseStackCheckLib/BaseStackCheckLib.inf b/MdePkg/Library/BaseStackCheckLib/BaseStackCheckLib.inf new file mode 100644 index 0000000..4e2285d --- /dev/null +++ b/MdePkg/Library/BaseStackCheckLib/BaseStackCheckLib.inf @@ -0,0 +1,41 @@ +## @file +# Stack Check Library +# +# Copyright (c) 2014, ARM Ltd. All rights reserved.<BR> # # This +program and the accompanying materials # are licensed and made +available under the terms and conditions of the BSD License # which +accompanies this distribution. The full text of the license may be +found at # http://opensource.org/licenses/bsd-license.php. +# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" +BASIS, # WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. +# +# +## + +[Defines] + INF_VERSION = 0x00010005 + BASE_NAME = BaseStackCheckLib + FILE_GUID = 5f6579f7-b648-4fdb-9f19-4c17e27e8eff + MODULE_TYPE = BASE + VERSION_STRING = 1.0 + LIBRARY_CLASS = BaseStackCheckLib + + +# +# VALID_ARCHITECTURES = ARM AARCH64 +# + +[Sources] + BaseStackCheckGcc.c | GCC + +[Packages] + MdePkg/MdePkg.dec + +[LibraryClasses] + BaseLib + DebugLib + +[Pcd] + gEfiMdePkgTokenSpaceGuid.PcdDebugPropertyMask + -- 1.8.5 ------------------------------------------------------------------------------ Open source business process management suite built on Java and Eclipse Turn processes into business applications with Bonita BPM Community Edition Quickly connect people, data, and systems into organized workflows Winner of BOSSIE, CODIE, OW2 and Gartner awards http://p.sf.net/sfu/Bonitasoft _______________________________________________ edk2-buildtools-devel mailing list edk...@li... https://lists.sourceforge.net/lists/listinfo/edk2-buildtools-devel |
From: Olivier M. <oli...@ar...> - 2014-07-07 15:47:06
|
Note: Andrew's email is not correct into the patchset. It should have been 'af...@ap...'. > -----Original Message----- > From: Olivier Martin [mailto:oli...@ar...] > Sent: 07 July 2014 16:44 > To: mic...@in...; edk2-buildtools- > de...@li... > Cc: edk...@li...; and...@ap...; Olivier > Martin > Subject: [PATCH 0/3] Added support for GCC stack protector for ARM > architectures (BaseTools & MdePkg) > > The initial code has been sent by Andrew Fish on the mainling-list. > This library only supports GCC and XCode for now. > I have only enables this code for ARM architectures but it should > also work on other architectures. > > Contributed-under: TianoCore Contribution Agreement 1.0 > Signed-off-by: Andrew Fish <and...@ap...> > Signed-off-by: Olivier Martin <oli...@ar...> > > Best Regards, > Olivier > > Olivier Martin (3): > BaseTools: Added support for GCC stack protector for ARM architecture > MdePkg: Introduced BaseStackCheckLib > ARM Packages: Added support for GCC stack protector > > ArmPkg/ArmPkg.dsc | 8 +-- > ArmPlatformPkg/ArmPlatformPkg-2ndstage.dsc | 21 ++++---- > ArmPlatformPkg/ArmPlatformPkg.dsc | 22 ++++---- > .../ArmRealViewEbPkg/ArmRealViewEb.dsc.inc | 3 ++ > ArmPlatformPkg/ArmVExpressPkg/ArmVExpress.dsc.inc | 8 +-- > BaseTools/Conf/tools_def.template | 24 ++++----- > BeagleBoardPkg/BeagleBoardPkg.dsc | 2 + > EmbeddedPkg/EmbeddedPkg.dsc | 3 ++ > .../Library/BaseStackCheckLib/BaseStackCheckGcc.c | 61 > ++++++++++++++++++++++ > .../BaseStackCheckLib/BaseStackCheckLib.inf | 41 > +++++++++++++++ > 10 files changed, 153 insertions(+), 40 deletions(-) > create mode 100644 > MdePkg/Library/BaseStackCheckLib/BaseStackCheckGcc.c > create mode 100644 > MdePkg/Library/BaseStackCheckLib/BaseStackCheckLib.inf > > -- > 1.8.5 |
From: Olivier M. <oli...@ar...> - 2014-07-07 15:44:49
|
This library only support GCC and XCode for now. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Andrew Fish <and...@ap...> Signed-off-by: Olivier Martin <oli...@ar... Change-Id: Ib51239b7d315637fd22c34a9a78a7a830f2ffdc7 --- .../Library/BaseStackCheckLib/BaseStackCheckGcc.c | 62 ++++++++++++++++++++++ .../BaseStackCheckLib/BaseStackCheckLib.inf | 41 ++++++++++++++ 2 files changed, 103 insertions(+) create mode 100644 MdePkg/Library/BaseStackCheckLib/BaseStackCheckGcc.c create mode 100644 MdePkg/Library/BaseStackCheckLib/BaseStackCheckLib.inf diff --git a/MdePkg/Library/BaseStackCheckLib/BaseStackCheckGcc.c b/MdePkg/Library/BaseStackCheckLib/BaseStackCheckGcc.c new file mode 100644 index 0000000..9ec76d8 --- /dev/null +++ b/MdePkg/Library/BaseStackCheckLib/BaseStackCheckGcc.c @@ -0,0 +1,62 @@ +/** @file + Base Stack Check library for GCC/clang. + + Use -fstack-protector-all compiler flag to make the compiler insert the + __stack_chk_guard "canary" value into the stack and check the value prior + to exiting the function. If the "canary" is overwritten __stack_chk_fail() + is called. This is GCC specific code. + + Copyright (c) 2012, Apple Inc. All rights reserved.<BR> + This program and the accompanying materials + are licensed and made available under the terms and conditions of the BSD License + which accompanies this distribution. The full text of the license may be found at + http://opensource.org/licenses/bsd-license.php. + + THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, + WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. + +**/ + +#include <Base.h> +#include <Library/BaseLib.h> +#include <Library/DebugLib.h> +#include <Library/PcdLib.h> + +VOID +__stack_chk_fail ( + VOID + ); + + +/// "canary" value that is inserted by the compiler into the stack frame. +VOID *__stack_chk_guard = (VOID*)0x0AFF; + +// If ASLR was enabled we could use +//void (*__stack_chk_guard)(void) = __stack_chk_fail; + +/** + Error path for compiler generated stack "canary" value check code. If the + stack canary has been overwritten this function gets called on exit of the + function. +**/ +VOID +__stack_chk_fail ( + VOID + ) +{ + UINT8 DebugPropertyMask; + + DEBUG ((DEBUG_ERROR, "STACK FAULT: Buffer Overflow in function %a.\n", __builtin_return_address(0))); + + // + // Generate a Breakpoint, DeadLoop, or NOP based on PCD settings even if + // BaseDebugLibNull is in use. + // + DebugPropertyMask = PcdGet8 (PcdDebugPropertyMask); + if ((DebugPropertyMask & DEBUG_PROPERTY_ASSERT_BREAKPOINT_ENABLED) != 0) { + CpuBreakpoint (); + } else if ((DebugPropertyMask & DEBUG_PROPERTY_ASSERT_DEADLOOP_ENABLED) != 0) { + CpuDeadLoop (); + } +} + diff --git a/MdePkg/Library/BaseStackCheckLib/BaseStackCheckLib.inf b/MdePkg/Library/BaseStackCheckLib/BaseStackCheckLib.inf new file mode 100644 index 0000000..4e2285d --- /dev/null +++ b/MdePkg/Library/BaseStackCheckLib/BaseStackCheckLib.inf @@ -0,0 +1,41 @@ +## @file +# Stack Check Library +# +# Copyright (c) 2014, ARM Ltd. All rights reserved.<BR> +# +# This program and the accompanying materials +# are licensed and made available under the terms and conditions of the BSD License +# which accompanies this distribution. The full text of the license may be found at +# http://opensource.org/licenses/bsd-license.php. +# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, +# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. +# +# +## + +[Defines] + INF_VERSION = 0x00010005 + BASE_NAME = BaseStackCheckLib + FILE_GUID = 5f6579f7-b648-4fdb-9f19-4c17e27e8eff + MODULE_TYPE = BASE + VERSION_STRING = 1.0 + LIBRARY_CLASS = BaseStackCheckLib + + +# +# VALID_ARCHITECTURES = ARM AARCH64 +# + +[Sources] + BaseStackCheckGcc.c | GCC + +[Packages] + MdePkg/MdePkg.dec + +[LibraryClasses] + BaseLib + DebugLib + +[Pcd] + gEfiMdePkgTokenSpaceGuid.PcdDebugPropertyMask + -- 1.8.5 |
From: Olivier M. <oli...@ar...> - 2014-07-07 15:44:48
|
Change-Id: Ib0b1487816b6b37ed11916b828c4f6b695fa2890 --- ArmPkg/ArmPkg.dsc | 8 +- ArmPlatformPkg/ArmPlatformPkg-2ndstage.dsc | 21 ++-- ArmPlatformPkg/ArmPlatformPkg.dsc | 22 ++-- .../ArmRealViewEbPkg/ArmRealViewEb.dsc.inc | 3 + ArmPlatformPkg/ArmVExpressPkg/ArmVExpress.dsc.inc | 8 +- BeagleBoardPkg/BeagleBoardPkg.dsc | 2 + EmbeddedPkg/EmbeddedPkg.dsc | 3 + .../Library/BaseStackCheckLib/BaseStackCheckGcc.c | 123 ++++++++++----------- .../BaseStackCheckLib/BaseStackCheckLib.inf | 82 +++++++------- 9 files changed, 141 insertions(+), 131 deletions(-) diff --git a/ArmPkg/ArmPkg.dsc b/ArmPkg/ArmPkg.dsc index 661453c..c89effd 100644 --- a/ArmPkg/ArmPkg.dsc +++ b/ArmPkg/ArmPkg.dsc @@ -2,7 +2,7 @@ # ARM processor package. # # Copyright (c) 2009 - 2010, Apple Inc. All rights reserved.<BR> -# Copyright (c) 2011 - 2013, ARM Ltd. All rights reserved.<BR> +# Copyright (c) 2011 - 2014, ARM Ltd. All rights reserved.<BR> # # This program and the accompanying materials # are licensed and made available under the terms and conditions of the BSD License @@ -92,11 +92,11 @@ [LibraryClasses.common.DXE_DRIVER] ArmPlatformGlobalVariableLib|ArmPlatformPkg/Library/ArmPlatformGlobalVariableLib/Dxe/DxeArmPlatformGlobalVariableLib.inf -[LibraryClasses.ARM] +[LibraryClasses.ARM, LibraryClasses.AARCH64] NULL|ArmPkg/Library/CompilerIntrinsicsLib/CompilerIntrinsicsLib.inf -[LibraryClasses.AARCH64] - NULL|ArmPkg/Library/CompilerIntrinsicsLib/CompilerIntrinsicsLib.inf + # Add support for GCC stack protector + NULL|MdePkg/Library/BaseStackCheckLib/BaseStackCheckLib.inf [Components.common] ArmPkg/Library/ArmCacheMaintenanceLib/ArmCacheMaintenanceLib.inf diff --git a/ArmPlatformPkg/ArmPlatformPkg-2ndstage.dsc b/ArmPlatformPkg/ArmPlatformPkg-2ndstage.dsc index 264099c..75b7e53 100644 --- a/ArmPlatformPkg/ArmPlatformPkg-2ndstage.dsc +++ b/ArmPlatformPkg/ArmPlatformPkg-2ndstage.dsc @@ -1,13 +1,13 @@ # -# Copyright (c) 2011-2013, ARM Limited. All rights reserved. -# -# This program and the accompanying materials -# are licensed and made available under the terms and conditions of the BSD License -# which accompanies this distribution. The full text of the license may be found at -# http://opensource.org/licenses/bsd-license.php +# Copyright (c) 2011-2014, ARM Limited. All rights reserved. # -# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. +# This program and the accompanying materials +# are licensed and made available under the terms and conditions of the BSD License +# which accompanies this distribution. The full text of the license may be found at +# http://opensource.org/licenses/bsd-license.php +# +# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, +# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. # # ################################################################################ @@ -173,7 +173,7 @@ ReportStatusCodeLib|IntelFrameworkModulePkg/Library/DxeReportStatusCodeLibFramework/DxeReportStatusCodeLib.inf CapsuleLib|MdeModulePkg/Library/DxeCapsuleLibNull/DxeCapsuleLibNull.inf -[LibraryClasses.ARM] +[LibraryClasses.ARM, LibraryClasses.AARCH64] # # It is not possible to prevent the ARM compiler for generic intrinsic functions. # This library provides the instrinsic functions generate by a given compiler. @@ -181,6 +181,9 @@ # NULL|ArmPkg/Library/CompilerIntrinsicsLib/CompilerIntrinsicsLib.inf + # Add support for GCC stack protector + NULL|MdePkg/Library/BaseStackCheckLib/BaseStackCheckLib.inf + [BuildOptions] XCODE:*_*_ARM_PLATFORM_FLAGS == -arch armv7 diff --git a/ArmPlatformPkg/ArmPlatformPkg.dsc b/ArmPlatformPkg/ArmPlatformPkg.dsc index ce31abc..9032f3f 100644 --- a/ArmPlatformPkg/ArmPlatformPkg.dsc +++ b/ArmPlatformPkg/ArmPlatformPkg.dsc @@ -1,13 +1,13 @@ # -# Copyright (c) 2011-2013, ARM Limited. All rights reserved. -# -# This program and the accompanying materials -# are licensed and made available under the terms and conditions of the BSD License -# which accompanies this distribution. The full text of the license may be found at -# http://opensource.org/licenses/bsd-license.php +# Copyright (c) 2011-2014, ARM Limited. All rights reserved. # -# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. +# This program and the accompanying materials +# are licensed and made available under the terms and conditions of the BSD License +# which accompanies this distribution. The full text of the license may be found at +# http://opensource.org/licenses/bsd-license.php +# +# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, +# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. # # ################################################################################ @@ -203,7 +203,7 @@ ReportStatusCodeLib|IntelFrameworkModulePkg/Library/DxeReportStatusCodeLibFramework/DxeReportStatusCodeLib.inf CapsuleLib|MdeModulePkg/Library/DxeCapsuleLibNull/DxeCapsuleLibNull.inf -[LibraryClasses.ARM] +[LibraryClasses.ARM, LibraryClasses.AARCH64] # # It is not possible to prevent the ARM compiler for generic intrinsic functions. # This library provides the instrinsic functions generate by a given compiler. @@ -211,8 +211,8 @@ # NULL|ArmPkg/Library/CompilerIntrinsicsLib/CompilerIntrinsicsLib.inf -[LibraryClasses.AARCH64] - NULL|ArmPkg/Library/CompilerIntrinsicsLib/CompilerIntrinsicsLib.inf + # Add support for GCC stack protector + NULL|MdePkg/Library/BaseStackCheckLib/BaseStackCheckLib.inf [BuildOptions] XCODE:*_*_ARM_PLATFORM_FLAGS == -arch armv7 diff --git a/ArmPlatformPkg/ArmRealViewEbPkg/ArmRealViewEb.dsc.inc b/ArmPlatformPkg/ArmRealViewEbPkg/ArmRealViewEb.dsc.inc index 5ceeebd..14e9d45 100644 --- a/ArmPlatformPkg/ArmRealViewEbPkg/ArmRealViewEb.dsc.inc +++ b/ArmPlatformPkg/ArmRealViewEbPkg/ArmRealViewEb.dsc.inc @@ -201,6 +201,9 @@ # NULL|ArmPkg/Library/CompilerIntrinsicsLib/CompilerIntrinsicsLib.inf + # Add support for GCC stack protector + NULL|MdePkg/Library/BaseStackCheckLib/BaseStackCheckLib.inf + [BuildOptions] RVCT:RELEASE_*_*_CC_FLAGS = -DMDEPKG_NDEBUG diff --git a/ArmPlatformPkg/ArmVExpressPkg/ArmVExpress.dsc.inc b/ArmPlatformPkg/ArmVExpressPkg/ArmVExpress.dsc.inc index 1b92006..d1e6bdf 100644 --- a/ArmPlatformPkg/ArmVExpressPkg/ArmVExpress.dsc.inc +++ b/ArmPlatformPkg/ArmVExpressPkg/ArmVExpress.dsc.inc @@ -204,7 +204,7 @@ ReportStatusCodeLib|IntelFrameworkModulePkg/Library/DxeReportStatusCodeLibFramework/DxeReportStatusCodeLib.inf CapsuleLib|MdeModulePkg/Library/DxeCapsuleLibNull/DxeCapsuleLibNull.inf -[LibraryClasses.ARM] +[LibraryClasses.ARM, LibraryClasses.AARCH64] # # It is not possible to prevent the ARM compiler for generic intrinsic functions. # This library provides the instrinsic functions generate by a given compiler. @@ -212,8 +212,8 @@ # NULL|ArmPkg/Library/CompilerIntrinsicsLib/CompilerIntrinsicsLib.inf -[LibraryClasses.AARCH64] - NULL|ArmPkg/Library/CompilerIntrinsicsLib/CompilerIntrinsicsLib.inf + # Add support for GCC stack protector + NULL|MdePkg/Library/BaseStackCheckLib/BaseStackCheckLib.inf [BuildOptions] @@ -390,4 +390,4 @@ ArmPlatformPkg/ArmVExpressPkg/ArmVExpressFastBootDxe/ArmVExpressFastBootDxe.inf # FV Filesystem - MdeModulePkg/Universal/FvSimpleFilesystemDxe/FvSimpleFilesystemDxe.inf \ No newline at end of file + MdeModulePkg/Universal/FvSimpleFilesystemDxe/FvSimpleFilesystemDxe.inf diff --git a/BeagleBoardPkg/BeagleBoardPkg.dsc b/BeagleBoardPkg/BeagleBoardPkg.dsc index 07b8c47..a936b21 100644 --- a/BeagleBoardPkg/BeagleBoardPkg.dsc +++ b/BeagleBoardPkg/BeagleBoardPkg.dsc @@ -207,6 +207,8 @@ # NULL|ArmPkg/Library/CompilerIntrinsicsLib/CompilerIntrinsicsLib.inf + # Add support for GCC stack protector + NULL|MdePkg/Library/BaseStackCheckLib/BaseStackCheckLib.inf [BuildOptions] XCODE:*_*_ARM_PLATFORM_FLAGS == -arch armv7 diff --git a/EmbeddedPkg/EmbeddedPkg.dsc b/EmbeddedPkg/EmbeddedPkg.dsc index c5d4ae6..2bca5ce 100644 --- a/EmbeddedPkg/EmbeddedPkg.dsc +++ b/EmbeddedPkg/EmbeddedPkg.dsc @@ -128,6 +128,9 @@ SemihostLib|ArmPkg/Library/SemihostLib/SemihostLib.inf NULL|ArmPkg/Library/CompilerIntrinsicsLib/CompilerIntrinsicsLib.inf + # Add support for GCC stack protector + NULL|MdePkg/Library/BaseStackCheckLib/BaseStackCheckLib.inf + [LibraryClasses.ARM] ArmLib|ArmPkg/Library/ArmLib/ArmV7/ArmV7Lib.inf diff --git a/MdePkg/Library/BaseStackCheckLib/BaseStackCheckGcc.c b/MdePkg/Library/BaseStackCheckLib/BaseStackCheckGcc.c index 9ec76d8..9a56705 100644 --- a/MdePkg/Library/BaseStackCheckLib/BaseStackCheckGcc.c +++ b/MdePkg/Library/BaseStackCheckLib/BaseStackCheckGcc.c @@ -1,62 +1,61 @@ -/** @file - Base Stack Check library for GCC/clang. - - Use -fstack-protector-all compiler flag to make the compiler insert the - __stack_chk_guard "canary" value into the stack and check the value prior - to exiting the function. If the "canary" is overwritten __stack_chk_fail() - is called. This is GCC specific code. - - Copyright (c) 2012, Apple Inc. All rights reserved.<BR> - This program and the accompanying materials - are licensed and made available under the terms and conditions of the BSD License - which accompanies this distribution. The full text of the license may be found at - http://opensource.org/licenses/bsd-license.php. - - THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, - WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. - -**/ - -#include <Base.h> -#include <Library/BaseLib.h> -#include <Library/DebugLib.h> -#include <Library/PcdLib.h> - -VOID -__stack_chk_fail ( - VOID - ); - - -/// "canary" value that is inserted by the compiler into the stack frame. -VOID *__stack_chk_guard = (VOID*)0x0AFF; - -// If ASLR was enabled we could use -//void (*__stack_chk_guard)(void) = __stack_chk_fail; - -/** - Error path for compiler generated stack "canary" value check code. If the - stack canary has been overwritten this function gets called on exit of the - function. -**/ -VOID -__stack_chk_fail ( - VOID - ) -{ - UINT8 DebugPropertyMask; - - DEBUG ((DEBUG_ERROR, "STACK FAULT: Buffer Overflow in function %a.\n", __builtin_return_address(0))); - - // - // Generate a Breakpoint, DeadLoop, or NOP based on PCD settings even if - // BaseDebugLibNull is in use. - // - DebugPropertyMask = PcdGet8 (PcdDebugPropertyMask); - if ((DebugPropertyMask & DEBUG_PROPERTY_ASSERT_BREAKPOINT_ENABLED) != 0) { - CpuBreakpoint (); - } else if ((DebugPropertyMask & DEBUG_PROPERTY_ASSERT_DEADLOOP_ENABLED) != 0) { - CpuDeadLoop (); - } -} - +/** @file + Base Stack Check library for GCC/clang. + + Use -fstack-protector-all compiler flag to make the compiler insert the + __stack_chk_guard "canary" value into the stack and check the value prior + to exiting the function. If the "canary" is overwritten __stack_chk_fail() + is called. This is GCC specific code. + + Copyright (c) 2012, Apple Inc. All rights reserved.<BR> + This program and the accompanying materials + are licensed and made available under the terms and conditions of the BSD License + which accompanies this distribution. The full text of the license may be found at + http://opensource.org/licenses/bsd-license.php. + + THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, + WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. + +**/ + +#include <Base.h> +#include <Library/BaseLib.h> +#include <Library/DebugLib.h> +#include <Library/PcdLib.h> + +VOID +__stack_chk_fail ( + VOID + ); + + +/// "canary" value that is inserted by the compiler into the stack frame. +VOID *__stack_chk_guard = (VOID*)0x0AFF; + +// If ASLR was enabled we could use +//void (*__stack_chk_guard)(void) = __stack_chk_fail; + +/** + Error path for compiler generated stack "canary" value check code. If the + stack canary has been overwritten this function gets called on exit of the + function. +**/ +VOID +__stack_chk_fail ( + VOID + ) +{ + UINT8 DebugPropertyMask; + + DEBUG ((DEBUG_ERROR, "STACK FAULT: Buffer Overflow in function %a.\n", __builtin_return_address(0))); + + // + // Generate a Breakpoint, DeadLoop, or NOP based on PCD settings even if + // BaseDebugLibNull is in use. + // + DebugPropertyMask = PcdGet8 (PcdDebugPropertyMask); + if ((DebugPropertyMask & DEBUG_PROPERTY_ASSERT_BREAKPOINT_ENABLED) != 0) { + CpuBreakpoint (); + } else if ((DebugPropertyMask & DEBUG_PROPERTY_ASSERT_DEADLOOP_ENABLED) != 0) { + CpuDeadLoop (); + } +} diff --git a/MdePkg/Library/BaseStackCheckLib/BaseStackCheckLib.inf b/MdePkg/Library/BaseStackCheckLib/BaseStackCheckLib.inf index 4e2285d..ebf4f9c 100644 --- a/MdePkg/Library/BaseStackCheckLib/BaseStackCheckLib.inf +++ b/MdePkg/Library/BaseStackCheckLib/BaseStackCheckLib.inf @@ -1,41 +1,41 @@ -## @file -# Stack Check Library -# -# Copyright (c) 2014, ARM Ltd. All rights reserved.<BR> -# -# This program and the accompanying materials -# are licensed and made available under the terms and conditions of the BSD License -# which accompanies this distribution. The full text of the license may be found at -# http://opensource.org/licenses/bsd-license.php. -# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -# -# -## - -[Defines] - INF_VERSION = 0x00010005 - BASE_NAME = BaseStackCheckLib - FILE_GUID = 5f6579f7-b648-4fdb-9f19-4c17e27e8eff - MODULE_TYPE = BASE - VERSION_STRING = 1.0 - LIBRARY_CLASS = BaseStackCheckLib - - -# -# VALID_ARCHITECTURES = ARM AARCH64 -# - -[Sources] - BaseStackCheckGcc.c | GCC - -[Packages] - MdePkg/MdePkg.dec - -[LibraryClasses] - BaseLib - DebugLib - -[Pcd] - gEfiMdePkgTokenSpaceGuid.PcdDebugPropertyMask - +## @file +# Stack Check Library +# +# Copyright (c) 2014, ARM Ltd. All rights reserved.<BR> +# +# This program and the accompanying materials +# are licensed and made available under the terms and conditions of the BSD License +# which accompanies this distribution. The full text of the license may be found at +# http://opensource.org/licenses/bsd-license.php. +# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, +# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. +# +# +## + +[Defines] + INF_VERSION = 0x00010005 + BASE_NAME = BaseStackCheckLib + FILE_GUID = 5f6579f7-b648-4fdb-9f19-4c17e27e8eff + MODULE_TYPE = BASE + VERSION_STRING = 1.0 + LIBRARY_CLASS = BaseStackCheckLib + + +# +# VALID_ARCHITECTURES = ARM AARCH64 +# + +[Sources] + BaseStackCheckGcc.c | GCC + BaseStackCheckGcc.c | RVCT + +[Packages] + MdePkg/MdePkg.dec + +[LibraryClasses] + BaseLib + DebugLib + +[Pcd] + gEfiMdePkgTokenSpaceGuid.PcdDebugPropertyMask -- 1.8.5 |
From: Olivier M. <oli...@ar...> - 2014-07-07 15:44:24
|
The initial code has been sent by Andrew Fish on the mainling-list. This library only supports GCC and XCode for now. I have only enables this code for ARM architectures but it should also work on other architectures. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Andrew Fish <and...@ap...> Signed-off-by: Olivier Martin <oli...@ar...> Best Regards, Olivier Olivier Martin (3): BaseTools: Added support for GCC stack protector for ARM architecture MdePkg: Introduced BaseStackCheckLib ARM Packages: Added support for GCC stack protector ArmPkg/ArmPkg.dsc | 8 +-- ArmPlatformPkg/ArmPlatformPkg-2ndstage.dsc | 21 ++++---- ArmPlatformPkg/ArmPlatformPkg.dsc | 22 ++++---- .../ArmRealViewEbPkg/ArmRealViewEb.dsc.inc | 3 ++ ArmPlatformPkg/ArmVExpressPkg/ArmVExpress.dsc.inc | 8 +-- BaseTools/Conf/tools_def.template | 24 ++++----- BeagleBoardPkg/BeagleBoardPkg.dsc | 2 + EmbeddedPkg/EmbeddedPkg.dsc | 3 ++ .../Library/BaseStackCheckLib/BaseStackCheckGcc.c | 61 ++++++++++++++++++++++ .../BaseStackCheckLib/BaseStackCheckLib.inf | 41 +++++++++++++++ 10 files changed, 153 insertions(+), 40 deletions(-) create mode 100644 MdePkg/Library/BaseStackCheckLib/BaseStackCheckGcc.c create mode 100644 MdePkg/Library/BaseStackCheckLib/BaseStackCheckLib.inf -- 1.8.5 |
From: Olivier M. <oli...@ar...> - 2014-07-07 15:44:22
|
Change-Id: Ifcc8c94297bb91cfec958718ac4d4727da9d506a --- BaseTools/Conf/tools_def.template | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/BaseTools/Conf/tools_def.template b/BaseTools/Conf/tools_def.template index 4d2c01c..21092fb 100755 --- a/BaseTools/Conf/tools_def.template +++ b/BaseTools/Conf/tools_def.template @@ -3162,9 +3162,9 @@ DEFINE GCC_IPF_RC_FLAGS = -I binary -O elf64-ia64-little -B ia64 DEFINE GCC_ARM_RC_FLAGS = -I binary -O elf32-littlearm -B arm --rename-section .data=.hii DEFINE GCC_AARCH64_RC_FLAGS = -I binary -O elf64-littleaarch64 -B aarch64 --rename-section .data=.hii -DEFINE GCC44_ALL_CC_FLAGS = -g -fshort-wchar -fno-stack-protector -fno-strict-aliasing -Wall -Werror -Wno-array-bounds -ffunction-sections -fdata-sections -c -include AutoGen.h -DSTRING_ARRAY_NAME=$(BASE_NAME)Strings -DEFINE GCC44_IA32_CC_FLAGS = DEF(GCC44_ALL_CC_FLAGS) -m32 -malign-double -D EFI32 -DEFINE GCC44_X64_CC_FLAGS = DEF(GCC44_ALL_CC_FLAGS) -m64 "-DEFIAPI=__attribute__((ms_abi))" -DNO_BUILTIN_VA_FUNCS -mno-red-zone -Wno-address -mcmodel=large +DEFINE GCC44_ALL_CC_FLAGS = -g -fshort-wchar -fno-strict-aliasing -Wall -Werror -Wno-array-bounds -ffunction-sections -fdata-sections -c -include AutoGen.h -DSTRING_ARRAY_NAME=$(BASE_NAME)Strings +DEFINE GCC44_IA32_CC_FLAGS = DEF(GCC44_ALL_CC_FLAGS) -m32 -malign-double -fno-stack-protector -D EFI32 +DEFINE GCC44_X64_CC_FLAGS = DEF(GCC44_ALL_CC_FLAGS) -m64 -fno-stack-protector "-DEFIAPI=__attribute__((ms_abi))" -DNO_BUILTIN_VA_FUNCS -mno-red-zone -Wno-address -mcmodel=large DEFINE GCC44_IA32_X64_DLINK_COMMON = -nostdlib -n -q --gc-sections --script=$(EDK_TOOLS_PATH)/Scripts/gcc4.4-ld-script DEFINE GCC44_IA32_X64_ASLDLINK_FLAGS = DEF(GCC44_IA32_X64_DLINK_COMMON) --entry ReferenceAcpiTable -u ReferenceAcpiTable DEFINE GCC44_IA32_X64_DLINK_FLAGS = DEF(GCC44_IA32_X64_DLINK_COMMON) --entry $(IMAGE_ENTRY_POINT) -u $(IMAGE_ENTRY_POINT) -Map $(DEST_DIR_DEBUG)/$(BASE_NAME).map @@ -3187,7 +3187,7 @@ DEFINE GCC46_IA32_X64_DLINK_FLAGS = DEF(GCC45_IA32_X64_DLINK_FLAGS) DEFINE GCC46_X64_DLINK_FLAGS = DEF(GCC45_X64_DLINK_FLAGS) DEFINE GCC46_ASM_FLAGS = DEF(GCC45_ASM_FLAGS) DEFINE GCC46_ARM_ASM_FLAGS = $(ARCHASM_FLAGS) $(PLATFORM_FLAGS) DEF(GCC_ASM_FLAGS) -mlittle-endian -DEFINE GCC46_ARM_CC_FLAGS = $(ARCHCC_FLAGS) $(PLATFORM_FLAGS) DEF(GCC44_ALL_CC_FLAGS) DEF(GCC_ARM_CC_FLAGS) -mno-unaligned-access +DEFINE GCC46_ARM_CC_FLAGS = $(ARCHCC_FLAGS) $(PLATFORM_FLAGS) DEF(GCC44_ALL_CC_FLAGS) DEF(GCC_ARM_CC_FLAGS) -mno-unaligned-access -fstack-protector DEFINE GCC46_ARM_DLINK_FLAGS = DEF(GCC_ARM_AARCH64_DLINK_COMMON) --oformat=elf32-littlearm DEFINE GCC46_ARM_ASLDLINK_FLAGS = DEF(GCC_ARM_AARCH64_ASLDLINK_FLAGS) --oformat=elf32-littlearm @@ -5463,8 +5463,8 @@ RELEASE_XCODE32_ARM_ASM_FLAGS = $(ARCHASM_FLAGS) *_XCODE32_ARM_PP_FLAGS = $(ARCHCC_FLAGS) $(PLATFORM_FLAGS) -E -x assembler-with-cpp -include $(DEST_DIR_DEBUG)/AutoGen.h *_XCODE32_ARM_VFRPP_FLAGS = $(ARCHCC_FLAGS) $(PLATFORM_FLAGS) -x c -E -P -DVFRCOMPILE --include $(DEST_DIR_DEBUG)/$(MODULE_NAME)StrDefs.h - DEBUG_XCODE32_ARM_CC_FLAGS = $(ARCHCC_FLAGS) $(PLATFORM_FLAGS) -mthumb-interwork -g -Oz -mabi=aapcs -mapcs -fno-short-enums -save-temps -combine -fshort-wchar -fno-strict-aliasing -Wall -Werror -Wno-missing-braces -fomit-frame-pointer -c -include AutoGen.h -fno-stack-protector -RELEASE_XCODE32_ARM_CC_FLAGS = $(ARCHCC_FLAGS) $(PLATFORM_FLAGS) -mthumb-interwork -Oz -mabi=aapcs -mapcs -fno-short-enums -save-temps -combine -fshort-wchar -fno-strict-aliasing -Wall -Werror -Wno-missing-braces -fomit-frame-pointer -c -include AutoGen.h -fno-stack-protector + DEBUG_XCODE32_ARM_CC_FLAGS = $(ARCHCC_FLAGS) $(PLATFORM_FLAGS) -mthumb-interwork -g -Oz -mabi=aapcs -mapcs -fno-short-enums -save-temps -combine -fshort-wchar -fno-strict-aliasing -Wall -Werror -Wno-missing-braces -fomit-frame-pointer -c -include AutoGen.h +RELEASE_XCODE32_ARM_CC_FLAGS = $(ARCHCC_FLAGS) $(PLATFORM_FLAGS) -mthumb-interwork -Oz -mabi=aapcs -mapcs -fno-short-enums -save-temps -combine -fshort-wchar -fno-strict-aliasing -Wall -Werror -Wno-missing-braces -fomit-frame-pointer -c -include AutoGen.h #################################################################################### @@ -5597,8 +5597,8 @@ RELEASE_LLVM_AARCH64_CC_FLAGS = DEF(LLVM_ALL_CC_FLAGS) -target armv8-none-eab #################################################################################### DEFINE RVCT_ALL_ASM_FLAGS = --diag_suppress=1786 --diag_error=warning --apcs /interwork -DEFINE RVCT_ALL_CC_FLAGS = --c90 -c --no_autoinline --asm --gnu --apcs /interwork --signed_chars --no_unaligned_access --split_sections --enum_is_int --preinclude AutoGen.h --diag_suppress=186 --diag_warning 167 --diag_error=warning --diag_style=ide -DEFINE RVCT_ALL_DLINK_FLAGS = --ro-base 0 --no_scanlib --reloc --no_exceptions --datacompressor off --strict --symbols --diag_style=ide +DEFINE RVCT_ALL_CC_FLAGS = --c90 -c --no_autoinline --asm --gnu --apcs /interwork --signed_chars --no_unaligned_access --split_sections --enum_is_int --preinclude AutoGen.h --diag_suppress=186 --diag_warning 167 --diag_error=warning --diag_style=ide --protect_stack +DEFINE RVCT_ALL_DLINK_FLAGS = --ro-base 0 --no_scanlib --reloc --no_exceptions --datacompressor off --strict --symbols --diag_style=ide #################################################################################### # @@ -5969,8 +5969,8 @@ RELEASE_ARMLINUXGCC_ARM_ASM_FLAGS = $(ARCHASM_FLAGS) $(PLATFORM_FLAGS) -mlittl *_ARMLINUXGCC_ARM_SLINK_FLAGS = -rc *_ARMLINUXGCC_ARM_DLINK_FLAGS = $(ARCHDLINK_FLAGS) DEF(GCC_ARM_AARCH64_DLINK_COMMON) --oformat=elf32-littlearm - DEBUG_ARMLINUXGCC_ARM_CC_FLAGS = $(ARCHCC_FLAGS) $(PLATFORM_FLAGS) DEF(GCC_ARM_CC_FLAGS) -fno-stack-protector -mno-unaligned-access -O0 -RELEASE_ARMLINUXGCC_ARM_CC_FLAGS = $(ARCHCC_FLAGS) $(PLATFORM_FLAGS) DEF(GCC_ARM_CC_FLAGS) -fno-stack-protector -mno-unaligned-access -Wno-unused-but-set-variable + DEBUG_ARMLINUXGCC_ARM_CC_FLAGS = $(ARCHCC_FLAGS) $(PLATFORM_FLAGS) DEF(GCC_ARM_CC_FLAGS) -mno-unaligned-access -O0 +RELEASE_ARMLINUXGCC_ARM_CC_FLAGS = $(ARCHCC_FLAGS) $(PLATFORM_FLAGS) DEF(GCC_ARM_CC_FLAGS) -mno-unaligned-access -Wno-unused-but-set-variable ###################### # AArch64 definitions @@ -6059,8 +6059,8 @@ RELEASE_ARMLINUXGCC_AARCH64_CC_FLAGS = $(ARCHCC_FLAGS) $(PLATFORM_FLAGS) DEF(GCC DEBUG_WINGCC_ARM_ASM_FLAGS = $(ARCHASM_FLAGS) $(PLATFORM_FLAGS) -mlittle-endian -g RELEASE_WINGCC_ARM_ASM_FLAGS = $(ARCHASM_FLAGS) $(PLATFORM_FLAGS) -mlittle-endian - DEBUG_WINGCC_ARM_CC_FLAGS = $(ARCHCC_FLAGS) $(PLATFORM_FLAGS) DEF(GCC_ARM_CC_FLAGS) -fno-stack-protector -O0 -mno-unaligned-access -RELEASE_WINGCC_ARM_CC_FLAGS = $(ARCHCC_FLAGS) $(PLATFORM_FLAGS) DEF(GCC_ARM_CC_FLAGS) -fno-stack-protector -Wno-unused-but-set-variable -mno-unaligned-access + DEBUG_WINGCC_ARM_CC_FLAGS = $(ARCHCC_FLAGS) $(PLATFORM_FLAGS) DEF(GCC_ARM_CC_FLAGS) -O0 -mno-unaligned-access +RELEASE_WINGCC_ARM_CC_FLAGS = $(ARCHCC_FLAGS) $(PLATFORM_FLAGS) DEF(GCC_ARM_CC_FLAGS) -Wno-unused-but-set-variable -mno-unaligned-access ###################### # AArch64 definitions -- 1.8.5 |
From: David C. <dav...@au...> - 2014-07-02 10:44:59
|
Hi, I am just going through the getting started, http://tianocore.sourceforge.net/wiki/Using_EDK_II_with_Native_GCC I have not modified the source. Downloaded from git as per wiki I got to run "build" no arguments give before getting these errors. I'd just changed: ACTIVE_PLATFORM = MdeModulePkg/MdeModulePkg.dsc TOOL_CHAIN_TAG = GCC44 TARGET_ARCH = X64 After checking my gcc would support X64, davec@davec-VirtualBox:/mnt/uefi6271/edk2/src/edk2$ gcc -v Using built-in specs. COLLECT_GCC=gcc COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/4.8/lto-wrapper Target: x86_64-linux-gnu Configured with: ../src/configure -v --with-pkgversion='Ubuntu 4.8.2-19ubuntu1' --with-bugurl=file:///usr/share/doc/gcc-4.8/README.Bugs --enable-languages=c,c++,java,go,d,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-4.8 --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.8 --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --enable-gnu-unique-object --disable-libmudflap --enable-plugin --with-system-zlib --disable-browser-plugin --enable-java-awt=gtk --enable-gtk-cairo --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-4.8-amd64/jre --enable-java-home --with-jvm-root-dir=/usr/lib/jvm/java-1.5.0-gcj-4.8-amd64 --with-jvm-jar-dir=/usr/lib/jvm-exports/java-1.5.0-gcj-4.8-amd64 --with-arch-directory=amd64 --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --enable-objc-gc --enable-multiarch --disable-werror --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --with-tune=generic --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu Thread model: posix gcc version 4.8.2 (Ubuntu 4.8.2-19ubuntu1) From: Gao, Liming [mailto:lim...@in...] Sent: 02 July 2014 11:25 To: David Cox; edk...@li... Subject: RE: [edk2-buildtools] Using EDK II with Native GCC, build fails with various python errors? Could you give your build command? Do you modify any source code? From: David Cox [mailto:dav...@au...] Sent: Wednesday, July 02, 2014 6:08 PM To: edk...@li...<mailto:edk...@li...> Subject: [edk2-buildtools] Using EDK II with Native GCC, build fails with various python errors? Hi, Attached is call stack trace from "build". I have been going through the getting started and have arrived at an error that I cannot seem to find to much information about. Any suggestions to move me forward would be very much appreciated. Regards, DaveC Build environment: Linux-3.13.0-24-generic-x86_64-with-Ubuntu-14.04-trusty Build start time: 10:55:14, Jul.02 2014 WORKSPACE = /mnt/uefi6271/edk2/src/edk2 ECP_SOURCE = /mnt/uefi6271/edk2/src/edk2/EdkCompatibilityPkg EDK_SOURCE = /mnt/uefi6271/edk2/src/edk2/EdkCompatibilityPkg EFI_SOURCE = /mnt/uefi6271/edk2/src/edk2/EdkCompatibilityPkg EDK_TOOLS_PATH = /mnt/uefi6271/edk2/src/edk2/BaseTools Architecture(s) = X64 Build target = DEBUG Toolchain = GCC44 Active Platform = /mnt/uefi6271/edk2/src/edk2/MdeModulePkg/MdeModulePkg.dsc Processing meta-data ................. build.py... : error C0DE: Unknown fatal error when processing [/mnt/uefi6271/edk2/src/edk2/MdePkg/MdePkg.dec] (Please send email to edk...@li...<mailto:edk...@li...> for help, attaching following call stack trace!) (Python 2.7.6 on linux2) Traceback (most recent call last): File "/mnt/uefi6271/edk2/src/edk2/BaseTools/BinWrappers/PosixLike/../../Source/Python/build/build.py", line 1828, in Main MyBuild.Launch() File "/mnt/uefi6271/edk2/src/edk2/BaseTools/BinWrappers/PosixLike/../../Source/Python/build/build.py", line 1595, in Launch self._MultiThreadBuildPlatform() File "/mnt/uefi6271/edk2/src/edk2/BaseTools/BinWrappers/PosixLike/../../Source/Python/build/build.py", line 1402, in _MultiThreadBuildPlatform self.Progress File "/mnt/uefi6271/edk2/src/edk2/BaseTools/Source/Python/AutoGen/AutoGen.py", line 130, in __new__ if not AutoGenObject._Init(Workspace, MetaFile, Target, Toolchain, Arch, *args, **kwargs): File "/mnt/uefi6271/edk2/src/edk2/BaseTools/Source/Python/AutoGen/AutoGen.py", line 300, in _Init Pkgs = PGen.PackageList File "/mnt/uefi6271/edk2/src/edk2/BaseTools/Source/Python/AutoGen/AutoGen.py", line 1320, in _GetPackageList for La in self.LibraryAutoGenList: File "/mnt/uefi6271/edk2/src/edk2/BaseTools/Source/Python/AutoGen/AutoGen.py", line 1423, in _GetLibraryAutoGenList self._GetAutoGenObjectList() File "/mnt/uefi6271/edk2/src/edk2/BaseTools/Source/Python/AutoGen/AutoGen.py", line 1408, in _GetAutoGenObjectList for La in Ma.LibraryAutoGenList: File "/mnt/uefi6271/edk2/src/edk2/BaseTools/Source/Python/AutoGen/AutoGen.py", line 3115, in _GetLibraryAutoGenList for Lib in La.CodaTargetList: File "/mnt/uefi6271/edk2/src/edk2/BaseTools/Source/Python/AutoGen/AutoGen.py", line 2579, in _GetFinalTargetList self._GetTargets() File "/mnt/uefi6271/edk2/src/edk2/BaseTools/Source/Python/AutoGen/AutoGen.py", line 2565, in _GetTargets if self.SourceFileList: File "/mnt/uefi6271/edk2/src/edk2/BaseTools/Source/Python/AutoGen/AutoGen.py", line 2430, in _GetSourceFileList if F.Dir not in self.IncludePathList and self.AutoGenVersion >= 0x00010005: File "/mnt/uefi6271/edk2/src/edk2/BaseTools/Source/Python/AutoGen/AutoGen.py", line 2752, in _GetIncludePathList for Inc in Package.Includes: File "/mnt/uefi6271/edk2/src/edk2/BaseTools/Source/Python/Workspace/WorkspaceDatabase.py", line 1347, in _GetInclude RecordList = self._RawData[MODEL_EFI_INCLUDE, self._Arch] File "/mnt/uefi6271/edk2/src/edk2/BaseTools/Source/Python/Workspace/MetaFileParser.py", line 226, in __getitem__ self.Start() File "/mnt/uefi6271/edk2/src/edk2/BaseTools/Source/Python/Workspace/MetaFileParser.py", line 1629, in Start self._SectionParser[self._SectionType[0]](self) File "/mnt/uefi6271/edk2/src/edk2/BaseTools/Source/Python/Workspace/MetaFileParser.py", line 40, in MacroParser Parser(self) File "/mnt/uefi6271/edk2/src/edk2/BaseTools/Source/Python/Workspace/MetaFileParser.py", line 1829, in _PcdParser IsValid, Cause = CheckPcdDatum(ValueList[1], ValueList[0]) File "/mnt/uefi6271/edk2/src/edk2/BaseTools/Source/Python/Common/Misc.py", line 1398, in CheckPcdDatum Printset = set(string.printable) AttributeError: 'module' object has no attribute 'printable' - Failed - Build end time: 10:55:53, Jul.02 2014 Build total time: 00:00:39 ________________________________ [http://www2.autologic.com/logo.gif] David Cox Hardware Engineer Autologic Diagnostics Ltd Tel: +44 1865 870050 Mobile: Fax: +44 1865 870051 Email: dav...@au...<mailto:dav...@au...> Website: www.autologic.com<http://www.autologic.com> This message contains information which may be confidential and is intended for the named addressee only. Unless you are the named addressee, or authorised to receive it on behalf of the addressee you may not copy or use it, or disclose it to anyone else. Any views or opinions expressed in this message are those of the author and not necessarily representative of those of Autologic Diagnostics Ltd. Whilst every endeavour is taken to ensure that e-mails are free from viruses, no liability can be accepted and the recipient is requested to use their own virus checking software. If you have received this email in error please accept our apology and contact the sender. All work carried out on any vehicle using Autologic diagnostic equipment must be carried out in strict accordance with the instructions contained within the relevant manufacturer's workshop manuals. Autologic Diagnostics limited accepts no responsibility or liability for any damage or claim arising from any work carried out by operatives using equipment supplied by Autologic Diagnostics limited. Registered Office: Autologic House, London Road, Wheatley, Oxon, OX33 1JH, England, UK Registered in England & Wales No. 06814180 ________________________________ [http://www2.autologic.com/logo.gif] David Cox Hardware Engineer Autologic Diagnostics Ltd Tel: +44 1865 870050 Mobile: Fax: +44 1865 870051 Email: dav...@au... Website: www.autologic.com<http://www.autologic.com> This message contains information which may be confidential and is intended for the named addressee only. Unless you are the named addressee, or authorised to receive it on behalf of the addressee you may not copy or use it, or disclose it to anyone else. Any views or opinions expressed in this message are those of the author and not necessarily representative of those of Autologic Diagnostics Ltd. Whilst every endeavour is taken to ensure that e-mails are free from viruses, no liability can be accepted and the recipient is requested to use their own virus checking software. If you have received this email in error please accept our apology and contact the sender. All work carried out on any vehicle using Autologic diagnostic equipment must be carried out in strict accordance with the instructions contained within the relevant manufacturer's workshop manuals. Autologic Diagnostics limited accepts no responsibility or liability for any damage or claim arising from any work carried out by operatives using equipment supplied by Autologic Diagnostics limited. Registered Office: Autologic House, London Road, Wheatley, Oxon, OX33 1JH, England, UK Registered in England & Wales No. 06814180 |
From: Gao, L. <lim...@in...> - 2014-07-02 10:25:11
|
Could you give your build command? Do you modify any source code? From: David Cox [mailto:dav...@au...] Sent: Wednesday, July 02, 2014 6:08 PM To: edk...@li... Subject: [edk2-buildtools] Using EDK II with Native GCC, build fails with various python errors? Hi, Attached is call stack trace from "build". I have been going through the getting started and have arrived at an error that I cannot seem to find to much information about. Any suggestions to move me forward would be very much appreciated. Regards, DaveC Build environment: Linux-3.13.0-24-generic-x86_64-with-Ubuntu-14.04-trusty Build start time: 10:55:14, Jul.02 2014 WORKSPACE = /mnt/uefi6271/edk2/src/edk2 ECP_SOURCE = /mnt/uefi6271/edk2/src/edk2/EdkCompatibilityPkg EDK_SOURCE = /mnt/uefi6271/edk2/src/edk2/EdkCompatibilityPkg EFI_SOURCE = /mnt/uefi6271/edk2/src/edk2/EdkCompatibilityPkg EDK_TOOLS_PATH = /mnt/uefi6271/edk2/src/edk2/BaseTools Architecture(s) = X64 Build target = DEBUG Toolchain = GCC44 Active Platform = /mnt/uefi6271/edk2/src/edk2/MdeModulePkg/MdeModulePkg.dsc Processing meta-data ................. build.py... : error C0DE: Unknown fatal error when processing [/mnt/uefi6271/edk2/src/edk2/MdePkg/MdePkg.dec] (Please send email to edk...@li...<mailto:edk...@li...> for help, attaching following call stack trace!) (Python 2.7.6 on linux2) Traceback (most recent call last): File "/mnt/uefi6271/edk2/src/edk2/BaseTools/BinWrappers/PosixLike/../../Source/Python/build/build.py", line 1828, in Main MyBuild.Launch() File "/mnt/uefi6271/edk2/src/edk2/BaseTools/BinWrappers/PosixLike/../../Source/Python/build/build.py", line 1595, in Launch self._MultiThreadBuildPlatform() File "/mnt/uefi6271/edk2/src/edk2/BaseTools/BinWrappers/PosixLike/../../Source/Python/build/build.py", line 1402, in _MultiThreadBuildPlatform self.Progress File "/mnt/uefi6271/edk2/src/edk2/BaseTools/Source/Python/AutoGen/AutoGen.py", line 130, in __new__ if not AutoGenObject._Init(Workspace, MetaFile, Target, Toolchain, Arch, *args, **kwargs): File "/mnt/uefi6271/edk2/src/edk2/BaseTools/Source/Python/AutoGen/AutoGen.py", line 300, in _Init Pkgs = PGen.PackageList File "/mnt/uefi6271/edk2/src/edk2/BaseTools/Source/Python/AutoGen/AutoGen.py", line 1320, in _GetPackageList for La in self.LibraryAutoGenList: File "/mnt/uefi6271/edk2/src/edk2/BaseTools/Source/Python/AutoGen/AutoGen.py", line 1423, in _GetLibraryAutoGenList self._GetAutoGenObjectList() File "/mnt/uefi6271/edk2/src/edk2/BaseTools/Source/Python/AutoGen/AutoGen.py", line 1408, in _GetAutoGenObjectList for La in Ma.LibraryAutoGenList: File "/mnt/uefi6271/edk2/src/edk2/BaseTools/Source/Python/AutoGen/AutoGen.py", line 3115, in _GetLibraryAutoGenList for Lib in La.CodaTargetList: File "/mnt/uefi6271/edk2/src/edk2/BaseTools/Source/Python/AutoGen/AutoGen.py", line 2579, in _GetFinalTargetList self._GetTargets() File "/mnt/uefi6271/edk2/src/edk2/BaseTools/Source/Python/AutoGen/AutoGen.py", line 2565, in _GetTargets if self.SourceFileList: File "/mnt/uefi6271/edk2/src/edk2/BaseTools/Source/Python/AutoGen/AutoGen.py", line 2430, in _GetSourceFileList if F.Dir not in self.IncludePathList and self.AutoGenVersion >= 0x00010005: File "/mnt/uefi6271/edk2/src/edk2/BaseTools/Source/Python/AutoGen/AutoGen.py", line 2752, in _GetIncludePathList for Inc in Package.Includes: File "/mnt/uefi6271/edk2/src/edk2/BaseTools/Source/Python/Workspace/WorkspaceDatabase.py", line 1347, in _GetInclude RecordList = self._RawData[MODEL_EFI_INCLUDE, self._Arch] File "/mnt/uefi6271/edk2/src/edk2/BaseTools/Source/Python/Workspace/MetaFileParser.py", line 226, in __getitem__ self.Start() File "/mnt/uefi6271/edk2/src/edk2/BaseTools/Source/Python/Workspace/MetaFileParser.py", line 1629, in Start self._SectionParser[self._SectionType[0]](self) File "/mnt/uefi6271/edk2/src/edk2/BaseTools/Source/Python/Workspace/MetaFileParser.py", line 40, in MacroParser Parser(self) File "/mnt/uefi6271/edk2/src/edk2/BaseTools/Source/Python/Workspace/MetaFileParser.py", line 1829, in _PcdParser IsValid, Cause = CheckPcdDatum(ValueList[1], ValueList[0]) File "/mnt/uefi6271/edk2/src/edk2/BaseTools/Source/Python/Common/Misc.py", line 1398, in CheckPcdDatum Printset = set(string.printable) AttributeError: 'module' object has no attribute 'printable' - Failed - Build end time: 10:55:53, Jul.02 2014 Build total time: 00:00:39 ________________________________ [http://www2.autologic.com/logo.gif] David Cox Hardware Engineer Autologic Diagnostics Ltd Tel: +44 1865 870050 Mobile: Fax: +44 1865 870051 Email: dav...@au...<mailto:dav...@au...> Website: www.autologic.com<http://www.autologic.com> This message contains information which may be confidential and is intended for the named addressee only. Unless you are the named addressee, or authorised to receive it on behalf of the addressee you may not copy or use it, or disclose it to anyone else. Any views or opinions expressed in this message are those of the author and not necessarily representative of those of Autologic Diagnostics Ltd. Whilst every endeavour is taken to ensure that e-mails are free from viruses, no liability can be accepted and the recipient is requested to use their own virus checking software. If you have received this email in error please accept our apology and contact the sender. All work carried out on any vehicle using Autologic diagnostic equipment must be carried out in strict accordance with the instructions contained within the relevant manufacturer's workshop manuals. Autologic Diagnostics limited accepts no responsibility or liability for any damage or claim arising from any work carried out by operatives using equipment supplied by Autologic Diagnostics limited. Registered Office: Autologic House, London Road, Wheatley, Oxon, OX33 1JH, England, UK Registered in England & Wales No. 06814180 |
From: David C. <dav...@au...> - 2014-07-02 10:22:16
|
Hi, Attached is call stack trace from "build". I have been going through the getting started and have arrived at an error that I cannot seem to find to much information about. Any suggestions to move me forward would be very much appreciated. Regards, DaveC Build environment: Linux-3.13.0-24-generic-x86_64-with-Ubuntu-14.04-trusty Build start time: 10:55:14, Jul.02 2014 WORKSPACE = /mnt/uefi6271/edk2/src/edk2 ECP_SOURCE = /mnt/uefi6271/edk2/src/edk2/EdkCompatibilityPkg EDK_SOURCE = /mnt/uefi6271/edk2/src/edk2/EdkCompatibilityPkg EFI_SOURCE = /mnt/uefi6271/edk2/src/edk2/EdkCompatibilityPkg EDK_TOOLS_PATH = /mnt/uefi6271/edk2/src/edk2/BaseTools Architecture(s) = X64 Build target = DEBUG Toolchain = GCC44 Active Platform = /mnt/uefi6271/edk2/src/edk2/MdeModulePkg/MdeModulePkg.dsc Processing meta-data ................. build.py... : error C0DE: Unknown fatal error when processing [/mnt/uefi6271/edk2/src/edk2/MdePkg/MdePkg.dec] (Please send email to edk...@li... for help, attaching following call stack trace!) (Python 2.7.6 on linux2) Traceback (most recent call last): File "/mnt/uefi6271/edk2/src/edk2/BaseTools/BinWrappers/PosixLike/../../Source/Python/build/build.py", line 1828, in Main MyBuild.Launch() File "/mnt/uefi6271/edk2/src/edk2/BaseTools/BinWrappers/PosixLike/../../Source/Python/build/build.py", line 1595, in Launch self._MultiThreadBuildPlatform() File "/mnt/uefi6271/edk2/src/edk2/BaseTools/BinWrappers/PosixLike/../../Source/Python/build/build.py", line 1402, in _MultiThreadBuildPlatform self.Progress File "/mnt/uefi6271/edk2/src/edk2/BaseTools/Source/Python/AutoGen/AutoGen.py", line 130, in __new__ if not AutoGenObject._Init(Workspace, MetaFile, Target, Toolchain, Arch, *args, **kwargs): File "/mnt/uefi6271/edk2/src/edk2/BaseTools/Source/Python/AutoGen/AutoGen.py", line 300, in _Init Pkgs = PGen.PackageList File "/mnt/uefi6271/edk2/src/edk2/BaseTools/Source/Python/AutoGen/AutoGen.py", line 1320, in _GetPackageList for La in self.LibraryAutoGenList: File "/mnt/uefi6271/edk2/src/edk2/BaseTools/Source/Python/AutoGen/AutoGen.py", line 1423, in _GetLibraryAutoGenList self._GetAutoGenObjectList() File "/mnt/uefi6271/edk2/src/edk2/BaseTools/Source/Python/AutoGen/AutoGen.py", line 1408, in _GetAutoGenObjectList for La in Ma.LibraryAutoGenList: File "/mnt/uefi6271/edk2/src/edk2/BaseTools/Source/Python/AutoGen/AutoGen.py", line 3115, in _GetLibraryAutoGenList for Lib in La.CodaTargetList: File "/mnt/uefi6271/edk2/src/edk2/BaseTools/Source/Python/AutoGen/AutoGen.py", line 2579, in _GetFinalTargetList self._GetTargets() File "/mnt/uefi6271/edk2/src/edk2/BaseTools/Source/Python/AutoGen/AutoGen.py", line 2565, in _GetTargets if self.SourceFileList: File "/mnt/uefi6271/edk2/src/edk2/BaseTools/Source/Python/AutoGen/AutoGen.py", line 2430, in _GetSourceFileList if F.Dir not in self.IncludePathList and self.AutoGenVersion >= 0x00010005: File "/mnt/uefi6271/edk2/src/edk2/BaseTools/Source/Python/AutoGen/AutoGen.py", line 2752, in _GetIncludePathList for Inc in Package.Includes: File "/mnt/uefi6271/edk2/src/edk2/BaseTools/Source/Python/Workspace/WorkspaceDatabase.py", line 1347, in _GetInclude RecordList = self._RawData[MODEL_EFI_INCLUDE, self._Arch] File "/mnt/uefi6271/edk2/src/edk2/BaseTools/Source/Python/Workspace/MetaFileParser.py", line 226, in __getitem__ self.Start() File "/mnt/uefi6271/edk2/src/edk2/BaseTools/Source/Python/Workspace/MetaFileParser.py", line 1629, in Start self._SectionParser[self._SectionType[0]](self) File "/mnt/uefi6271/edk2/src/edk2/BaseTools/Source/Python/Workspace/MetaFileParser.py", line 40, in MacroParser Parser(self) File "/mnt/uefi6271/edk2/src/edk2/BaseTools/Source/Python/Workspace/MetaFileParser.py", line 1829, in _PcdParser IsValid, Cause = CheckPcdDatum(ValueList[1], ValueList[0]) File "/mnt/uefi6271/edk2/src/edk2/BaseTools/Source/Python/Common/Misc.py", line 1398, in CheckPcdDatum Printset = set(string.printable) AttributeError: 'module' object has no attribute 'printable' - Failed - Build end time: 10:55:53, Jul.02 2014 Build total time: 00:00:39 ________________________________ [http://www2.autologic.com/logo.gif] David Cox Hardware Engineer Autologic Diagnostics Ltd Tel: +44 1865 870050 Mobile: Fax: +44 1865 870051 Email: dav...@au... Website: www.autologic.com<http://www.autologic.com> This message contains information which may be confidential and is intended for the named addressee only. Unless you are the named addressee, or authorised to receive it on behalf of the addressee you may not copy or use it, or disclose it to anyone else. Any views or opinions expressed in this message are those of the author and not necessarily representative of those of Autologic Diagnostics Ltd. Whilst every endeavour is taken to ensure that e-mails are free from viruses, no liability can be accepted and the recipient is requested to use their own virus checking software. If you have received this email in error please accept our apology and contact the sender. All work carried out on any vehicle using Autologic diagnostic equipment must be carried out in strict accordance with the instructions contained within the relevant manufacturer's workshop manuals. Autologic Diagnostics limited accepts no responsibility or liability for any damage or claim arising from any work carried out by operatives using equipment supplied by Autologic Diagnostics limited. Registered Office: Autologic House, London Road, Wheatley, Oxon, OX33 1JH, England, UK Registered in England & Wales No. 06814180 |
From: Andrew F. <af...@ap...> - 2014-06-27 22:16:00
|
On Jun 27, 2014, at 3:08 PM, Jordan Justen <jlj...@gm...> wrote: > On Fri, Jun 27, 2014 at 1:54 PM, Andrew Fish <af...@ap...> wrote: >> I though I would share some useful git aliases with folks. >> >> Have you ever wondered how many instances (different implementations) of a >> library class there are? Or what is the value of a GUID Cname? Or what >> GUID’ed name space a PCD lives under, and what is the default value for the >> PCD? >> >> [alias] >> grep-guid = "!f() { cd ${GIT_PREFIX:-.} && git grep $1 -- *.dec; }; f" >> grep-pcd = "!f() { cd ${GIT_PREFIX:-.} && git grep $1 -- *.dec; }; f" >> grep-library-include = "!f() { cd ${GIT_PREFIX:-.} && git grep $1 -- *.dec; >> }; f" >> grep-library-class = "!f() { cd ${GIT_PREFIX:-.} && git grep >> LIBRARY_CLASS.*"$1" -- *.inf; }; f" > > Nice. I think we need to find a way to document these in the tree. > Maybe BaseTools/README.git? (Maybe after the BaseTools merge?) > It is also possible to check this kind of stuff into source control. You create a .gitalias file and then all the team members do a one time update to their .git/conifg: [include] path = ../.gitalias http://stackoverflow.com/questions/2380765/git-aliases-that-are-stored-in-origin Not sure if that same scheme would work on the diff “uni”? And log1, logg would probably to “well know” and would conflict with peoples generic git config. Thanks, Andrew Fish > Laszlo also had a few useful tips in the past. For example, to help > diff .uni files: > [diff "uni"] > textconv = iconv -f UCS-2 -t UTF-8 > binary = true > Plus .git/info/attributes: > *.uni diff=uni > *.UNI diff=uni > > These are generic (not EDK II specific), but probably my favorite > ~/.gitconfig changes: > [alias] > log1 = log --oneline > logg = log --oneline --graph > [log] > decorate = short > > 'git log1' would be more valuable if people consistently followed: > http://tianocore.sourceforge.net/wiki/Code_Style/Commit_Message > > -Jordan > >> (master)>git grep-guid gEfiBlockIoProtocolGuid >> MdePkg/MdePkg.dec:1111: gEfiBlockIoProtocolGuid = { 0x964E5B21, >> 0x6459, 0x11D2, { 0x8E, 0x39, 0x00, 0xA0, 0xC9, 0x69, 0x72, 0x3B }} >> (master)>git grep-pcd PcdMaximumGuidedExtractHandler >> MdePkg/MdePkg.dec:1543: # The required memory space is decided by the >> value of PcdMaximumGuidedExtractHandler. >> MdePkg/MdePkg.dec:1555: >> gEfiMdePkgTokenSpaceGuid.PcdMaximumGuidedExtractHandler|0x10|UINT32|0x00000025 >> (master)>git grep-library-include BaseMemoryLib >> MdePkg/MdePkg.dec:177: BaseMemoryLib|Include/Library/BaseMemoryLib.h >> (master)>git grep-library-class BaseMemoryLib >> ArmPkg/Library/BaseMemoryLibStm/BaseMemoryLibStm.inf:28: LIBRARY_CLASS >> = BaseMemoryLib >> ArmPkg/Library/BaseMemoryLibVstm/BaseMemoryLibVstm.inf:35: LIBRARY_CLASS >> = BaseMemoryLib >> MdePkg/Library/BaseMemoryLib/BaseMemoryLib.inf:24: LIBRARY_CLASS >> = BaseMemoryLib >> MdePkg/Library/BaseMemoryLibMmx/BaseMemoryLibMmx.inf:25: LIBRARY_CLASS >> = BaseMemoryLib >> MdePkg/Library/BaseMemoryLibOptDxe/BaseMemoryLibOptDxe.inf:25: >> LIBRARY_CLASS = BaseMemoryLib >> MdePkg/Library/BaseMemoryLibOptPei/BaseMemoryLibOptPei.inf:25: >> LIBRARY_CLASS = BaseMemoryLib >> MdePkg/Library/BaseMemoryLibRepStr/BaseMemoryLibRepStr.inf:25: >> LIBRARY_CLASS = BaseMemoryLib >> MdePkg/Library/BaseMemoryLibSse2/BaseMemoryLibSse2.inf:25: LIBRARY_CLASS >> = BaseMemoryLib >> MdePkg/Library/PeiMemoryLib/PeiMemoryLib.inf:25: LIBRARY_CLASS >> = BaseMemoryLib|PEIM >> MdePkg/Library/UefiMemoryLib/UefiMemoryLib.inf:25: LIBRARY_CLASS >> = BaseMemoryLib|DXE_DRIVER DXE_RUNTIME_DRIVER DXE_SAL_DRIVER DXE_SMM_DRIVER >> UEFI_APPLICATION UEFI_DRIVER >> >> >> Thanks, >> >> Andrew Fish >> >> PS The “cd ${GIT_PREFIX:-.}” is need for the commands run from the current >> working directory. If you always want to search the entire project you can >> remove these. >> >> PPS Not sure if you have to modify the commands for Windows? >> >> Contributed-under: TianoCore Contribution Agreement 1.0 >> >> >> ------------------------------------------------------------------------------ >> Open source business process management suite built on Java and Eclipse >> Turn processes into business applications with Bonita BPM Community Edition >> Quickly connect people, data, and systems into organized workflows >> Winner of BOSSIE, CODIE, OW2 and Gartner awards >> http://p.sf.net/sfu/Bonitasoft >> _______________________________________________ >> edk2-buildtools-devel mailing list >> edk...@li... >> https://lists.sourceforge.net/lists/listinfo/edk2-buildtools-devel >> |
From: Jordan J. <jlj...@gm...> - 2014-06-27 22:08:22
|
On Fri, Jun 27, 2014 at 1:54 PM, Andrew Fish <af...@ap...> wrote: > I though I would share some useful git aliases with folks. > > Have you ever wondered how many instances (different implementations) of a > library class there are? Or what is the value of a GUID Cname? Or what > GUID’ed name space a PCD lives under, and what is the default value for the > PCD? > > [alias] > grep-guid = "!f() { cd ${GIT_PREFIX:-.} && git grep $1 -- *.dec; }; f" > grep-pcd = "!f() { cd ${GIT_PREFIX:-.} && git grep $1 -- *.dec; }; f" > grep-library-include = "!f() { cd ${GIT_PREFIX:-.} && git grep $1 -- *.dec; > }; f" > grep-library-class = "!f() { cd ${GIT_PREFIX:-.} && git grep > LIBRARY_CLASS.*"$1" -- *.inf; }; f" Nice. I think we need to find a way to document these in the tree. Maybe BaseTools/README.git? (Maybe after the BaseTools merge?) Laszlo also had a few useful tips in the past. For example, to help diff .uni files: [diff "uni"] textconv = iconv -f UCS-2 -t UTF-8 binary = true Plus .git/info/attributes: *.uni diff=uni *.UNI diff=uni These are generic (not EDK II specific), but probably my favorite ~/.gitconfig changes: [alias] log1 = log --oneline logg = log --oneline --graph [log] decorate = short 'git log1' would be more valuable if people consistently followed: http://tianocore.sourceforge.net/wiki/Code_Style/Commit_Message -Jordan > (master)>git grep-guid gEfiBlockIoProtocolGuid > MdePkg/MdePkg.dec:1111: gEfiBlockIoProtocolGuid = { 0x964E5B21, > 0x6459, 0x11D2, { 0x8E, 0x39, 0x00, 0xA0, 0xC9, 0x69, 0x72, 0x3B }} > (master)>git grep-pcd PcdMaximumGuidedExtractHandler > MdePkg/MdePkg.dec:1543: # The required memory space is decided by the > value of PcdMaximumGuidedExtractHandler. > MdePkg/MdePkg.dec:1555: > gEfiMdePkgTokenSpaceGuid.PcdMaximumGuidedExtractHandler|0x10|UINT32|0x00000025 > (master)>git grep-library-include BaseMemoryLib > MdePkg/MdePkg.dec:177: BaseMemoryLib|Include/Library/BaseMemoryLib.h > (master)>git grep-library-class BaseMemoryLib > ArmPkg/Library/BaseMemoryLibStm/BaseMemoryLibStm.inf:28: LIBRARY_CLASS > = BaseMemoryLib > ArmPkg/Library/BaseMemoryLibVstm/BaseMemoryLibVstm.inf:35: LIBRARY_CLASS > = BaseMemoryLib > MdePkg/Library/BaseMemoryLib/BaseMemoryLib.inf:24: LIBRARY_CLASS > = BaseMemoryLib > MdePkg/Library/BaseMemoryLibMmx/BaseMemoryLibMmx.inf:25: LIBRARY_CLASS > = BaseMemoryLib > MdePkg/Library/BaseMemoryLibOptDxe/BaseMemoryLibOptDxe.inf:25: > LIBRARY_CLASS = BaseMemoryLib > MdePkg/Library/BaseMemoryLibOptPei/BaseMemoryLibOptPei.inf:25: > LIBRARY_CLASS = BaseMemoryLib > MdePkg/Library/BaseMemoryLibRepStr/BaseMemoryLibRepStr.inf:25: > LIBRARY_CLASS = BaseMemoryLib > MdePkg/Library/BaseMemoryLibSse2/BaseMemoryLibSse2.inf:25: LIBRARY_CLASS > = BaseMemoryLib > MdePkg/Library/PeiMemoryLib/PeiMemoryLib.inf:25: LIBRARY_CLASS > = BaseMemoryLib|PEIM > MdePkg/Library/UefiMemoryLib/UefiMemoryLib.inf:25: LIBRARY_CLASS > = BaseMemoryLib|DXE_DRIVER DXE_RUNTIME_DRIVER DXE_SAL_DRIVER DXE_SMM_DRIVER > UEFI_APPLICATION UEFI_DRIVER > > > Thanks, > > Andrew Fish > > PS The “cd ${GIT_PREFIX:-.}” is need for the commands run from the current > working directory. If you always want to search the entire project you can > remove these. > > PPS Not sure if you have to modify the commands for Windows? > > Contributed-under: TianoCore Contribution Agreement 1.0 > > > ------------------------------------------------------------------------------ > Open source business process management suite built on Java and Eclipse > Turn processes into business applications with Bonita BPM Community Edition > Quickly connect people, data, and systems into organized workflows > Winner of BOSSIE, CODIE, OW2 and Gartner awards > http://p.sf.net/sfu/Bonitasoft > _______________________________________________ > edk2-buildtools-devel mailing list > edk...@li... > https://lists.sourceforge.net/lists/listinfo/edk2-buildtools-devel > |
From: Andrew F. <af...@ap...> - 2014-06-27 20:54:34
|
I though I would share some useful git aliases with folks. Have you ever wondered how many instances (different implementations) of a library class there are? Or what is the value of a GUID Cname? Or what GUID’ed name space a PCD lives under, and what is the default value for the PCD? [alias] grep-guid = "!f() { cd ${GIT_PREFIX:-.} && git grep $1 -- *.dec; }; f" grep-pcd = "!f() { cd ${GIT_PREFIX:-.} && git grep $1 -- *.dec; }; f" grep-library-include = "!f() { cd ${GIT_PREFIX:-.} && git grep $1 -- *.dec; }; f" grep-library-class = "!f() { cd ${GIT_PREFIX:-.} && git grep LIBRARY_CLASS.*"$1" -- *.inf; }; f" (master)>git grep-guid gEfiBlockIoProtocolGuid MdePkg/MdePkg.dec:1111: gEfiBlockIoProtocolGuid = { 0x964E5B21, 0x6459, 0x11D2, { 0x8E, 0x39, 0x00, 0xA0, 0xC9, 0x69, 0x72, 0x3B }} (master)>git grep-pcd PcdMaximumGuidedExtractHandler MdePkg/MdePkg.dec:1543: # The required memory space is decided by the value of PcdMaximumGuidedExtractHandler. MdePkg/MdePkg.dec:1555: gEfiMdePkgTokenSpaceGuid.PcdMaximumGuidedExtractHandler|0x10|UINT32|0x00000025 (master)>git grep-library-include BaseMemoryLib MdePkg/MdePkg.dec:177: BaseMemoryLib|Include/Library/BaseMemoryLib.h (master)>git grep-library-class BaseMemoryLib ArmPkg/Library/BaseMemoryLibStm/BaseMemoryLibStm.inf:28: LIBRARY_CLASS = BaseMemoryLib ArmPkg/Library/BaseMemoryLibVstm/BaseMemoryLibVstm.inf:35: LIBRARY_CLASS = BaseMemoryLib MdePkg/Library/BaseMemoryLib/BaseMemoryLib.inf:24: LIBRARY_CLASS = BaseMemoryLib MdePkg/Library/BaseMemoryLibMmx/BaseMemoryLibMmx.inf:25: LIBRARY_CLASS = BaseMemoryLib MdePkg/Library/BaseMemoryLibOptDxe/BaseMemoryLibOptDxe.inf:25: LIBRARY_CLASS = BaseMemoryLib MdePkg/Library/BaseMemoryLibOptPei/BaseMemoryLibOptPei.inf:25: LIBRARY_CLASS = BaseMemoryLib MdePkg/Library/BaseMemoryLibRepStr/BaseMemoryLibRepStr.inf:25: LIBRARY_CLASS = BaseMemoryLib MdePkg/Library/BaseMemoryLibSse2/BaseMemoryLibSse2.inf:25: LIBRARY_CLASS = BaseMemoryLib MdePkg/Library/PeiMemoryLib/PeiMemoryLib.inf:25: LIBRARY_CLASS = BaseMemoryLib|PEIM MdePkg/Library/UefiMemoryLib/UefiMemoryLib.inf:25: LIBRARY_CLASS = BaseMemoryLib|DXE_DRIVER DXE_RUNTIME_DRIVER DXE_SAL_DRIVER DXE_SMM_DRIVER UEFI_APPLICATION UEFI_DRIVER Thanks, Andrew Fish PS The “cd ${GIT_PREFIX:-.}” is need for the commands run from the current working directory. If you always want to search the entire project you can remove these. PPS Not sure if you have to modify the commands for Windows? Contributed-under: TianoCore Contribution Agreement 1.0 |