-
-
Notifications
You must be signed in to change notification settings - Fork 171
shim: ShimLock protocol uses "sysv64" function ABI #227
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
Conversation
CC: #226, @nicholasbishop |
Thanks for the fix! Are the hash/context methods useful for other bootloaders? I had sort of thought they were just used by MOK manager and so basically internal to shim. I took a quick look around Grub and only saw the verify method being called, but I might have missed something. |
I'm not sure here. CC: @mjg59. Matthew, do you know if the non-verify methods of the Shim protocol are considered implementation details?
I can think of three uses:
They would certainly see less use than the Verify method itself. |
I verified that the Context struct matches up, and the new function pointers look correct to me other than my question about passing an array pointer. (I assume it's fine, since Rust knows array lengths at compile time it shouldn't be a fat pointer, but I don't know enough details to be sure.) Maybe worth breaking this up into 3 PRs, one for each commit? Fixing the |
@nicholasbishop I think it's ok to keep it in the same PR. It's small enough to be manageable for review. |
See the systemd-boot declaration: https://github.com/systemd/systemd/blob/5efbd0bf897a990ebe43d7dc69141d87c404ac9a/src/boot/efi/shim.c#L23-L31 This is because the shim is built with sysv ABI funcs by defualt. Signed-off-by: Joe Richey <joerichey@google.com>
Signed-off-by: Joe Richey <joerichey@google.com>
Signed-off-by: Joe Richey <joerichey@google.com>
@GabrielMajeri let me know if you thing this PR needs anything else.
Given that the MokManager uses these methods, removing/changing them in the shim wouldn't be backwards compatible, as the shim and MokManger don't have to exactly match in version. So I think it should be fine to rely on these two methods. |
Everything looks fine to me, I'm merging it |
See the systemd-boot declaration:
https://github.com/systemd/systemd/blob/5efbd0bf897a990ebe43d7dc69141d87c404ac9a/src/boot/efi/shim.c#L23-L31
This is because the shim is built with sysv ABI funcs by defualt.
This PR also adds bindings to the hashing functionality of the shim. For more information see:
Signed-off-by: Joe Richey joerichey@google.com