Skip to content

patina-v13.1.0

Choose a tag to compare

@github-actions github-actions released this 27 Oct 21:55
· 595 commits to refs/heads/main since this release
6699642

What's Changed

  • Code Coverage: Only post status to pull requests @cfernald (#967)
    Change Details
      ## Description

    This uses only_pulls which "Only post a status to pull requests, defaults to false. If true no status will be posted for commits not on a pull request."

    see: https://docs.codecov.com/docs/commit-status#only_pulls

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

    How This Was Tested

    N/A

    Integration Instructions

    N/A




  • Do not run vet in the main CI worfklow @makubacki (#966)
    Change Details
      ## Description

    Commit fbd8252 removed vet from the all task so it is not run during the main developer workflow locally. This also removes it from the main CI workflow. It will be run in a separate workflow that reports the audit state of the codebase's dependencies.

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

    How This Was Tested

    • CI workflow

    Integration Instructions

    • N/A


  • .vscode/settings.json: Remove vscode-nmake-tools setting @makubacki (#963)
    Change Details
      ## Description

    This setting is no longer needed.

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

    How This Was Tested

    • N/A - Dead code

    Integration Instructions

    • N/A


  • Cargo vet updates [Rebase \& FF] @makubacki (#960)
    Change Details
      ## Description

    Makefile.toml: Remove vet from the all task

    Allow vet to be run individually but do not include in the all
    task. This keeps support in the repo but removes it from the
    main developer/CI workflow for now.

    It can either be moved to a different repo in the future where
    a binary is built like patina-dxe-core-qemu or run in a separate
    GitHub workflow outside of the main CI workflow.


    Update cargo vet exemptions

    • Update cargo make vet to not ignore errors (now that it is not
      part of all).
    • Update the exemptions so it passes for now.

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

    How This Was Tested

    • cargo make vet
    • cargo make all

    Integration Instructions

    • N/A


  • Cargo.toml: Enable the alloc feature @makubacki (#955)
    Change Details
      ## Description

    Follow official serde_json guidance to use the alloc feature since we have a memory allocator available and

    https://docs.rs/serde_json/latest/serde_json/#no-std-support

    If the code is truly needed when the allocator is not available, serde-json-core is an option:

    https://github.com/rust-embedded-community/serde-json-core

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

    How This Was Tested

    • cargo make all
    • In preparation for unsafe code analysis changes. This was one all each package in the workspace after the change:
      • cargo geiger --output-format Json --all-features --target x86_64-unknown-uefi
      • cargo geiger --output-format Json --all-features --target aarch64-unknown-uefi

    Integration Instructions

    • N/A


  • patina\_debugger: Move TLB Flush to Monitor Command @os-d (#954)
    Change Details
      ## Description

    Currently, the patina_debugger always issues a TLB flush when exiting the debugger's active session. This can be distracting when debugging issues with incorrect TLB entries as using the debugger can make the problem go away. The debugger does not need to do a TLB flush, when it edits the page tables, the paging crate does all the required TLB operations.

    The reason the TLB flush was added to the debugger was to handle the case where a developer is manually editing page tables via the debugger client. This is a rare case, but does require a TLB flush.

    To handle this case in a less intrusive way, and to support other uses cases where flushing the TLB is nice, this commit drops always flushing the TLB from the debugger and instead adds a monitor command to flush the TLB.

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

    How This Was Tested

    Tested running the monitor command and setting breakpoints (to ensure instruction cache flushing was still occuring) on Q35 and SBSA.

    Integration Instructions

    !uefiext.monitor arch flush_tlb may be run from WinDbg (or other monitor commands from other UIs) to flush the TLB on the DUT.




  • RFC: Remove Atomics @joschock (#810)
    Change Details
      ## Description

    This PR presents an RFC for the removal of atomics from Patina.

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

    How This Was Tested

    N/A

    Integration Instructions

    N/A




  • chore: Release v13.0.0 @makubacki (#953)
    Change Details
      ## Description

    Version update for the 13.0.0 release.

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

    How This Was Tested

    • N/A

    Integration Instructions

    • N/A


🚀 Features & ✨ Enhancements

  • sdk/guid: Add add const string support @Javagedes (#956)
    Change Details
      ## Description

    Add const support for generating a guid from a well formatted string. This updates ry_from_string to be const, and adds a from_string method that will panic on an unformatted string.

    Additionally removes the manual implementation of PartialOrd in favor of the derive implementation since we manually implement Ord, which is the proper way to do it per PartialOrd documentation.

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

    How This Was Tested

    CI continues to pass, New CI passes

    Integration Instructions

    Users may begin creating a const guid (Both BinaryGuid and Guid) from strings:

    const MY_GUID: BinaryGuid = BinaryGuid::from_string("550E8400-E29B-41D4-A716-446655440000");
      </blockquote>
      <hr>
    </details>
    

🐛 Bug Fixes

  • Restore global state after executing MAT tests. @joschock (#964)
    Change Details
      ## Description

    The memory attribute table unit tests set POST_RTB global state. This has side effects (e.g. casuing the installation of the MAT table on the next runtime allocation) that can interfere with other unit tests.

    This change restores global state to defaults after executing MAT unit tests.

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

    How This Was Tested

    Executed unit tests, no longer observe intermittent failures of other tests due to POST_RTB state.

    Integration Instructions

    N/A




📖 Documentation Updates

  • Add workflow to display unsafe code data in the readme @makubacki (#949)
    Change Details
      ## Description

    Closes #948

    Uses the CalculateUnsafeCode workflow in patina-devops to calculate the amount of unsafe code in the repo in various categories and show that data in badges in the readme.


    Results are broken down into these categories.

    • Overall: Combined percentage across all categories
    • Functions: Percentage of functions marked as unsafe
    • Expressions: Percentage of unsafe expressions and blocks
    • Implementations: Percentage of unsafe trait implementations
    • Traits: Percentage of unsafe trait definitions
    • Methods: Percentage of methods marked as unsafe.

    Example of badges for the current patina repo (on fork):

    image

    Currently:

    • <10% = Green
    • >10% and <15% = Yellow
    • 15%+ = Red

    Example of workflow analysis table: https://github.com/OpenDevicePartnership/patina/blob/unsafe-code-badges/unsafe_analysis.md


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

    How This Was Tested

    • Run workflow on fork and verify analysis output and JSON output are correct
    • Check badges on fork to verify they resolve against the JSON file and are aesthetically positioned as expected

    Integration Instructions

    • N/A - Only impacts badges in the local repo readme


  • sdk/guid: Add add const string support @Javagedes (#956)
    Change Details
      ## Description

    Add const support for generating a guid from a well formatted string. This updates ry_from_string to be const, and adds a from_string method that will panic on an unformatted string.

    Additionally removes the manual implementation of PartialOrd in favor of the derive implementation since we manually implement Ord, which is the proper way to do it per PartialOrd documentation.

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

    How This Was Tested

    CI continues to pass, New CI passes

    Integration Instructions

    Users may begin creating a const guid (Both BinaryGuid and Guid) from strings:

    const MY_GUID: BinaryGuid = BinaryGuid::from_string("550E8400-E29B-41D4-A716-446655440000");
      </blockquote>
      <hr>
    </details>
    
  • CONTRIBUTING.md: Update fork instructions @makubacki (#961)
    Change Details
      ## Description

    Update to specify that forks should be used for contributions.

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

    How This Was Tested

    • Viewed CONTRIBUTING.md in GitHub UI.

    Integration Instructions

    • N/A


Full Changelog: patina-v13.0.0...v13.1.0