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

Unlock efi #1526

Merged
merged 2 commits into from
Nov 7, 2024
Merged

Unlock efi #1526

merged 2 commits into from
Nov 7, 2024

Conversation

ldts
Copy link
Contributor

@ldts ldts commented Oct 29, 2024

No description provided.

@ldts ldts requested a review from ricardosalveti October 30, 2024 11:30
@ldts
Copy link
Contributor Author

ldts commented Oct 30, 2024

efitools:

case1

  • efitools builds userspace tools and lockdown/unlock EFI programs.
  • the efi programs only make sense when providing LmP keys (UEFI_SIGN_ENABLE)
  • they can be discarded otherwise as they provide no value for LmP
  • -> In fact the unlock.patch never contemplated not having the necessary keys to compile-in so it wont build

case2

  • The efi applications when built with UEFI_SIGN_ENABLE are installed from the deploy folder
  • They are not needed in install
  • It should be ok therefore to build and copy them to a temporary folder (WORKDIR) during deploy

@ricardosalveti ricardosalveti requested a review from a team October 30, 2024 23:45
@ldts
Copy link
Contributor Author

ldts commented Nov 6, 2024

please let me know if anything is unclear. I'd like to get this in - needs to be also integrated in scarthgap

@@ -43,10 +43,15 @@ python do_prepare_local_auths() {
dir = d.expand('${UEFI_SIGN_KEYDIR}/')

import shutil
import os
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

typos in the commit message

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hi daiane, which commit?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe my github displayed an old version when I commented. It's fixed now

Copy link
Contributor Author

@ldts ldts Nov 7, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no no, I just fixed it after your review - I forced pushed the branch

"

# UnLock needs the user keys
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would add a little bit more on the commit log as it looks like to me that the patch does more that only build the keys
And I'm not sure I understand what "build a key" is
Do we need to verify if the key files exists?

Copy link
Contributor Author

@ldts ldts Nov 7, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the tool (unlock.efi) requires that the user provides the UEFI keys in order for the tool to be built - because the keys are later on embedded/compiled_in in the coff image.

the second commit checks if the all the keys have been provided

I'll rephrase :)

ldts and others added 2 commits November 7, 2024 15:19
The UEFI key revocation tool requires the user to provide the keys that
need to be revoked.

If the keys are not provided, the userspace tools built by this recipe
will still be deployed.

Signed-off-by: Jorge Ramirez-Ortiz <[email protected]>
Instead of raising a Python exception, we can verify that all required
keys are present and provide a helpful error message if any are missing.

Signed-off-by: Jorge Ramirez-Ortiz <[email protected]>
Signed-off-by: Jose Quaresma <[email protected]>
@ldts
Copy link
Contributor Author

ldts commented Nov 7, 2024

@angolini please let me know if this is enough and thanks for reviewing

Copy link
Contributor

@angolini angolini left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

perfect, thanks <3

@ldts ldts merged commit a135ad2 into foundriesio:main Nov 7, 2024
1 check passed
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

Successfully merging this pull request may close these issues.

3 participants