-
-
Notifications
You must be signed in to change notification settings - Fork 185
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
Update to coreboot 4.6 release #201
Comments
Looks like the SMM measurement is wrong again; memory region is not zeroed. |
Any update on this? X1 carbon gen1 being supported by 4.6 and really similar to the x230, it seems that that board would be a good candidate for heads. |
Also there is a new gfxinit method with libgfxinit. |
Any idea on what went wrong? |
I've got a T430S running Coreboot v4.6 currently that is very similar to the X230. I would very much like to assist in porting this. I am currently building a config file, however this is more difficult because I am writing it for an old version of Coreboot... Were there any issues porting Heads to use the latest version? |
Would it be fixed with https://review.coreboot.org/#/c/21129/ ? |
I tried to take a stab at this update but ran into problems with the TPM measurements on my x230: PCR0-3 are zeroed. This was after fixing an initial brick which seemed to be due to the Heads rmodule patch (bisected - so didn't find root cause). I'll debug more to see if I'm missing something obvious and revert. |
Sorry for the confusion. I was looking at the PCRS after flashing the Looks like as long as I drop the Heads rmodule.c patch, the update to coreboot 4.6 boots fine (tested on x230 with Qubes 3.2 and Coreboot 4.6) and the measurement is stable. However based on @osresearch's comments, I'd like to dig into the debug logs to make sure the measurements are covering everything properly because I'm not sure that this addresses what was seen back in May. @cmorche / @tlaurion - I can push a PR and a branch if there's interest to test before a merge, just let me know which OS you're targeting since the Xen version (4.6 for Qubes 3.2 vs 4.8 for Qubes 4) isn't configurable yet. |
Would test gladly against Qubes 3.2. |
Glad to hear this! I'm still working to port the current stable version to my ThinkPad T430S (almost identical to the x230), but once I have that working I'd be happy to test Xen 4.8 for Qubes v4. |
Here's the patch I used to update to coreboot 4.6 (on top of my master branch): https://gist.github.com/flammit/d07a9b0f3c5e3c5336a9df684edcfcaf Here's a branch for Qubes 3.2 / coreboot 4.6: https://github.com/flammit/heads/tree/coreboot-4.6 |
I'm gonna hold off on submitting a PR for this until #230 is merged since I unfortunately based my last few branches on this (which is my master). |
I just tried it on my T430S (modified the x230 config) and unfortunately it just booted to a black screen, however the fan stays on full blast (unlike past failures where it usually stops after a second). I'll spend some more time getting the stable release working with my model first I suppose... |
FYI - I "debugged" my x230 black screen by removing I've got a beaglebone black coming today so hopefully I can do more detailed EHCI debugging. |
Measurements seem consistent! |
Was too enthusiast. No they are not consistent. After some time, when the computer is reset or shutdown, I get: "Unable to unseal totp secret" "TOTP code generation failed". to reproduce:
Now i get the right totp, no error from heads. Hit m. Select new to default option with gpg card inserted. That works. On next reboot, totp is right, no error. At that point, if I power off and disconnect the power supply and battery, connect everything back and power on, I get the error. Same for you? |
At the moment of entering the tpm password to save new defaults, the totp code shown there is invalid when compared to the one on my phone. |
thanks for the feedback @tlaurion - I'll try to repro/debug tonight and over the weekend. |
You can troubleshoot the tpm with a bbb screwdriver? Will give it a try tonight to see what is happening there. But since the linux kernel takes usb ownership, how can the bbb be used to debug after linux payload as been launched? BBB can be used to debug coreboot early measurements only, right? |
No don't think it can troubleshoot the tpm directly. I think your problems are related to the part of the patch that I dropped to make it boot (in |
Sorry was too enthusiastic as well. The good news is that I can easily repro and confirm that PCR-2 is indeed changing. Will revert when I have a fix. |
FYI - I think the two problems I had of "hang on boot" and "PCR-2 drift" stem from With the Heads After removing the patch, the measured memory for the relocated ramstage module can now vary based on the relocated pointers: Run 1:
Run 2:
If only the first PCR measurement from the in memory CBFS module prior to rmodule logic is used, that could fix the changing measurement problem. @osresearch what do you think? |
Here's another patch to my master (https://gist.github.com/flammit/787579af9e5f4ee4a169d71a867d7eb6) and another commit for the coreboot-4.6 branch (https://github.com/flammit/heads/tree/coreboot-4.6). From the logs, you'll see that the relocated module measurements aren't done anymore for the whole ramstage (00100000 @ 281200) or for the SMM modules (00038000 @ 352, c0010000 @ 29568, c0008000 @ 352). The decompressed ramstage is still measured (00100000 @ 210416 in 4.5 and bff32fc0 @ 224608 in 4.6). Coreboot 4.5:
Coreboot 4.6 w/ latest patch:
I think this should be okay, but defer to someone more knowledgeable. Seems to make my x230 happy now. I'll note that after the first reboot, PCR1-3 all changed. PCR2/3 change due to MRC cache, but I'm not sure why PCR1/romstage would've changed (though this might have been the case in coreboot 4.5 as well). @tlaurion let me know if you encounter any issues. |
Measurements are consistent! Why was the ramstage measured before and after decompression in 4.5? |
There's an old issue (#15 "Region at 0x100000 is measured twice"), so I believe it was probably unintentional but defer to @osresearch on whether the new measurement scheme is sufficient. I believe it's still actually measuring the full decompressed ramstage but there's extra memory allocated to the program to support a bss block larger than reloc (which will be zeroed as part of the relocation anyway). |
@osresearch looks like you're quite busy with the NERF updates, but any chance that PRs #230 then #210 can be merged so that I can add a new PR for this coreboot 4.6 update? I have a branch at https://github.com/flammit/heads/tree/coreboot-4.6 for this. |
Maybe it's better to skip 4.6 directly to the 4.7 one, as it will be ready this month? |
Measured boot patches will need to be updated, TPM on x230 needs to be tested (it was broken in HEAD a while ago). https://blogs.coreboot.org/blog/2017/05/08/announcing-coreboot-4-6/
The text was updated successfully, but these errors were encountered: