@@ -18,11 +18,7 @@ Azure confidential computing VMs
18
18
generally available and provide access to VMs with Intel SGX enabled in `DCsv2
19
19
VM instances
20
20
<https://docs.microsoft.com/en-us/azure/virtual-machines/dcv2-series> `__. The
21
- description below uses a VM running Ubuntu 18.04 with a the preinstalled `Intel
22
- SGX DCAP driver
23
- <https://github.com/intel/SGXDataCenterAttestationPrimitives/tree/LD_1.22> `__
24
- (version ``LD_1.22 ``). To use a different Intel SGX driver, please follow the
25
- instructions to uninstall the driver.
21
+ description below uses a VM running Ubuntu 18.04.
26
22
27
23
Prerequisites
28
24
^^^^^^^^^^^^^
@@ -33,6 +29,10 @@ Update and install the required packages for Graphene::
33
29
sudo apt install -y build-essential autoconf gawk bison python3-protobuf \
34
30
libprotobuf-c-dev protobuf-c-compiler libcurl4 python3
35
31
32
+ Graphene requires the kernel to support FSGSBASE x86 instructions. Older Azure
33
+ Confidential Compute VMs may not contain the required kernel patches and need to
34
+ be updated.
35
+
36
36
Building
37
37
^^^^^^^^
38
38
@@ -42,40 +42,20 @@ Building
42
42
cd graphene
43
43
git submodule update --init -- Pal/src/host/Linux-SGX/sgx-driver/
44
44
45
- #. Prepare the signing keys and Graphene kernel driver ::
45
+ #. Prepare the signing keys::
46
46
47
47
openssl genrsa -3 -out enclave-key.pem 3072
48
48
cp enclave-key.pem Pal/src/host/Linux-SGX/signer
49
- cd Pal/src/host/Linux-SGX/sgx-driver
50
- ISGX_DRIVER_PATH=/usr/src/linux-azure-headers-`uname -r`/arch/x86/ make
51
- # WARNING: read "Security Implications" section before running this command
52
- sudo insmod gsgx.ko
53
- cd -
54
49
55
50
#. Build Graphene::
56
51
57
- ISGX_DRIVER_PATH=/usr/src/linux-azure- headers-`uname -r`/arch/x86/ make SGX=1
52
+ ISGX_DRIVER_PATH=/usr/src/linux-headers-`uname -r`/arch/x86/ make SGX=1
58
53
59
54
#. Build and run :program: `helloworld `::
60
55
61
56
cd LibOS/shim/test/native
62
57
make SGX=1 sgx-tokens
63
- SGX=1 ./pal_loader helloworld
64
-
65
-
66
- Security implications
67
- ^^^^^^^^^^^^^^^^^^^^^
68
-
69
- Note that this guide assumes that you deploy Graphene on an untrusted cloud VM.
70
- One step in this guide significantly weakens the security of the cloud VM's
71
- Linux kernel: ``sudo insmod gsgx.ko `` introduces a local privilege escalation
72
- vulnerability. This kernel module enables the FSGSBASE processor feature
73
- without proper enabling in the host Linux kernel. Please refer to the
74
- documentation under ``Pal/src/host/Linux-SGX/sgx-driver `` for more information.
75
-
76
- This step is a temporary workaround and will not be required in the future
77
- (starting from Linux 5.9). Be aware that the current guide must not be used to
78
- set up production environments.
58
+ SGX=1 ../../../../Runtime/pal_loader helloworld
79
59
80
60
Azure Kubernetes Services (AKS)
81
61
-------------------------------
0 commit comments