Skip to content

Commit b13ab0e

Browse files
committed
Linux 2.7 Open Source Gold Release
Changes: Added a command option “-resign” for Signing Tool. Split the header file of Un-trusted Architecture Services. Supported Red Hat* Enterprise Linux* Server 8.0 (for x86_64). And we do not support Red Hat* Enterprise Linux* Server 7.6 (for x86_64) from this release Added support for new version Intel(R) Provisioning Certification Server interfaces. Added new libraries libsgx_epid.so, libsgx_launch.so, libsgx_platform.so and libsgx_quote_ex.so Fixed bugs. Signed-off-by: Zhang Lili Z <[email protected]>
1 parent 50d5bec commit b13ab0e

File tree

158 files changed

+3080
-1823
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

158 files changed

+3080
-1823
lines changed

License.txt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -809,8 +809,6 @@ POSSIBILITY OF SUCH DAMAGE.
809809

810810

811811

812-
813-
814812
11. SQLite
815813

816814
http://sqlite.org/

Makefile

Lines changed: 21 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,14 +29,31 @@
2929
#
3030
#
3131

32-
DCAP_VER?= 1.2
32+
DCAP_VER?= 1.3
3333
DCAP_DOWNLOAD_BASE ?= https://github.com/intel/SGXDataCenterAttestationPrimitives/archive
3434

35+
CHECK_OPT :=
36+
ifeq ("$(wildcard ./external/dcap_source/QuoteGeneration)", "")
37+
CHECK_OPT := dcap_source
38+
endif
39+
3540
include buildenv.mk
3641
.PHONY: all dcap_source psw sdk clean rebuild sdk_install_pkg psw_install_pkg
3742
.NOTPARALLEL: dcap_source sdk psw
3843

39-
all: dcap_source sdk psw
44+
all: tips
45+
46+
tips:
47+
@echo "Tips:"
48+
@echo " This \"make\" command will show tips only and make nothing."
49+
@echo " 1. If you want to build Intel(R) SGX SDK with default configuration, please take the following steps:"
50+
@echo " 1) ensure that you have installed required tools described in README.md in same directory"
51+
@echo " 2) enter the command: \"make sdk\""
52+
@echo " 2. If you want to build Intel(R) SGX PSW with default configuration, please take the following steps:"
53+
@echo " 1) ensure that you have installed additional required tools decribed in README.md in same directory"
54+
@echo " 2) ensure that you have installed latest Intel(R) SGX SDK Installer which could be downloaded from: https://software.intel.com/en-us/sgx-sdk/download" and followed Installation Guide in the same page to finish installation.
55+
@echo " 3) enter the commmand: \"make psw\""
56+
@echo " 3. If you want to build other targets, please also follow README.md in same directory"
4057

4158
dcap_source:
4259
ifeq ($(shell git rev-parse --is-inside-work-tree), true)
@@ -49,10 +66,10 @@ else
4966
mv SGXDataCenterAttestationPrimitives-DCAP_${DCAP_VER} external/dcap_source
5067
endif
5168

52-
psw: dcap_source sdk
69+
psw: $(CHECK_OPT)
5370
$(MAKE) -C psw/ USE_OPT_LIBS=$(USE_OPT_LIBS)
5471

55-
sdk: dcap_source
72+
sdk:
5673
$(MAKE) -C sdk/ USE_OPT_LIBS=$(USE_OPT_LIBS)
5774

5875
# Generate SE SDK Install package

README.md

Lines changed: 72 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ The Linux\* Intel(R) SGX software stack is comprised of the Intel(R) SGX driver,
1313

1414
The [linux-sgx-driver](https://github.com/01org/linux-sgx-driver) project hosts the out-of-tree driver for the Linux\* Intel(R) SGX software stack, which will be used until the driver upstreaming process is complete.
1515

16-
The repository provides a reference implementation of a Launch Enclave for 'Flexible Launch Control' under [psw/ae/ref_le](psw/ae/ref_le). The reference LE implemenation can be used as a basis for enforcing different launch control policy by the platform developer or owner. To build and try it by yourself, please refer to the [ref_le.md](psw/ae/ref_le/ref_le.md) for details.
16+
The repository provides a reference implementation of a Launch Enclave for 'Flexible Launch Control' under [psw/ae/ref_le](psw/ae/ref_le). The reference LE implementation can be used as a basis for enforcing different launch control policy by the platform developer or owner. To build and try it by yourself, please refer to the [ref_le.md](psw/ae/ref_le/ref_le.md) for details.
1717

1818
License
1919
-------
@@ -41,7 +41,7 @@ Build the Intel(R) SGX SDK and Intel(R) SGX PSW Package
4141
* Ubuntu\* 18.04 LTS Desktop 64bits
4242
* Ubuntu\* 18.04 LTS Server 64bits
4343
* Red Hat Enterprise Linux Server release 7.4 64bits
44-
* Red Hat Enterprise Linux Server release 7.6 64bits
44+
* Red Hat Enterprise Linux Server release 8.0 64bits
4545
* CentOS 7.5 64bits
4646
* Fedora 27 Server 64bits
4747
* SUSE Linux Enterprise Server 12 64bits
@@ -55,10 +55,10 @@ Build the Intel(R) SGX SDK and Intel(R) SGX PSW Package
5555
```
5656
$ sudo apt-get install build-essential ocaml ocamlbuild automake autoconf libtool wget python libssl-dev
5757
```
58-
* On Red Hat Enterprise Linux 7.4, Red Hat Enterprise Linux 7.6 and CentOS 7.5:
58+
* On Red Hat Enterprise Linux 7.4, Red Hat Enterprise Linux 8.0 and CentOS 7.5:
5959
```
6060
$ sudo yum groupinstall 'Development Tools'
61-
$ sudo yum install ocaml ocaml-ocamlbuild wget python openssl-devel
61+
$ sudo yum install ocaml ocaml-ocamlbuild wget python2 openssl-devel
6262
```
6363
* On Fedora 27:
6464
```
@@ -70,60 +70,54 @@ Build the Intel(R) SGX SDK and Intel(R) SGX PSW Package
7070
$ sudo zypper install --type pattern devel_basis
7171
$ sudo zypper install ocaml ocaml-ocamlbuild automake autoconf libtool wget python libopenssl-devel
7272
```
73-
- Use the following command to install additional required tools to build the Intel(R) SGX PSW:
74-
* On Ubuntu 16.04 and Ubuntu 18.04:
75-
```
76-
$ sudo apt-get install libssl-dev libcurl4-openssl-dev protobuf-compiler libprotobuf-dev debhelper cmake
77-
```
78-
* On Red Hat Enterprise Linux 7.4, Red Hat Enterprise Linux 7.6, CentOS 7.5 and Fedora 27:
79-
```
80-
$ sudo yum install openssl-devel libcurl-devel protobuf-devel cmake
81-
```
82-
* On SUSE Linux Enterprise Server 12:
83-
```
84-
$ sudo zypper install libopenssl-devel libcurl-devel protobuf-devel cmake
85-
```
73+
- Use the following command to install additional required tools and latest Intel(R) SGX SDK Installer to build the Intel(R) SGX PSW:
74+
1) To install the additional required tools:
75+
* On Ubuntu 16.04 and Ubuntu 18.04:
76+
```
77+
$ sudo apt-get install libssl-dev libcurl4-openssl-dev protobuf-compiler libprotobuf-dev debhelper cmake
78+
```
79+
* On Red Hat Enterprise Linux 7.4, Red Hat Enterprise Linux 8.0, CentOS 7.5 and Fedora 27:
80+
```
81+
$ sudo yum install openssl-devel libcurl-devel protobuf-devel cmake
82+
```
83+
* On SUSE Linux Enterprise Server 12:
84+
```
85+
$ sudo zypper install libopenssl-devel libcurl-devel protobuf-devel cmake
86+
```
87+
2) To install latest Intel(R) SGX SDK Installer
88+
Ensure that you have downloaded latest Intel(R) SGX SDK Installer from the [Intel(R) SGX SDK](https://software.intel.com/en-us/sgx-sdk/download) and followed the Installation Guide in the same page to install latest Intel(R) SGX SDK Installer.
89+
8690
- Use the script ``download_prebuilt.sh`` inside source code package to download prebuilt binaries to prebuilt folder
8791
You may need set an https proxy for the `wget` tool used by the script (such as ``export https_proxy=http://test-proxy:test-port``)
8892
```
8993
$ ./download_prebuilt.sh
9094
```
9195
92-
### Build the Intel(R) SGX SDK and Intel(R) SGX PSW
93-
The following steps describe how to build the Intel(R) SGX SDK and PSW. You can build the project according to your requirements.
94-
- To build both Intel(R) SGX SDK and PSW with default configuration, enter the following command:
96+
### Build the Intel(R) SGX SDK and Intel(R) SGX SDK Installer
97+
- To build Intel(R) SGX SDK with default configuration, enter the following command:
9598
```
96-
$ make
99+
$ make sdk
97100
```
98-
You can find the tools and libraries generated in the `build/linux` directory.
99-
**Note**: You can also go to the `sdk` folder and use the `make` command to build the Intel(R) SGX SDK component only. However, building the PSW component is dependent on the result of building the Intel(R) SGX SDK.
101+
You can find the tools and libraries generated in the `build/linux` directory.
102+
**Note**: You can also go to the `sdk` folder and use the `make` command to build the Intel(R) SGX SDK component only.
100103
101104
- This repository supports to build the Intel(R) SGX SDK based on either precompiled optimized IPP/string/math libraries or open sourced version of SGXSSL/string/math libraries.
102105
The default build uses precompiled optimized libraries, which are downloaded by the script ``./download_prebuilt.sh``.
103106
You can also use the open sourced version implementation instead by entering the following command:
104107
```
105-
$ make USE_OPT_LIBS=0
108+
$ make sdk USE_OPT_LIBS=0
106109
```
107-
**Note**: Building the Intel(R) SGX PSW with open sourced SGXSSL/string/math libraries is not supported. The above command builds Intel(R) SGX SDK only and the build of PSW part will be skipped.
110+
**Note**: Building the Intel(R) SGX PSW with open sourced SGXSSL/string/math libraries is not supported.
108111
109-
- To build Intel(R) SGX SDK and PSW with debug information, enter the following command:
112+
- To build Intel(R) SGX SDK with debug information, enter the following command:
110113
```
111-
$ make DEBUG=1
114+
$ make sdk DEBUG=1
112115
```
113-
- To clean the files generated by previous `make` command, enter the following command:
116+
- To clean the files generated by previous `make sdk` command, enter the following command:
114117
```
115118
$ make clean
116119
```
117-
118-
- The build above uses prebuilt Intel(R) Architecture Enclaves(LE/PvE/QE/PCE/PSE-OP/PSE-PR) and applet(PSDA) - the files ``psw/ae/data/prebuilt/libsgx_*.signed.so`` and ``psw/ae/data/prebuilt/PSDA.dalp``, which have been signed by Intel in advance.
119-
To build those enclaves by yourself (without a signature), first you need to build both Intel(R) SGX SDK and PSW with the default configuration. After that, you can build each Architecture Enclave by using the `make` command from the corresponding folder:
120-
```
121-
$ cd psw/ae/le
122-
$ make
123-
```
124-
125-
### Build the Intel(R) SGX SDK Installer
126-
To build the Intel(R) SGX SDK installer, enter the following command:
120+
- To build the Intel(R) SGX SDK installer, enter the following command:
127121
```
128122
$ make sdk_install_pkg
129123
```
@@ -134,10 +128,30 @@ You can find the generated Intel(R) SGX SDK installer ``sgx_linux_x64_sdk_${vers
134128
$ make sdk_install_pkg DEBUG=1
135129
```
136130
137-
### Build the Intel(R) SGX PSW Installer
138-
To build the Intel(R) SGX PSW installer, enter the following command:
139-
- On Ubuntu 16.04 and Ubuntu 18.04:
140-
```
131+
### Build the Intel(R) SGX PSW and Intel(R) SGX PSW Installer
132+
- To build Intel(R) SGX PSW with default configuration, enter the following command:
133+
```
134+
$ make psw
135+
```
136+
You can find the tools and libraries generated in the `build/linux` directory.
137+
**Note**: You can also go to the `psw` folder and use the `make` command to build the Intel(R) SGX PSW component only.
138+
- To build Intel(R) SGX PSW with debug information, enter the following command:
139+
```
140+
$ make psw DEBUG=1
141+
```
142+
- To clean the files generated by previous `make psw` command, enter the following command:
143+
```
144+
$ make clean
145+
```
146+
- The build above uses prebuilt Intel(R) Architecture Enclaves(LE/PvE/QE/PCE/PSE-OP/PSE-PR) and applet(PSDA) - the files ``psw/ae/data/prebuilt/libsgx_*.signed.so`` and ``psw/ae/data/prebuilt/PSDA.dalp``, which have been signed by Intel in advance.
147+
To build those enclaves by yourself (without a signature), first you need to install latest Intel(R) SGX SDK from the [Intel(R) SGX SDK](https://software.intel.com/en-us/sgx-sdk/download) and then build PSW with the default configuration. After that, you can build each Architecture Enclave by using the `make` command from the corresponding folder:
148+
```
149+
$ cd psw/ae/le
150+
$ make
151+
```
152+
- To build the Intel(R) SGX PSW installer, enter the following command:
153+
* On Ubuntu 16.04 and Ubuntu 18.04:
154+
```
141155
$ make deb_pkg
142156
```
143157
You can find the generated Intel(R) SGX PSW installer ``libsgx-urts_${version}-${revision}_amd64.deb`` and ``libsgx-enclave-common_${version}-${revision}_amd64.deb`` located under `linux/installer/deb`, where `${version}` refers to the version number and the `${revision}` refers to the revision number of the package.
@@ -149,9 +163,9 @@ To build the Intel(R) SGX PSW installer, enter the following command:
149163
```
150164
$ make deb_pkg DEBUG=1
151165
```
152-
- On Red Hat Enterprise Linux 7.4, Red Hat Enterprise Linux 7.6 and CentOS 7.5:
153-
- On Fedora 27:
154-
- On SUSE Linux Enterprise Server 12:
166+
* On Red Hat Enterprise Linux 7.4, Red Hat Enterprise Linux 8.0 and CentOS 7.5:
167+
* On Fedora 27:
168+
* On SUSE Linux Enterprise Server 12:
155169
```
156170
$ make psw_install_pkg
157171
```
@@ -161,8 +175,8 @@ To build the Intel(R) SGX PSW installer, enter the following command:
161175
```
162176
$ make psw_install_pkg DEBUG=1
163177
```
164-
To build the Intel(R) SGX PSW development installer separately, enter the following command:
165-
- On Ubuntu 16.04 and Ubuntu 18.04:
178+
- To build the Intel(R) SGX PSW development installer separately, enter the following command:
179+
* On Ubuntu 16.04 and Ubuntu 18.04:
166180
```
167181
$ make deb_sgx_enclave_common_dev_pkg
168182
```
@@ -177,7 +191,7 @@ Install the Intel(R) SGX SDK
177191
* Ubuntu\* 18.04 LTS Desktop 64bits
178192
* Ubuntu\* 18.04 LTS Server 64bits
179193
* Red Hat Enterprise Linux Server release 7.4 64bits
180-
* Red Hat Enterprise Linux Server release 7.6 64bits
194+
* Red Hat Enterprise Linux Server release 8.0 64bits
181195
* CentOS 7.5 64bits
182196
* Fedora 27 Server 64bits
183197
* SUSE Linux Enterprise Server 12 64bits
@@ -186,7 +200,7 @@ Install the Intel(R) SGX SDK
186200
```
187201
$ sudo apt-get install build-essential python
188202
```
189-
* On Red Hat Enterprise Linux 7.4, Red Hat Enterprise Linux 7.6 and CentOS 7.5:
203+
* On Red Hat Enterprise Linux 7.4, Red Hat Enterprise Linux 8.0 and CentOS 7.5:
190204
```
191205
$ sudo yum groupinstall 'Development Tools'
192206
$ sudo yum install python
@@ -243,7 +257,7 @@ Install the Intel(R) SGX PSW
243257
* Ubuntu\* 18.04 LTS Desktop 64bits
244258
* Ubuntu\* 18.04 LTS Server 64bits
245259
* Red Hat Enterprise Linux Server release 7.4 64bits
246-
* Red Hat Enterprise Linux Server release 7.6 64bits
260+
* Red Hat Enterprise Linux Server release 8.0 64bits
247261
* CentOS 7.5 64bits
248262
* Fedora 27 Server 64bits
249263
* SUSE Linux Enterprise Server 12 64bits
@@ -256,7 +270,7 @@ Install the Intel(R) SGX PSW
256270
```
257271
$ sudo apt-get install libssl-dev libcurl4-openssl-dev libprotobuf-dev
258272
```
259-
* On Red Hat Enterprise Linux 7.4, Red Hat Enterprise Linux 7.6, CentOS 7.5 and Fedora 27:
273+
* On Red Hat Enterprise Linux 7.4, Red Hat Enterprise Linux 8.0, CentOS 7.5 and Fedora 27:
260274
```
261275
$ sudo yum install openssl-devel libcurl-devel protobuf-devel
262276
```
@@ -277,28 +291,26 @@ To install the Intel(R) SGX PSW, invoke the installer with root privilege:
277291
$ cd linux/installer/deb
278292
$ sudo dpkg -i ./libsgx-enclave-common-dbgsym_${version}-${revision}_amd64.ddeb
279293
```
280-
- On Red Hat Enterprise Linux 7.4, Red Hat Enterprise Linux 7.6 and CentOS 7.5:
294+
- On Red Hat Enterprise Linux 7.4, Red Hat Enterprise Linux 8.0 and CentOS 7.5:
281295
- On Fedora 27:
282296
- On SUSE Linux Enterprise Server 12:
283297
```
284298
$ cd linux/installer/bin
285299
$ sudo ./sgx_linux_x64_psw_${version}.bin
286300
```
287301
### ECDSA attestation
288-
To enable ECDSA attestation
302+
To enable ECDSA attestation
289303
- Ensure that you have the following required hardware:
290304
* 8th Generation Intel(R) Core(TM) Processor or newer with **Flexible Launch Control** support*
291305
* Intel(R) Atom(TM) Processor with **Flexible Launch Control** support*
292-
- To use ECDSA attestation, you must install Intel(R) Software Guard Extensions Driver for Data Center Attestation Primitives (Intel(R) SGX DCAP). Please follow the [Intel® SGX DCAP Installation Guide for Linux* OS](https://download.01.org/intel-sgx/latest/dcap-latest/linux/docs/Intel_SGX_DCAP_Linux_SW_Installation_Guide.pdf), section “Intel® SGX Driver”, to install the Intel(R) SGX DCAP driver.
293-
**NOTE**: If you have already installed Intel(R) SGX driver without ECDSA attestation, please uninstall the driver firstly. Otherwise the newly installed ECDSA attestation enabled Intel(R) SGX driver will be unworkable.
306+
- To use ECDSA attestation, you must install Intel(R) Software Guard Extensions Driver for Data Center Attestation Primitives (Intel(R) SGX DCAP).
307+
Please follow the [Intel(R) SGX DCAP Installation Guide for Linux* OS](https://download.01.org/intel-sgx/latest/dcap-latest/linux/docs/Intel_SGX_DCAP_Linux_SW_Installation_Guide.pdf) to install the Intel(R) SGX DCAP driver.
308+
309+
**NOTE**: If you had already installed Intel(R) SGX driver without ECDSA attestation, please uninstall the driver firstly and then install the Intel(R) SGX DCAP driver. Otherwise the newly installed Intel(R) SGX DCAP driver will be unworkable.
294310
295311
- Install PCK Caching Service. For how to install and configure PCK Caching
296312
Service, please refer to [SGXDataCenterAttestationPrimitives](https://github.com/intel/SGXDataCenterAttestationPrimitives/tree/master/QuoteGeneration/pccs)
297-
- Ensure the PCK Caching Service is setup correctly by local administrator
298-
or data center administrator. Also make sure that the configure file of
299-
quote provider library (/etc/sgx_default_qcnl.conf) needs to be consistent
300-
with the real environment, for example:
301-
PCS_URL=https://your_pcs_server:8081/sgx/certification/v1/
313+
- Ensure the PCK Caching Service is setup correctly by local administrator or data center administrator. Also make sure that the configure file of quote provider library (/etc/sgx_default_qcnl.conf) is consistent with the real environment, for example: PCS_URL=https://your_pcs_server:8081/sgx/certification/v1/
302314
303315
### Start or Stop aesmd Service
304316
The Intel(R) SGX PSW installer installs an aesmd service in your machine, which is running in a special linux account `aesmd`.

buildenv.mk

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -207,3 +207,18 @@ SGX_IPP_INC := $(SGX_IPP_DIR)/inc
207207
IPP_LIBS_DIR := $(SGX_IPP_DIR)/lib/linux/$(IPP_SUBDIR)
208208
LD_IPP := -lippcp
209209

210+
######## SGX SDK Settings ########
211+
SGX_SDK ?= /opt/intel/sgxsdk
212+
SGX_HEADER_DIR := $(SGX_SDK)/include
213+
214+
ifeq ($(ARCH), x86)
215+
SGX_COMMON_CFLAGS := -m32
216+
SGX_LIB_DIR := $(SGX_SDK)/lib
217+
SGX_BIN_DIR := $(SGX_SDK)/bin/x86
218+
else
219+
SGX_COMMON_CFLAGS := -m64
220+
SGX_LIB_DIR := $(SGX_SDK)/lib64
221+
SGX_BIN_DIR := $(SGX_SDK)/bin/x64
222+
endif
223+
224+
SPLIT_VERSION=$(word $2,$(subst ., ,$1))

common/inc/internal/se_version.h

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,13 @@
2828
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
2929
*
3030
*/
31-
#define STRFILEVER "2.6.100.51363"
31+
#define STRFILEVER "2.7.100.4"
3232
#define COPYRIGHT "Copyright (C) 2019 Intel Corporation"
3333

34-
#define UAE_SERVICE_VERSION "1.2.100.0"
35-
#define URTS_VERSION "1.1.101.0"
36-
#define ENCLAVE_COMMON_VERSION "1.0.104.0"
34+
#define UAE_SERVICE_VERSION "1.2.101.4"
35+
#define URTS_VERSION "1.1.102.4"
36+
#define ENCLAVE_COMMON_VERSION "1.0.105.4"
37+
#define LAUNCH_VERSION "1.0.100.4"
38+
#define PLATFORM_VERSION "1.0.100.4"
39+
#define EPID_VERSION "1.0.100.4"
40+
#define QUOTE_EX_VERSION "1.0.100.4"

common/inc/internal/sl_bitops.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ static inline int32_t test_and_clear_bit(volatile uint64_t* l, uint32_t i)
5454
return 1;
5555
}
5656

57+
//find a bit with value 1 and change it to 0, return bit index
5758
static inline int32_t extract_one_bit(volatile uint64_t* l)
5859
{
5960
uint64_t old_l;

common/inc/internal/sl_compiler.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@
3232
#ifndef _SL_COMPILER_H_
3333
#define _SL_COMPILER_H_
3434

35+
#include "se_cdefs.h"
36+
3537
#ifndef __dead
3638
//#define __dead __attribute__((noreturn))
3739
#define __dead

0 commit comments

Comments
 (0)