From fdf2231211791ac47dfbd40b2b0540e3c3107f2a Mon Sep 17 00:00:00 2001 From: "Project Mu UEFI Bot [bot]" <45776386+uefibot@users.noreply.github.com> Date: Mon, 13 Nov 2023 15:57:51 -0500 Subject: [PATCH 1/2] Repo File Sync: Update to Mu DevOps 7.2.0 (#357) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit synced local file(s) with [microsoft/mu_devops](https://github.com/microsoft/mu_devops). 🤖: View the [Repo File Sync Configuration File](https://github.com/microsoft/mu_devops/blob/main/.sync/Files.yml) to see how files are synced. --- This PR was created automatically by the [repo-file-sync-action](https://github.com/BetaHuhn/repo-file-sync-action) workflow run [#6854437789](https://github.com/microsoft/mu_devops/actions/runs/6854437789) Signed-off-by: Project Mu UEFI Bot --- .azurepipelines/MuDevOpsWrapper.yml | 7 ++++++- .github/workflows/auto-approve.yml | 2 +- .github/workflows/auto-merge.yml | 2 +- .github/workflows/issue-assignment.yml | 2 +- .github/workflows/label-issues.yml | 2 +- .github/workflows/label-sync.yml | 2 +- .github/workflows/release-draft.yml | 2 +- .github/workflows/stale.yml | 2 +- .github/workflows/triage-issues.yml | 2 +- 9 files changed, 14 insertions(+), 9 deletions(-) diff --git a/.azurepipelines/MuDevOpsWrapper.yml b/.azurepipelines/MuDevOpsWrapper.yml index f96d450683..70a75dcbec 100644 --- a/.azurepipelines/MuDevOpsWrapper.yml +++ b/.azurepipelines/MuDevOpsWrapper.yml @@ -17,7 +17,7 @@ resources: type: github endpoint: microsoft name: microsoft/mu_devops - ref: refs/tags/v7.1.0 + ref: refs/tags/v7.2.0 parameters: - name: do_ci_build @@ -43,6 +43,10 @@ parameters: - name: calculate_code_coverage displayName: Calculate Code Coverage From Unit Tests default: false +- name: coverage_publish_target + displayName: Code Coverage Publish Target + type: string + default: 'ado' # 'ado', 'codecov' - name: container_build displayName: Flag for whether this repo should do stuart_setup type: boolean @@ -90,6 +94,7 @@ jobs: do_ci_setup: ${{ parameters.do_ci_setup }} do_pr_eval: ${{ parameters.do_pr_eval }} calculate_code_coverage: ${{ parameters.calculate_code_coverage }} + coverage_publish_target: ${{ parameters.coverage_publish_target }} do_non_ci_setup: ${{ parameters.do_non_ci_setup }} do_non_ci_build: ${{ parameters.do_non_ci_build }} build_matrix: ${{ parameters.build_matrix }} diff --git a/.github/workflows/auto-approve.yml b/.github/workflows/auto-approve.yml index 34d36c8412..f136045896 100644 --- a/.github/workflows/auto-approve.yml +++ b/.github/workflows/auto-approve.yml @@ -25,5 +25,5 @@ jobs: approval_check: if: | github.event.pull_request.user.login == 'dependabot[bot]' || github.event.pull_request.user.login == 'uefibot' - uses: microsoft/mu_devops/.github/workflows/AutoApprover.yml@v7.1.0 + uses: microsoft/mu_devops/.github/workflows/AutoApprover.yml@v7.2.0 secrets: inherit diff --git a/.github/workflows/auto-merge.yml b/.github/workflows/auto-merge.yml index dd4a1e8ede..dd835308cc 100644 --- a/.github/workflows/auto-merge.yml +++ b/.github/workflows/auto-merge.yml @@ -26,5 +26,5 @@ jobs: merge_check: if: | github.event.pull_request.user.login == 'dependabot[bot]' || github.event.pull_request.user.login == 'uefibot' - uses: microsoft/mu_devops/.github/workflows/AutoMerger.yml@v7.1.0 + uses: microsoft/mu_devops/.github/workflows/AutoMerger.yml@v7.2.0 secrets: inherit diff --git a/.github/workflows/issue-assignment.yml b/.github/workflows/issue-assignment.yml index 562094b07e..65d93fed26 100644 --- a/.github/workflows/issue-assignment.yml +++ b/.github/workflows/issue-assignment.yml @@ -18,4 +18,4 @@ on: jobs: apply: - uses: microsoft/mu_devops/.github/workflows/IssueAssignment.yml@v7.1.0 + uses: microsoft/mu_devops/.github/workflows/IssueAssignment.yml@v7.2.0 diff --git a/.github/workflows/label-issues.yml b/.github/workflows/label-issues.yml index fa8480cccf..739549e922 100644 --- a/.github/workflows/label-issues.yml +++ b/.github/workflows/label-issues.yml @@ -31,4 +31,4 @@ on: jobs: apply: - uses: microsoft/mu_devops/.github/workflows/Labeler.yml@v7.1.0 + uses: microsoft/mu_devops/.github/workflows/Labeler.yml@v7.2.0 diff --git a/.github/workflows/label-sync.yml b/.github/workflows/label-sync.yml index 3d71446605..9289e064ce 100644 --- a/.github/workflows/label-sync.yml +++ b/.github/workflows/label-sync.yml @@ -24,4 +24,4 @@ on: jobs: sync: - uses: microsoft/mu_devops/.github/workflows/LabelSyncer.yml@v7.1.0 + uses: microsoft/mu_devops/.github/workflows/LabelSyncer.yml@v7.2.0 diff --git a/.github/workflows/release-draft.yml b/.github/workflows/release-draft.yml index 648ef44c38..ad79b83d8b 100644 --- a/.github/workflows/release-draft.yml +++ b/.github/workflows/release-draft.yml @@ -27,5 +27,5 @@ on: jobs: draft: - uses: microsoft/mu_devops/.github/workflows/ReleaseDrafter.yml@v7.1.0 + uses: microsoft/mu_devops/.github/workflows/ReleaseDrafter.yml@v7.2.0 secrets: inherit diff --git a/.github/workflows/stale.yml b/.github/workflows/stale.yml index f82a565452..79087d5f79 100644 --- a/.github/workflows/stale.yml +++ b/.github/workflows/stale.yml @@ -24,4 +24,4 @@ on: jobs: check: - uses: microsoft/mu_devops/.github/workflows/Stale.yml@v7.1.0 + uses: microsoft/mu_devops/.github/workflows/Stale.yml@v7.2.0 diff --git a/.github/workflows/triage-issues.yml b/.github/workflows/triage-issues.yml index d060871c8a..276e64b362 100644 --- a/.github/workflows/triage-issues.yml +++ b/.github/workflows/triage-issues.yml @@ -19,4 +19,4 @@ on: jobs: triage: - uses: microsoft/mu_devops/.github/workflows/IssueTriager.yml@v7.1.0 + uses: microsoft/mu_devops/.github/workflows/IssueTriager.yml@v7.2.0 From 9ce0c1f619afb273697036b7613765ccc62377c1 Mon Sep 17 00:00:00 2001 From: Aaron <105021049+apop5@users.noreply.github.com> Date: Tue, 14 Nov 2023 15:30:08 -0800 Subject: [PATCH 2/2] Fixed logic related to DxeCore only advanced logger (#359) ## Description When using advanced logger starting from DxeCore, the library constructor will allocate space for the advanced logger buffer. When this allocation takes place, the associated global variable `mMaxAddress` will be created to specify the last address for the log buffer. In the DxeCore case, the calculation for `mMaxAddress` did not take into account the size of the `ADVANCED_LOGGER_INFO` structure that is at the start of the buffer, resulting in an inconsistent address between `mMaxAddress` and `LoggerInfo->LogBuffer + LoggerInfo->LogBufferSize` All other instances of this code use `LoggerInfo->LogBuffer + LoggerInfo->LogBufferSize`, so change DxeCore library instance to use the same logic as other library instances. For each item, place an "x" in between `[` and `]` if true. Example: `[x]`. _(you can also check items in the GitHub UI)_ - [X] 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 Found by setting debug messages to such a high level that the end of the buffer was reached, resulting in incorrect checks of `mMaxAddress` overwriting the end of the buffer. Incorrect logic was tripped up in `ValidateInfoBlock()` where `mMaxAddress` would cause a return of `false`, which in turn would result in NULL being returned from an arbitrary call to `AdvancedLoggerGetLoggerInfo`. ## Integration Instructions n/a --- .../Library/AdvancedLoggerLib/DxeCore/AdvancedLoggerLib.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/AdvLoggerPkg/Library/AdvancedLoggerLib/DxeCore/AdvancedLoggerLib.c b/AdvLoggerPkg/Library/AdvancedLoggerLib/DxeCore/AdvancedLoggerLib.c index 8e40c314ab..f4fd4c762c 100644 --- a/AdvLoggerPkg/Library/AdvancedLoggerLib/DxeCore/AdvancedLoggerLib.c +++ b/AdvLoggerPkg/Library/AdvancedLoggerLib/DxeCore/AdvancedLoggerLib.c @@ -365,7 +365,7 @@ DxeCoreAdvancedLoggerLibConstructor ( LoggerInfo->LogBufferSize = EFI_PAGES_TO_SIZE (FixedPcdGet32 (PcdAdvancedLoggerPages)) - sizeof (ADVANCED_LOGGER_INFO); LoggerInfo->LogCurrent = LoggerInfo->LogBuffer; LoggerInfo->HwPrintLevel = FixedPcdGet32 (PcdAdvancedLoggerHdwPortDebugPrintErrorLevel); - mMaxAddress = PA_FROM_PTR (LoggerInfo) + LoggerInfo->LogBufferSize; + mMaxAddress = LoggerInfo->LogBuffer + LoggerInfo->LogBufferSize; mBufferSize = LoggerInfo->LogBufferSize; } else { DEBUG ((DEBUG_ERROR, "%a: Error allocating Advanced Logger Buffer\n", __FUNCTION__));