Skip to content

Commit

Permalink
BaseTools/OverrideValidation: Sort files prior to hashing. (#1145)
Browse files Browse the repository at this point in the history
## Description

Override validation allows hashing a directory through the -t parameter.

When generating an override validation hash for a directory, it was
found that the order of the files can be different when running under
linux vs under windows.

To address this discrepancy, a new module hash has been crated
ModuleHash2Cal, which sorts the files prior to hashing.

Since existing projects use hashes based on ModuleHashCal, when
performing override validation checking, check against the original
ModuleHashCal and the ModuleHash2Cal prior to generating an override
validation failure.

Generating a new hash value will only use the ModuleHash2Cal.
 
- [x] Impacts functionality?
- [ ] Impacts security?
- [ ] Breaking change?
- [ ] Includes tests?
- [ ] Includes documentation?

## How This Was Tested
Tested changes on a project using existing project (to ensure backward
compatibility)
Tested changes on the project under linux that was failing 

Tested latest modifications on mu_feature_mm_supv to ensure no
regression.

## Integration Instructions
N/A
  • Loading branch information
apop5 authored Jan 24, 2025
1 parent c599627 commit cd3334a
Showing 1 changed file with 616 additions and 245 deletions.
Loading

0 comments on commit cd3334a

Please sign in to comment.