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

[CHERRY-PICK][REBASE & FF] Revert Mu Commits In Favor of edk2 Commits #327

Merged
merged 7 commits into from
Aug 29, 2024

Conversation

os-d
Copy link
Contributor

@os-d os-d commented Aug 29, 2024

Description

This PR is the current set of mu_tiano_plus commits I have upstreamed to edk2 from release/202405. Some of these had changes from edk2, so it is not a 1:1 revert to commit.

  • Impacts functionality?
  • Impacts security?
  • Breaking change?
  • Includes tests?
  • Includes documentation?

How This Was Tested

N/A.

Integration Instructions

N/A.

os-d and others added 7 commits August 28, 2024 17:27
…atch"

This reverts commit 14a359e as it has
been merged into edk2 as commit b7f963d570ec5e27bc04d546372c6fc47e4f3b17.
…e Mismatch

This patch adds an assert to FmpDxe.c to catch a platform
misconfiguration of PcdFmpDeviceImageTypeIdGuid.

Signed-off-by: Oliver Smith-Denny <osde@linux.microsoft.com>
This reverts commit 8acf21a as it
has been merged in edk2 as commit 8984fba2f22a2cd44e1189403e3553f447b82852.
When allocating memory for a non-coherent DMA device, the current core
code removes the XP attribute, allowing code to execute from that
region. This is a security vulnerability and unneeded. This change
updates to mark the region as XP when allocating memory for the
non-coherent DMA device.

Signed-off-by: Oliver Smith-Denny <osde@linux.microsoft.com>
…icrosoft#51)"

This reverts commit f2d2b20 as it is
upstreamed in edk2 as commit a96d2a8f2dd3eb7e32b383821fe30cfd7cdb2248.
Passing in access attributes to SetMemorySpaceAttributes() will cause
the existing attributes to be overwritten. The MMIO region should have
the appropriate attributes applied during memory protection
initialization and the attributes of the memory space descriptor are
inaccurate. Don't pass in any CPU arch attributes so
SetMemorySpaceAttributes() doesn't subsequently call
gCpu->SetMemoryAttributes().

Signed-off-by: Oliver Smith-Denny <osde@linux.microsoft.com>
…ility on DMA Buffer

Commit 8984fba2f22a2cd44e1189403e3553f447b82852 added setting the
EFI_MEMORY_XP attribute on DMA buffers. However, it did not ensure
that the XP capability was set on that region.

This patch adds setting the XP capability before attempting to set
the attribute. If setting the capability fails, it defaults to the
old behavior of not setting the XP bit.

Signed-off-by: Oliver Smith-Denny <osde@linux.microsoft.com>
@github-actions github-actions bot added the impact:non-functional Does not have a functional impact label Aug 29, 2024
@codecov-commenter
Copy link

codecov-commenter commented Aug 29, 2024

Codecov Report

Attention: Patch coverage is 0% with 5 lines in your changes missing coverage. Please review.

Project coverage is 1.44%. Comparing base (142bd8b) to head (264ed6d).

Files with missing lines Patch % Lines
FmpDevicePkg/FmpDxe/FmpDxe.c 0.00% 5 Missing ⚠️
Additional details and impacted files
@@                Coverage Diff                @@
##           release/202405    #327      +/-   ##
=================================================
- Coverage            1.44%   1.44%   -0.01%     
=================================================
  Files                 159     159              
  Lines               37089   37091       +2     
  Branches              273     273              
=================================================
  Hits                  535     535              
- Misses              36554   36556       +2     
Flag Coverage Δ
FmpDevicePkg 8.68% <0.00%> (-0.01%) ⬇️

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.

@os-d os-d merged commit 67e042f into microsoft:release/202405 Aug 29, 2024
18 checks passed
@os-d os-d deleted the edk2_cps branch August 29, 2024 16:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
impact:non-functional Does not have a functional impact
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants