diff options
author | Taylor Beebe <taylor.d.beebe@gmail.com> | 2024-08-27 14:34:35 -0700 |
---|---|---|
committer | mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> | 2024-09-13 03:58:46 +0000 |
commit | 5000568969995293b529f49ea43726e2d0a9dcab (patch) | |
tree | 846b74d6008791b58f9f7acd99d8b0cd38f407f2 /UnitTestFrameworkPkg | |
parent | ac43bbacdef18a6fea6d978e096326ec0805885d (diff) | |
download | edk2-5000568969995293b529f49ea43726e2d0a9dcab.tar.gz edk2-5000568969995293b529f49ea43726e2d0a9dcab.tar.bz2 edk2-5000568969995293b529f49ea43726e2d0a9dcab.zip |
MdePkg: Create Stack Check Lib
StackCheckLib contains the required functionality for initializing
the stack cookie value, checking the value, and triggering an interrupt
when a mismatch occurs. The stack cookie is a random value placed on the
stack between the stack variables and the return address so that
continuously writing past the stack variables will cause the stack cookie
to be overwritten. Before the function returns, the stack cookie value
will be checked and if there is a mismatch then StackCheckLib handles the
failure.
Because UEFI doesn't use the C runtime libraries provided by MSVC, the
stack check code is written in assembly within this library. GCC and
Clang compilers have built-in support for stack cookie checking, so this
library only handles failures.
Signed-off-by: Oliver Smith-Denny <osde@linux.microsoft.com>
Diffstat (limited to 'UnitTestFrameworkPkg')
0 files changed, 0 insertions, 0 deletions