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

Cannot open a file in FAT in specific cases #164

Closed
yuuzi41 opened this issue Jan 14, 2022 · 0 comments
Closed

Cannot open a file in FAT in specific cases #164

yuuzi41 opened this issue Jan 14, 2022 · 0 comments

Comments

@yuuzi41
Copy link
Contributor

yuuzi41 commented Jan 14, 2022

The firmware couldn't load the EFI "/EFI/BOOT/BOOTX64.EFI" if there is a directory entry which name is like "/EFI-SYSTEM".
This is a real issue. at least I found the entry "/EFI-SYSTEM" in the EFI system partition of Fedora CoreOS 35.20211215.3.0 stable.

The root cause of this issue is that compare_name function and compare_short_name function in fat.rs doesn't check whether the length of each names are same.

I'm preparing a Pull request to fix it now. After I have created the pull request, I'll link it here.

yuuzi41 pushed a commit to yuuzi41/rust-hypervisor-firmware that referenced this issue Jan 14, 2022
compare_name and compare_short_name compare incompletely if the argument "name" is shorter than a name of directory entries.
This causes a failure to load EFI as reported in cloud-hypervisor#164

Signed-off-by: Yuji Hagiwara <[email protected]>
yuuzi41 pushed a commit to yuuzi41/rust-hypervisor-firmware that referenced this issue Jan 16, 2022
compare_name and compare_short_name compare incompletely if the argument "name" is shorter than a name of directory entries.
This causes a failure to load EFI as reported in cloud-hypervisor#164

Fixes:cloud-hypervisor#164

Signed-off-by: Yuji Hagiwara <[email protected]>
yuuzi41 added a commit to yuuzi41/rust-hypervisor-firmware that referenced this issue Jan 16, 2022
default_entry_file() returns only the basename but it doesn't return the extension.
this becomes problematic after compare_name() compare names' length too to fix cloud-hypervisor#164.
default_entry_file() seems to assume that the extension of the file is ".conf".

Signed-off-by: Yuji Hagiwara <[email protected]>
retrage pushed a commit that referenced this issue Jan 18, 2022
compare_name and compare_short_name compare incompletely if the argument "name" is shorter than a name of directory entries.
This causes a failure to load EFI as reported in #164

Fixes:#164

Signed-off-by: Yuji Hagiwara <[email protected]>
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

No branches or pull requests

1 participant