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

[REBASE && FF] Update DxePagingAuditTestApp with Additional Shell and HTML Tests #327

Merged
merged 9 commits into from
Oct 13, 2023

Commits on Oct 13, 2023

  1. Paging Audit: Add 8 Tests to Shell App

    Description
    
    This change adds 8 tests to the paging audit shell app. Which check
    the following:
    
    1. Unallocated memory is EFI_MEMORY_RP
    2. Memory Attribute Protocol is present
    3. Calls to allocate pages and pools return buffers with restrictive access attributes
    4. NULL page is EFI_MEMORY_RP
    5. MMIO Regions are Non Executable
    6. Image code sections are EFI_MEMORY_RO and and data sections are EFI_MEMORY_XP
    7. BSP stack is EFI_MEMORY_XP and has EFI_MEMORY_RP guard page
    8. Memory outside of the EFI Memory Map is inaccessible
    
    - [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, ...
    - [x] 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 on Q35 and SBSA
    
    Integration Instructions
    
    N/A
    TaylorBeebe committed Oct 13, 2023
    Configuration menu
    Copy the full SHA
    89f50d8 View commit details
    Browse the repository at this point in the history
  2. Paging Audit: Minor Formatting Fixes in Shell App

    Description
    
    Fixes minor formatting issues in DxePagingAuditTestApp.c.
    
    - [ ] 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
    
    N/A
    
    Integration Instructions
    
    N/A
    TaylorBeebe committed Oct 13, 2023
    Configuration menu
    Copy the full SHA
    df3859c View commit details
    Browse the repository at this point in the history
  3. Paging Audit: Collect Memory Attribute Protocol Data

    Description
    
    Collects the Memory Attribute Protocol presence data in
    PlatformInfo.dat and adds its value to the output HTML report.
    
    - [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, ...
    - [x] 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 on Q35 and SBSA
    
    Integration Instructions
    
    N/A
    TaylorBeebe committed Oct 13, 2023
    Configuration menu
    Copy the full SHA
    fbb526c View commit details
    Browse the repository at this point in the history
  4. Paging Audit: Skip Collecting Invalid Pages on AArch64

    Description
    
    The valid bit is no longer displayed on the AArch64 paging audit
    output, so unmapped pages shouldn't be collected in the .dat files.
    
    - [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
    
    Tested on Q35 and SBSA
    
    Integration Instructions
    
    N/A
    TaylorBeebe committed Oct 13, 2023
    Configuration menu
    Copy the full SHA
    c1b2716 View commit details
    Browse the repository at this point in the history
  5. Bugfix: Ensure EntryCount is Updated in AArch64 CreateFlatPageTable()

    Description
    
    When the input PAGE_MAP in CreateFlatPageTable() doesn't have enough
    memory to hold the flat page table, the function will return
    EFI_BUFFER_TOO_SMALL. This fixes this return case to also update the
    EntryCount in the PAGE_MAP so that the caller can know how many entries
    are needed.
    
    - [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
    
    Tested on Q35 and SBSA
    
    Integration Instructions
    
    N/A
    TaylorBeebe committed Oct 13, 2023
    Configuration menu
    Copy the full SHA
    39e35da View commit details
    Browse the repository at this point in the history
  6. Paging Audit: Reformat HTML Templates

    Description
    
    Auto-format the HTML templates according to the default HTML formatter
    in vscode.
    
    - [ ] 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
    
    N/A
    
    Integration Instructions
    
    N/A
    TaylorBeebe committed Oct 13, 2023
    Configuration menu
    Copy the full SHA
    2d38bf9 View commit details
    Browse the repository at this point in the history
  7. Paging Audit: Make Header in Memory Data Tab Horizontally Scrollable

    Description
    
    Make the header in the Memory Data tab horizontally scrollable
    so that when scrolling through the data, the header is always
    aligned.
    
    - [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
    
    Tested on Q35 and SBSA
    
    Integration Instructions
    
    N/A
    TaylorBeebe committed Oct 13, 2023
    Configuration menu
    Copy the full SHA
    2bdfbb4 View commit details
    Browse the repository at this point in the history
  8. Paging Audit: Refactor Filter Logic and add Logical OR Filtering

    Description
    
    1. Refactor the filtering logic to be more general instead of requiring
    an update function for each filterable column.
    
    2. Add a toggle to the filter logic to switch between logical AND
    and logical OR filtering when comparing column values in each
    row. This is a nice to have feature when parsing the data.
    
    - [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
    
    Tested on Q35 and SBSA
    
    Integration Instructions
    
    N/A
    TaylorBeebe committed Oct 13, 2023
    Configuration menu
    Copy the full SHA
    687ec71 View commit details
    Browse the repository at this point in the history
  9. Paging Audit: Add 5 Tests to HTML Templates

    Description
    
    Adds the following tests to the HTML templates:
    
    1. Test that the NULL page is EFI_MEMORY_RP
    2. Check that MMIO memory is non-executable.
    3. Check that EfiConventionalMemory is non-executable.
    4. Check that memory not in the EFI memory map is not accessible.
    5. Check that the memory attribute protocol is present on the platform.
    
    - [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, ...
    - [x] 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 on Q35 and SBSA
    
    Integration Instructions
    
    N/A
    TaylorBeebe committed Oct 13, 2023
    Configuration menu
    Copy the full SHA
    d9520ea View commit details
    Browse the repository at this point in the history