compile patched SGX SDK v2.6

35 views
Skip to first unread message

wssg...@gmail.com

unread,
Dec 11, 2019, 8:55:51 PM12/11/19
to Asylo Users
Hi,

I am installing asylo in SGX hardware mode. And after I patched the downloaded SGX SDK 2.6, what should I do? Should I use bazel command or original make command?

I assume it to be bazel build xxx. I looked around the internet and didn't figure it out. Could someone help? Thanks.

Dionna (Asylo Team)

unread,
Dec 11, 2019, 11:33:30 PM12/11/19
to Asylo Users
Bazel is the supported build tool for Asylo. Our patch on SGX SDK is not meant to work within its Makefile build system. We provide our own BUILD file for the relevant parts of SGX SDK 2.6 in order to build Asylo on top of it.

Have a look at our quickstart guide on asylo.dev on how to get started. Bazel will download all the dependencies for you and patch them appropriately. Our distributed container already contains Bazel.

You can run a simple hardware test this way, once you've already installed Intel's platform software for release 2.6 and installed their driver:
bazel test --config=sgx //asylo/test/misc:enclave_smoke_sgx_hw_test

wssg...@gmail.com

unread,
Dec 12, 2019, 3:19:38 PM12/12/19
to Asylo Users
Thanks, Dionna.

When I run the test after installation of sgx psw and driver, I got this message:

INFO: From Signing for debug: //asylo/test/misc:test_enclave_smoke_unsigned.so:
ERROR: The enclave image should have '.note.sgxmeta' section Regular sections incorrect The input enclave file is not correct. Error happened while signing the enclave. <EnclaveConfiguration> <ProdID>0</ProdID> <ISVSVN>0</ISVSVN> <StackMaxSize>0x40000</StackMaxSize> <HeapMaxSize>0x2000000</HeapMaxSize> <TCSNum>12</TCSNum> <TCSPolicy>0</TCSPolicy> <DisableDebug>0</DisableDebug> <ProvisionKey>0</ProvisionKey> <EnableKSS>0</EnableKSS> <MiscSelect>0</MiscSelect> <MiscMask>0xffffffff</MiscMask> </EnclaveConfiguration>
ERROR: /opt/my-project/asylo/asylo/test/misc/BUILD:229:1: output 'asylo/test/misc/test_enclave_smoke.so' was not created
ERROR: /opt/my-project/asylo/asylo/test/misc/BUILD:229:1: not all outputs were created or valid
Target //asylo/test/misc:enclave_smoke_sgx_hw_test failed to build

How to correct it?

Keith Moyer

unread,
Dec 12, 2019, 3:53:42 PM12/12/19
to Asylo Users
What you've run into now is #54, which has been fixed by f565139.

You can resolve this by one of:
a) Using asylo at that commit or later
b) Using a version of Bazel prior to 1.0.0 (e.g., using the gcr.io/asylo-framework/asylo:buildenv-v0.4.1 container image)
c) Waiting for the next Asylo release, which include this commit.

wssg...@gmail.com

unread,
Dec 13, 2019, 3:19:36 PM12/13/19
to Asylo Users
Thanks Keith, it worked.
Reply all
Reply to author
Forward
0 new messages