-
Notifications
You must be signed in to change notification settings - Fork 4
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
Add untrusted side of stderr from enclave #15
Conversation
@jcape When/if you get a chance might do a quick look over and see if this is "a piece" you were thinking for providing the panic with stack traces out of the enclave |
a34df18
to
4d7d243
Compare
252cff7
to
1325326
Compare
1325326
to
0a29e74
Compare
0a29e74
to
d0e6642
Compare
11cef90
to
1f408f9
Compare
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.
This looks good to me. I agree with the comment about prioritizing the enclave build tools at this time, this looks like a lot of copy-paste.
Add an ocall implementation `ocall_stderr()` which is where stderr from an enclave will be directed to. By default any content passed to the `ocall_stderr()` will be directed to the untrusted (host) stderr. Consumers of the crate can direct this output by providing a `WritAll` implementation to `stderr_write_all()`.
Co-authored-by: awygle <[email protected]>
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.
This looks good to me.
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.
I think you'll probably need to change pcl_key.bin's attributes directly as well, unfortunately
Still looking, but my hunch is github is caching the previous "no-binary" version ➜ sgx-std git:(nick/stderr) git check-attr -a test_enclave/src/pcl_key.bin
test_enclave/src/pcl_key.bin: binary: set
test_enclave/src/pcl_key.bin: diff: unset
test_enclave/src/pcl_key.bin: merge: unset
test_enclave/src/pcl_key.bin: text: unset |
Maybe needs a push? |
Tried doing the leap frog but it still fails, most things I run across say that github is using git's internal mechanism which gives me ➜ sgx-std git:(nick/stderr) ✗ git diff origin/main
...
diff --git a/test_enclave/src/pcl_key.bin b/test_enclave/src/pcl_key.bin
new file mode 100644
index 0000000..508ec12
Binary files /dev/null and b/test_enclave/src/pcl_key.bin differ So git doesn't seem to care that the attributes file was added after in the same set of commits |
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.
Yeah, OK, I guess we'll see if it works when we diff it later.
Add an ocall implementation
ocall_stderr()
which is where stderr from an enclave will be directed to. By default any content passed to theocall_stderr()
will be directed to the untrusted (host) stderr. Consumers of the crate can direct this output by providing aWriteAll
implementation tostderr_write_all()
.