-
Notifications
You must be signed in to change notification settings - Fork 97
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
Missing secureboot header on PAYLOAD error message is incomprehensible #126
Comments
This will work: This will cause the above error: |
Have been trying to recreate this with op-build level cf83faa745f652b7f9cb7e9e5e606ba2bcf7f2c7.
Which is what we expect. If I replace PAYLOAD with skiboot.lid.xz.stb, the system boots fine. Does |
Were you building with secureboot enabled in the hostboot config? I've seen the above error before on Witherspoon (which has secureboot enabled in hostboot), but Boston currently does not, and I think that may be where the difference is? |
I was trying to recreate on Witherspoon originally. I switched to Boston and saw the same error as you posted. Below are some findings. |
--The PAYLOAD image in this case (skiboot.lid.xz) doesn't have any kind of secure header since even the fake header didn't get added to it during op-build.
(What happens in this case)
Since the vaddr is wrong, it is no surprise that something bad happens a bit later in IPL. I'm digging for an acceptable way to check the headers even in non-secure mode. |
In skiboot, to work around all of this fun (which is lovely and non trivial), we do something like this:
So, we basically probe for the header using the magic number for the secure boot header, and adjust things accordingly (we also then use the payload size in the header to work out how much data to read so we don't read the whole partition). Otherwise we fall back to reading things the old way (which involves a bunch of stuff to work out what size we need to read off flash, seeing if we can save time by not reading the whole partition) The enforcement of secure boot happens in the final step, where |
After some discussion, we agreed on a fix that will check the partition header even in non-secure boot if the partition is marked with sha512 flag in the xml layout. This will allow to catch the partitions without the fake header and will explicitly fail IPL at the time of checking as opposed to in some weird spot later on. The error thrown now has an RC indicating that the header check has failed. The changes are in review. Note that unfortunately you will still have to have the piece of code above to check the presence of the headers on your side, since they are not forced on all partitions and are driven by the XML flag :( |
IlyaSmirnov91 <[email protected]> writes:
After some discussion, we agreed on a fix that will check the
partition header even in non-secure boot if the partition is marked
with sha512 flag in the xml layout. This will allow to catch the
partitions without the fake header and will explicitly fail IPL at the
time of checking as opposed to in some weird spot later on. The error
thrown now has an RC indicating that the header check has failed. The
changes are in review. Note that unfortunately you will still have to
have the piece of code above to check the presence of the headers on
your side, since they are not forced on all partitions and are driven
by the XML flag :(
For skiboot, we don't look at the XML flag, we do the verify based on
policy in code for the type of resource we're loading, the secure boot
mode we're in and the presence of the header or not.
…--
Stewart Smith
OPAL Architect, IBM.
|
Changes were merged to hb master today. |
Reopening. The issue still persists on Bostons (also causes bootloader failures). |
This seems to be the result of a PAYLOAD partition that doesn't have a secureboot header on it (but is XZ compressed and otherwise valid).
The text was updated successfully, but these errors were encountered: