Rework replacements.c and load_image()/start_image()
Open
@vathpela is already working on this.
Since Nov 3, 2021.
- Dominant language
- C
- Stars
- 1.1k
- Forks
- 348
- PR merge metrics
- No merged PRs in 30d
Description
The gist here is that shim's load_image()/start_image() and verification protocol could be much more straightforward:
- when shim starts, it should replace
BS->LoadImage(),BS->StartImage(),BS->Exit(), andBS->ExitBootServices()with its own, likereplacements.cdoes now - the replacement should transparently enforce the verification protocol
load_image()should install a handle on eachEFI_LOADED_IMAGEit returns to identify that it was created by this particular instance- the handle guid should be generated at runtime using a SHA2 digest of some load address, so that stacked invocations are separate
start_image()should look for the handle, and if it's not there (meaning thisEFI_LOADED_IMAGEwas not created by this instance of shim'sload_image()), defer to thestart_image()implementation it replaced at startup- shim also needs to register a protocol with a well known GUID that has these functions in it, so that a nested shim invocation can defer to using them safely rather than installing its own.
- it may be useful to also implement a
UEFI volatile keysprotocol, so consumers can register their own trust anchors during the boot sequence.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.