-
Notifications
You must be signed in to change notification settings - Fork 3
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
Blob loading feature #5
base: feature.sgx-lkl
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good from a technical perspective. I just have some questions about interfacing with this feature externally.
If we do intend for this feature to be used by callers other than OE internal code, we should add some documentation about what its for.
@@ -0,0 +1,88 @@ | |||
# Copyright (c) Microsoft Corporation. All rights reserved. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What are the constaints about what the blob can/should contain? It seems like comments are legal. Is it just up to enclave writer to throw whatever they want in here and use it as they wish or should OE expect some format?
unsigned char* data; | ||
size_t size; | ||
|
||
if (elf64_find_section(elf, ".oeblob", &data, &size) == 0) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should there be tooling in OE to add the oeblob section? Seems like an odd developer experience to tell people to add a section to their binary as they wish.
**============================================================================== | ||
*/ | ||
|
||
const void* __oe_get_blob_base() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are these intended to be public functions called by enclave developers (it seems no because its in an internal header)? If enclave writers are expected to be able to use this feature it probably makes sense to provide a public API and a reasoning for why one would use it.
This PR extends Open Enclave to load and measure .oeblob ELF sections if present. Once loaded, enclaves can access the blob with the following functions:
Blob sections can be added to enclave image files with the objcopy command as shown in the following example.
The blob test (tests/blob) shows how to use the feature end-to-end.