-
Notifications
You must be signed in to change notification settings - Fork 127
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
Cannot build enclave reproducibly #41
Comments
FWIW I analyzed the difference between the two resulting binaries with
From a quick look at the repository, these seems to be defined in https://github.com/google/asylo/blob/5ab253e2db786a9cccbc397aac2338531d4aa119/asylo/platform/system_call/type_conversions/manual_types_functions.cc . |
@tiziano88, thanks for the good bug report with simple reproducer! I've root caused this and we'll be working on a fix (it should be fairly simple). We have some code generation for translating between constant values when marshaling across the enclave boundary, and the python dictionary used at one stage of this is itself non-deterministic in ordering. This results in the order these functions are generated to be different, which breaks reproducability. Sorting the dictionary keys (and thus the outputted function order) should fix the issue you're seeing. |
Thanks for the fix @carmenyh , I have tried pulling in the latest version of Asylo including your fix, but I am still seeing inconsistent results. The difference seem still related to the ordering of symbols such as:
I suggest reopening this issue until the root cause is identified. |
@tiziano88, this was automatically closed via commit description annotation prematurely. Reopening |
I cannot seem to reproducibly build the enclave code on my machine. I am using the following steps:
docker run -it --rm -v bazel-cache:/root/.cache/bazel -v "${PWD}":/opt/my-project -w /opt/my-project gcr.io/asylo-framework/asylo
bazel build --config=sgx-sim //asylo/examples/hello_world
cp bazel-bin/asylo/examples/hello_world/hello_enclave_unsigned.so enclave_$(date --iso-8601=seconds).so
bazel clean
bazel build --config=sgx-sim //asylo/examples/hello_world
cp bazel-bin/asylo/examples/hello_world/hello_enclave_unsigned.so enclave_$(date --iso-8601=seconds).so
sha1sum enclave_*
Note that the resulting hashes differ, e.g. on my machine I get the following:
ref project-oak/oak#241
cc @anghelcovici @deeglaze @KeithMoyer @annasapek
The text was updated successfully, but these errors were encountered: