Closed fitzthum closed 4 days ago
This fixes the issue reported.
Tested-by: Srikanth Aithal sraithal@amd.com
Is the same issue present if -append isn't specified and, if so, this patch takes care of that situation as well?
@tlendacky
Is the same issue present if -append isn't specified and, if so, this patch takes care of that situation as well?
If you don't specify append, QEMU will provide a 1-byte blob (\0
) and use this value to calculate the expected hash for the table. There is no issue with the blob having zero size.
Btw if you don't provide -kernel
then you can't do a direct boot so no issue there either.
When is this fix planned to be merged?
5769 does not allow for the situation where kernel hashes is used but an initrd is not provided. Thankfully it's easy to support this.
If kernel hashes are enabled but no initrd is provided, QEMU will still create an entry in the hash table, but it will be the hash of an empty buffer.
Remove the explicit check for the length of the blob. This logic will be handled by the later hash comparison, which will still fail when the blob is not present but is expected, but will pass when the blob is not present and the hash table contains a hash of an empty buffer.
cc: @bssrikanth @dubek @tlendacky @ardbiesheuvel @kraxel