Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use StackCheckLibNull in SEC and PEI, Define ARM Stack Check Version, Move Stack Check Defines to MdeLibs.dsc.inc #692

Closed
wants to merge 2 commits into from

Conversation

TaylorBeebe
Copy link
Contributor

Description

A future library instance will be added that will support
initialization of a random stack cookie value at build for pre-mem
PEIMs and regular run-time generation for post-mem PEIMs.

Until that is done, use the NULL instance for SEC and PEI.

This also adds the stack check library definition for ARM.
For basecore DSC files which had the stack check libraries
explicitly listed, instead have them reference the MdeLibs include
file for coherency.

  • Impacts functionality?
    • Functionality - Does the change ultimately impact how firmware functions?
    • Examples: Add a new library, publish a new PPI, update an algorithm, ...
  • Impacts security?
    • Security - Does the change have a direct security impact on an application,
      flow, or firmware?
    • Examples: Crypto algorithm change, buffer overflow fix, parameter
      validation improvement, ...
  • Breaking change?
    • Breaking change - Will anyone consuming this change experience a break
      in build or boot behavior?
    • Examples: Add a new library class, move a module to a different repo, call
      a function in a new library class in a pre-existing module, ...
  • Includes tests?
    • Tests - Does the change include any explicit test code?
    • Examples: Unit tests, integration tests, robot tests, ...
  • Includes documentation?
    • Documentation - Does the change contain explicit documentation additions
      outside direct code modifications (and comments)?
    • Examples: Update readme file, add feature readme file, link to documentation
      on an a separate Web page, ...

How This Was Tested

Tested in pipelines

Integration Instructions

N/A

@TaylorBeebe TaylorBeebe changed the title MdePkg/MdeLibs.dsc.inc: Use StackCheckLibNull in SEC and PEI Use StackCheckLibNull in SEC and PEI, Define ARM Stack Check Version, Move Stack Check Defines to MdeLibs.dsc.inc Jan 23, 2024
@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (645d473) 1.87% compared to head (799e0f8) 1.66%.
Report is 3 commits behind head on release/202302.

Additional details and impacted files
@@                Coverage Diff                 @@
##           release/202302     #692      +/-   ##
==================================================
- Coverage            1.87%    1.66%   -0.21%     
==================================================
  Files                1343     1343              
  Lines              286447   285474     -973     
  Branches             5773     5773              
==================================================
- Hits                 5359     4742     -617     
+ Misses             281038   280456     -582     
- Partials               50      276     +226     
Flag Coverage Δ
MdePkg 2.19% <ø> (-1.43%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

NULL|MdePkg/Library/StackCheckLib/StackCheckLib.inf
StackCheckFailureLib|MdePkg/Library/StackCheckFailureLibNull/StackCheckFailureLibNull.inf

[LibraryClasses.X64.SEC, LibraryClasses.X64.PEIM, LibraryClasses.X64.PEI_CORE]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
[LibraryClasses.X64.SEC, LibraryClasses.X64.PEIM, LibraryClasses.X64.PEI_CORE]
[LibraryClasses.common.SEC, LibraryClasses.common.PEIM, LibraryClasses.common.PEI_CORE]

Should this include IA32 and X64?

@TaylorBeebe TaylorBeebe closed this Feb 1, 2024
@TaylorBeebe
Copy link
Contributor Author

Instead of updating pre-DXE modules to use the NULL lib, I added 32-bit support for earlier phases here: #714

@TaylorBeebe TaylorBeebe deleted the move_stack_check_libs branch March 11, 2024 15:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants