Skip to content

Commit

Permalink
Reduce RWX Test UT_LOG Verbosity in DxePagingAuditTestApp (#257)
Browse files Browse the repository at this point in the history
## Description

There are often many ranges exempt from the RWX test, and printing every
exempt region to the log can overflow the XML buffer and result in the
actual failing ranges not to be printed.

To reduce the likelihood of missing failing ranges in the output XML,
this PR removes the UT_LOG calls for exempt regions.

- [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

Running on Q35

## Integration Instructions

N/A
  • Loading branch information
TaylorBeebe committed Jun 7, 2023
1 parent a91f960 commit 933c7b2
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -104,8 +104,6 @@ NoReadWriteExecute (
if (!CanRegionBeRWX (Address, SIZE_4KB)) {
UT_LOG_ERROR ("Memory Range 0x%llx-0x%llx is Read/Write/Execute\n", Address, Address + SIZE_4KB);
FoundRWXAddress = TRUE;
} else {
UT_LOG_WARNING ("Memory Range 0x%llx-0x%llx is Read/Write/Execute. This range is excepted from the test.\n", Address, Address + SIZE_4KB);
}
}
}
Expand All @@ -120,8 +118,6 @@ NoReadWriteExecute (
if (!CanRegionBeRWX (Address, SIZE_2MB)) {
UT_LOG_ERROR ("Memory Range 0x%llx-0x%llx is Read/Write/Execute\n", Address, Address + SIZE_2MB);
FoundRWXAddress = TRUE;
} else {
UT_LOG_WARNING ("Memory Range 0x%llx-0x%llx is Read/Write/Execute. This range is excepted from the test.\n", Address, Address + SIZE_2MB);
}
}
}
Expand All @@ -137,8 +133,6 @@ NoReadWriteExecute (
if (!CanRegionBeRWX (Address, SIZE_1GB)) {
UT_LOG_ERROR ("Memory Range 0x%llx-0x%llx is Read/Write/Execute\n", Address, Address + SIZE_1GB);
FoundRWXAddress = TRUE;
} else {
UT_LOG_WARNING ("Memory Range 0x%llx-0x%llx is Read/Write/Execute. This range is excepted from the test.\n", Address, Address + SIZE_1GB);
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,6 @@ NoReadWriteExecute (
if (!CanRegionBeRWX (Map[Index].LinearAddress, Map[Index].Length)) {
UT_LOG_ERROR ("Memory Range 0x%llx-0x%llx is Read/Write/Execute\n", Map[Index].LinearAddress, Map[Index].LinearAddress + Map[Index].Length);
FoundRWXAddress = TRUE;
} else {
UT_LOG_WARNING ("Memory Range 0x%llx-0x%llx is Read/Write/Execute. This range is excepted from the test.\n", Map[Index].LinearAddress, Map[Index].LinearAddress + Map[Index].Length);
}
}
}
Expand Down

0 comments on commit 933c7b2

Please sign in to comment.