Thanks to visit codestin.com
Credit goes to github.com

Skip to content

efi: Do not update EFI variables if read only or empty#998

Merged
travier merged 1 commit into
coreos:mainfrom
HuijingHei:check-efi-vars
Sep 9, 2025
Merged

efi: Do not update EFI variables if read only or empty#998
travier merged 1 commit into
coreos:mainfrom
HuijingHei:check-efi-vars

Conversation

@HuijingHei

Copy link
Copy Markdown
Contributor

Fixes #972

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces a check to prevent updating EFI variables under certain conditions, which is a valuable improvement. However, the implementation has a couple of issues. There's a logic error in how an empty directory is checked, which could mask I/O errors. More critically, the new logic for conditionally updating firmware variables now silently ignores errors, which is a significant regression from the previous behavior. I've provided suggestions to address both of these points.

Comment thread src/efi.rs Outdated
Comment thread src/efi.rs Outdated
@HuijingHei HuijingHei force-pushed the check-efi-vars branch 2 times, most recently from 8fd208a to 73c2bbe Compare September 5, 2025 12:15
@HuijingHei HuijingHei requested a review from travier September 5, 2025 12:17
@HuijingHei

Copy link
Copy Markdown
Contributor Author

Hold on, need to fix the CI error.

@HuijingHei HuijingHei force-pushed the check-efi-vars branch 5 times, most recently from 970489d to 6eb1c20 Compare September 6, 2025 13:05
Comment thread src/efi.rs Outdated
@HuijingHei HuijingHei force-pushed the check-efi-vars branch 2 times, most recently from 2700233 to fb3c830 Compare September 7, 2025 11:55
@HuijingHei HuijingHei changed the title efi: Do not update EFI variables if not mountpoint, empty or read only efi: Do not update EFI variables if read only or empty Sep 7, 2025
Comment thread src/efi.rs Outdated
Comment thread src/efi.rs Outdated
@HuijingHei HuijingHei force-pushed the check-efi-vars branch 2 times, most recently from 8e0645b to ac84d76 Compare September 9, 2025 01:30
@HuijingHei

Copy link
Copy Markdown
Contributor Author

Update info to make it shorter, ready to review, thank you!

@travier travier merged commit 40ab720 into coreos:main Sep 9, 2025
12 checks passed
@HuijingHei HuijingHei deleted the check-efi-vars branch November 27, 2025 09:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Do not try to update EFI variables if empty or read only

3 participants