Skip to content

Commit edfe42a

Browse files
committed
Linux 2.14 Open Source Gold Release
Supported loading enclave at address 0. Upgraded Intel(R) Quote Verification Enclave to integrate SgxSSL/OpenSSL version 1.1.1k. Updated the DCAP driver V1.33 with stability fixes, released as V1.33.2. This is to support legacy solutions not ready to transition to the latest DCAP driver V1.41 or kernel 5.11+. Fixed bugs. Signed-off-by: Li, Xun <xun.li@intel.com>
1 parent ebf4534 commit edfe42a

File tree

65 files changed

+1683
-382
lines changed

Some content is hidden

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

65 files changed

+1683
-382
lines changed

.gitignore

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,16 +18,12 @@
1818
/build/
1919
/linux/installer/bin/*.bin
2020

21-
2221
# files downloaded in preparation phase
2322
Intel redistributable binary.txt
2423
Master_EULA_for_Intel_Sw_Development_Products.pdf
25-
external/ippcp_internal/inc/ippcp.h
26-
external/ippcp_internal/inc/ippcpdefs.h
27-
external/ippcp_internal/inc/ippversion.h
28-
external/ippcp_internal/inc/sgx_ippcp.h
29-
external/ippcp_internal/license/
24+
external/ippcp_internal/
3025
external/toolset/
26+
psw/ae/data/prebuilt/README.md
3127
redist.txt
3228

3329
# directory created when running reproducibility scripts

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,8 @@ The Linux\* Intel(R) SGX software stack is comprised of the Intel(R) SGX driver,
4040

4141
The [SGXDataCenterAttestationPrimitives](https://github.com/intel/SGXDataCenterAttestationPrimitives/) project maintains an out-of-tree driver for the Linux\* Intel(R) SGX software stack, which will be used until the driver upstreaming process is complete. It is used on the platforms with *Flexible Launch Control* and *Intel(R) AES New Instructions* support and could support both Elliptic Curve Digital Signature algorithm (ECDSA) based attestation and Enhanced Privacy Identification (EPID) based attestation.
4242

43+
**Note**: Ice Lake Xeon-SP (and the future Xeon-SP platforms) doesn't support EPID attestation.
44+
4345
The [linux-sgx-driver](https://github.com/01org/linux-sgx-driver) project hosts the other out-of-tree driver for the Linux\* Intel(R) SGX software stack, which will be used until the driver upstreaming process is complete. It is used to support Enhanced Privacy Identification (EPID) based attestation on the platforms without *Flexible Launch Control*.
4446

4547
The [intel-device-plugins-for-kubernetes](https://github.com/intel/intel-device-plugins-for-kubernetes) project enables users to run container applications running Intel(R) SGX enclaves in Kubernetes clusters. It also gives instructions how to set up ECDSA based attestation in a cluster.

SampleCode/SampleEnclave/App/Edger8rSyntax/Pointers.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,19 +50,19 @@ void edger8r_pointer_attributes(void)
5050
assert(strcmp(c, "SGX_SUCCESS") == 0);
5151

5252

53-
val = 0;
53+
val = 1;
5454
ret = ecall_pointer_in(global_eid, &val);
5555
if (ret != SGX_SUCCESS)
5656
abort();
57-
assert(val == 0);
57+
assert(val == 1);
5858

59-
val = 0;
59+
val = 1;
6060
ret = ecall_pointer_out(global_eid, &val);
6161
if (ret != SGX_SUCCESS)
6262
abort();
6363
assert(val == 1234);
6464

65-
val = 0;
65+
val = 1;
6666
ret = ecall_pointer_in_out(global_eid, &val);
6767
if (ret != SGX_SUCCESS)
6868
abort();

SampleCode/SampleEnclave/Enclave/Edger8rSyntax/Pointers.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,7 @@ void ecall_pointer_in(int* val)
9898
{
9999
if (sgx_is_within_enclave(val, sizeof(int)) != 1)
100100
abort();
101+
assert(*val == 1);
101102
*val = 1234;
102103
}
103104

@@ -119,6 +120,7 @@ void ecall_pointer_in_out(int* val)
119120
{
120121
if (sgx_is_within_enclave(val, sizeof(int)) != 1)
121122
abort();
123+
assert(*val == 1);
122124
*val = 1234;
123125
}
124126

build-scripts/sgx-asm-pp.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
#
3131
#
3232

33+
3334
__version__ = '1.0.1'
3435
import sys
3536
import os

common/inc/internal/enclave_creator.h

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -57,11 +57,13 @@ class EnclaveCreator : private Uncopyable
5757
{
5858
public:
5959
/*
60-
@quote the EPC reserved;
61-
@enclave_id identify the unique enclave;
62-
@start_addr is the linear address allocated for Enclave;
60+
@secs is a pointer to the architecture-specific information to use to create the enclave;
61+
@enclave_id identify the unique enclave;
62+
@start_addr is the linear address allocated for enclave;
63+
@ex_features is the bitmask defining the extended features to activate on the enclave creation;
64+
@ex_features_p is the array of pointers to extended feature control structures;
6365
*/
64-
virtual int create_enclave(secs_t *secs, sgx_enclave_id_t *enclave_id, void **start_addr, bool ae = false) = 0;
66+
virtual int create_enclave(secs_t *secs, sgx_enclave_id_t *enclave_id, void **start_addr, const uint32_t ex_features, const void* ex_features_p[32]) = 0;
6567
/*
6668
*@attr can be REMOVABLE
6769
*/
@@ -83,6 +85,7 @@ class EnclaveCreator : private Uncopyable
8385
virtual int trim_range(uint64_t fromaddr, uint64_t toaddr) = 0;
8486
virtual int trim_accept(uint64_t addr) = 0;
8587
virtual int remove_range(uint64_t fromaddr, uint64_t numpages) = 0;
88+
8689
// destructor
8790
virtual ~EnclaveCreator() {};
8891
};

common/inc/internal/global_data.h

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@
4848
typedef struct _global_data_t
4949
{
5050
sys_word_t sdk_version;
51-
sys_word_t enclave_size;
51+
sys_word_t enclave_size; /* the size of the virtual address range that the enclave will use*/
5252
sys_word_t heap_offset;
5353
sys_word_t heap_size;
5454
sys_word_t rsrv_offset;
@@ -61,6 +61,9 @@ typedef struct _global_data_t
6161
uint32_t layout_entry_num;
6262
uint32_t reserved;
6363
layout_t layout_table[LAYOUT_ENTRY_NUM];
64+
uint64_t enclave_image_address; /* the base address of the enclave image */
65+
uint64_t elrange_start_address; /* the base address provided in the enclave's SECS (SECS.BASEADDR) */
66+
uint64_t elrange_size; /* the size of the enclave address range provided in the enclave's SECS (SECS.SIZE) */
6467
} global_data_t;
6568

6669
#define ENCLAVE_INIT_NOT_STARTED 0

common/inc/internal/metadata.h

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,12 @@
4040
#define MAJOR_VERSION 2 //MAJOR_VERSION should not larger than 0ffffffff
4141
#define MINOR_VERSION 4 //MINOR_VERSION should not larger than 0ffffffff
4242

43+
#define SGX_2_ELRANGE_MAJOR_VERSION 12
44+
#define SGX_1_ELRANGE_MAJOR_VERSION 11
45+
46+
#define SGX_MAJOR_VERSION_GAP 10
47+
48+
4349
#define SGX_2_1_MAJOR_VERSION 2 //MAJOR_VERSION should not larger than 0ffffffff
4450
#define SGX_2_1_MINOR_VERSION 2 //MINOR_VERSION should not larger than 0ffffffff
4551

@@ -168,6 +174,13 @@ typedef struct _patch_entry_t
168174
uint32_t reserved[4];
169175
} patch_entry_t;
170176

177+
typedef struct _elrange_config_entry_t
178+
{
179+
uint64_t enclave_image_address;
180+
uint64_t elrange_start_address;
181+
uint64_t elrange_size;
182+
}elrange_config_entry_t;
183+
171184
typedef struct _metadata_t
172185
{
173186
uint64_t magic_num; /* The magic number identifying the file as a signed enclave image */

common/inc/internal/se_debugger_lib.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,7 @@ typedef struct _debug_enclave_info_t
8787
PADDED_POINTER(void, lpFileName);
8888
PADDED_POINTER(void, g_peak_heap_used_addr);
8989
PADDED_POINTER(void, g_peak_rsrv_mem_committed_addr);
90+
uint64_t elrange_start_address;
9091
PADDED_POINTER(void, dyn_sec);
9192
sgx_misc_select_t misc_select;
9293
/* The following members are optional or unused */

common/inc/internal/se_version.h

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -31,20 +31,20 @@
3131
#ifndef _SE_VERSION_H_
3232
#define _SE_VERSION_H_
3333

34-
#define STRFILEVER "2.13.103.1"
34+
#define STRFILEVER "2.14.100.2"
3535
#define SGX_MAJOR_VERSION 2
36-
#define SGX_MINOR_VERSION 13
37-
#define SGX_REVISION_VERSION 103
36+
#define SGX_MINOR_VERSION 14
37+
#define SGX_REVISION_VERSION 100
3838
#define MAKE_VERSION_UINT(major,minor,rev) (((uint64_t)major)<<32 | ((uint64_t)minor) << 16 | rev)
3939
#define VERSION_UINT MAKE_VERSION_UINT(SGX_MAJOR_VERSION, SGX_MINOR_VERSION, SGX_REVISION_VERSION)
4040

4141
#define COPYRIGHT "Copyright (C) 2021 Intel Corporation"
4242

43-
#define UAE_SERVICE_VERSION "2.3.210.1"
44-
#define URTS_VERSION "1.1.114.1"
45-
#define ENCLAVE_COMMON_VERSION "1.0.117.1"
46-
#define LAUNCH_VERSION "1.0.112.1"
47-
#define EPID_VERSION "1.0.112.1"
48-
#define QUOTE_EX_VERSION "1.1.112.1"
43+
#define UAE_SERVICE_VERSION "2.3.211.2"
44+
#define URTS_VERSION "1.1.115.2"
45+
#define ENCLAVE_COMMON_VERSION "1.1.118.2"
46+
#define LAUNCH_VERSION "1.0.113.2"
47+
#define EPID_VERSION "1.0.113.2"
48+
#define QUOTE_EX_VERSION "1.1.113.2"
4949

5050
#endif

0 commit comments

Comments
 (0)