Commit graph

6 commits

Author SHA1 Message Date
Chao Li
42fde88a42 MdePkg/DynamicStackCookieEntryPointLib: Add LoongArch64 support
Added LoongArch64 support. Currently, LoongArch64 doesn't supports TRNG,
it uses the `RDTIME` instruction and a xorshif64 alorithms to compose a
PRNG(RngLib).
It may supports the SE TRNG in the future, and will change to the TRNG
when SE support becomes available.

Signed-off-by: Chao Li <lichao@loongson.cn>
Cc: Michael D Kinney <michael.d.kinney@intel.com>
Cc: Liming Gao <gaoliming@byosoft.com.cn>
2026-07-07 08:49:21 +00:00
Qihang Gao
fc9c095c12 MdePkg: Remove redundant section name in inf files
[Sources] appears twice in BaseMemoryLibOptDxe.inf, [Sources.X64]
appears twice in StandaloneMmCoreEntryPoint.inf, remove the redundant
ones to make the files more concise.

Signed-off-by: Qihang Gao <gaoqihang@loongson.cn>
2026-06-03 02:18:39 +00:00
Oliver Smith-Denny
6f73fbea97 MdePkg: Fix Spelling Errors in Comments
This fixes all non-breaking spelling errors in
MdePkg.

Signed-off-by: Oliver Smith-Denny <osde@microsoft.com>
2026-05-08 02:15:34 +00:00
Ard Biesheuvel
96cf70951f MdePkg/DynamicStackCookieEntryPointLib: Drop execute-in-place versions
SEC, PEI_CORE and PEIM type modules generally execute in place from
memory that is not writable. This means that it is not generally
possible to use an entrypoint implementation that stores a dynamically
generated stack cookie into a global variable. For PEIMs in particular,
there may be other options, such as a DEPEX on the permanent memory PPI,
but the current dynamic implementations of the stack checking library
entrypoints for PEI_CORE and PEIM modules must not be used as-is.

So remove them, and update the readme accordingly.

Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
2025-02-11 20:25:08 +00:00
Ard Biesheuvel
5c3dcef94c MdePkg/DynamicStackCookieEntryPointLib: Remove unused files
Remove some source files that were part of an earlier incarnation of
DynamicStackCookieEntryPointLib but are no longer actually in use.

Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
2025-02-11 20:25:08 +00:00
Oliver Smith-Denny
e6b6aa90d4 MdePkg: Add Dynamic Stack Cookie Support
Adds dynamic stack cookies in the form of copies of the entry
point libraries that use shared logic to update stack cookies
at runtime.

This relies on RDRAND on IA32/X64 and RNDR on AARCH64 to get a
random number to apply to the stack cookie on module entry point.

This simplifies the logic a platform must do to include stack
check functionality.

Signed-off-by: Oliver Smith-Denny <osde@microsoft.com>
2025-02-07 02:23:11 +00:00