Skip to content

Conversation

@lcp
Copy link
Collaborator

@lcp lcp commented May 6, 2021

Some UEFI environment such as u-boot doesn't implement
QueryVariableInfo(), so we couldn't rely on the function to estimate the
available space for RT variables. All we can do is to call SetVariable()
directly and check the return value of SetVariable().

Signed-off-by: Gary Lin glin@suse.com

Some UEFI environment such as u-boot doesn't implement
QueryVariableInfo(), so we couldn't rely on the function to estimate the
available space for RT variables. All we can do is to call SetVariable()
directly and check the return value of SetVariable().

Signed-off-by: Gary Lin <glin@suse.com>
@julian-klode
Copy link
Collaborator

It's worth pointing out that some firmware implementations (Apple 2.40) even lie and tell you they have space but then die/hang when you try to write :D

@lcp
Copy link
Collaborator Author

lcp commented Jun 7, 2021

We had a similar case that the firmware lied about the space, but the firmware kindly returned EFI_OUT_OF_RESOURCES :-p

#372

@julian-klode
Copy link
Collaborator

+1 on merging

We got hit by this too https://bugs.launchpad.net/ubuntu/+source/shim/+bug/1934780 and verified this fixes it. Thanks!

@vathpela vathpela merged commit 3f327f5 into rhboot:main Jul 20, 2021
joeyli added a commit to joeyli/shim that referenced this pull request Oct 17, 2025
…MokListRT

The new building option DISABLE_APPEND_V_DBX_TO_MOKX avoids appending
the vendor_dbx to MokListRT. Instead, the vendor_dbx will be exposed
through the mok config table space.

As the vendor-dbx grows, it caused some problems when writing such
a large variable. Some firmwares lie the avaiable space [1], and some
even crash [2] for no good reason after the writing of MokListXRT. If
your shim and kernel don't rely on MokListXRT to block anything, you
can use this building option to expose vendor_dbx through the mok
config table instead of appending it to MokListRT.

Link: https://bugzilla.suse.com/show_bug.cgi?id=1185261 [1]
Link: rhboot#369 (comment) [2]
Signed-off-by: Chun-Yi Lee <jlee@suse.com>
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