Skip to content

AndromedaPkg: SecureBoot: Add support for dynamic changes/updates of SiPolicy #543

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

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

qaz6750
Copy link
Member

@qaz6750 qaz6750 commented May 2, 2025

Explain

  • As mentioned in "issues/483", when the SiPolicy in UEFI/Repo is updated, the SiPolicy in the ESP on the user's device cannot be updated correctly. This may lead to some problems with driver signature verification. Therefore, we are now attempting to use the SHA256 Hash to determine whether we need to update the SiPolicy, and this way, it will not operate on the FAT partition multiple times, which could affect the boot process.

Change

  • AndromedaPkg
    • Add support for dynamic changes/updates of SiPolicy.

@qaz6750 qaz6750 linked an issue May 2, 2025 that may be closed by this pull request
@qaz6750 qaz6750 added enhancement New feature or request need to test labels May 2, 2025
@qaz6750 qaz6750 self-assigned this May 2, 2025
@qaz6750 qaz6750 requested review from sunflower2333 and remtrik May 2, 2025 16:25
@qaz6750
Copy link
Member Author

qaz6750 commented May 4, 2025

Test has been carried out to check whether any accidents occurred when the SiPolicy did not need to be updated.

However, there are still other tests that need to be conducted.

@qaz6750 qaz6750 force-pushed the xyz/develop/SiPolicyUpdate branch 3 times, most recently from 9f72c9b to 132d5bf Compare May 9, 2025 11:38
@qaz6750
Copy link
Member Author

qaz6750 commented May 9, 2025

It has been tested that when the SiPolicy is different, the original SiPolicy will be deleted and a new one will be written subsequently, and it will not be written again after the second startup.

@qaz6750 qaz6750 requested a review from gus33000 May 9, 2025 11:40
@qaz6750 qaz6750 closed this May 9, 2025
@qaz6750 qaz6750 force-pushed the xyz/develop/SiPolicyUpdate branch from 132d5bf to 2ce32c7 Compare May 9, 2025 11:43
qaz6750 and others added 3 commits May 9, 2025 19:48
…SiPolicy.

* As mentioned in "issues/483", when the SiPolicy in UEFI/Repo is
  updated, the SiPolicy in the ESP on the user's device cannot be
  updated correctly. This may lead to some problems with driver
  signature verification. Therefore, we are now attempting to use
  the SHA256 Hash to determine whether we need to update the SiPolicy, and
  this way, it will not operate on the FAT partition multiple times, which
  could affect the boot process.

Co-authored-by: KancyJoe <kancy2333@outlook.com>
Signed-off-by: XiaoYeZi <qaz6750@outlook.com>
…te in the new one

* Try to avoid the problems of the FAT file system caused by direct
  rewriting.

Signed-off-by: XiaoYeZi <qaz6750@outlook.com>
@qaz6750 qaz6750 reopened this May 9, 2025
@qaz6750
Copy link
Member Author

qaz6750 commented May 9, 2025

Some more tests may still be needed to determine whether there will be additional impacts. After everything is completed, I hope to finally contribute back to the upstream.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request need to test
Projects
None yet
Development

Successfully merging this pull request may close these issues.

SecureBoot: SiPolicy update issues for special circumstances
1 participant