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

Support xml hash check #421

Merged
merged 10 commits into from
Nov 26, 2024
Merged

Conversation

kanechen66
Copy link
Contributor

@kanechen66 kanechen66 commented Nov 12, 2024

Description

Currently, there is no version check btwn loaded xml and bios.
To prevent user loading the wrong xml for BIOS running on SUT.
This PR makes the below changes.

  1. Calc all xml node hash during bios build and put the hash/guid/var_name in generated header.

  2. BIOS can uses this guid and hash saves to a varialbe call

  3. When configeditor loads an xml file, it calc the hash of loaded xml file and tries to find the xml hash from bios variable and then compare the hash.

  4. if the hash in bios and loaded xml is different, it will show a warning message to user
    image

For details on how to complete these options and their meaning refer to CONTRIBUTING.md.

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

How This Was Tested

Tested on BIOS with variable contains hash and make sure the warning msg will pop upt when the hash is different

Integration Instructions

To have warning msg for hash mismatch, platform BIOS include SetupDataPkg/SetupDataDxe/SchemaXmlHashDriver/SchemaXmlHash.inf so that it will set variable with xml hash

@github-actions github-actions bot added language:python Pull requests that update Python code impact:non-functional Does not have a functional impact impact:testing Affects testing labels Nov 12, 2024
@kanechen66 kanechen66 force-pushed the support_xml_hash_check branch 2 times, most recently from 198da6c to 8c7fd7e Compare November 12, 2024 13:25
@os-d os-d requested review from apop5 and kuqin12 November 12, 2024 17:49
@os-d
Copy link
Contributor

os-d commented Nov 12, 2024

@kanechen66 thanks for putting up this PR. I think this should be both marked as impacting functionality (this is a new feature) and a breaking change (a config blob that previously could be written to a system now cannot be)

@kanechen66 kanechen66 force-pushed the support_xml_hash_check branch 4 times, most recently from c4d3b36 to 05d3f94 Compare November 13, 2024 11:08
@github-actions github-actions bot added the impact:breaking-change Requires integration attention label Nov 13, 2024
@kanechen66
Copy link
Contributor Author

kanechen66 commented Nov 13, 2024

looks like the pipeline won't gen ConfigProfilesGenerated.h include the hash and variable name/guid so the pipeline fails.

Will need to find another way to fix this.
any suggestion is welcome:)
thank you
https://github.com/microsoft/mu_feature_config/actions/runs/11816021825/job/32918447961?pr=421#step:24:29
image

@kanechen66 kanechen66 force-pushed the support_xml_hash_check branch 4 times, most recently from d135b1d to 4be9867 Compare November 15, 2024 11:35
@kanechen66 kanechen66 force-pushed the support_xml_hash_check branch from 4be9867 to 2403993 Compare November 17, 2024 03:00
@kanechen66 kanechen66 force-pushed the support_xml_hash_check branch 2 times, most recently from bd35f53 to f708446 Compare November 18, 2024 04:38
@kanechen66 kanechen66 force-pushed the support_xml_hash_check branch from f708446 to f85e97a Compare November 18, 2024 07:38
@os-d os-d merged commit 8b91b57 into microsoft:main Nov 26, 2024
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
impact:breaking-change Requires integration attention impact:non-functional Does not have a functional impact impact:testing Affects testing language:python Pull requests that update Python code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants