Skip to content

Commit 56faf11

Browse files
committed
Revert "Linux 2.13.1 Open Source Gold Release"
Linux 2.13.1 is broken. This reverts commit 63d0e65. Signed-off-by: Li, Xun <xun.li@intel.com>
1 parent 63d0e65 commit 56faf11

File tree

528 files changed

+6707
-6084
lines changed

Some content is hidden

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

528 files changed

+6707
-6084
lines changed

.gitmodules

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,4 @@
1212
[submodule "ipp-crypto"]
1313
path = external/ippcp_internal/ipp-crypto
1414
url = https://github.com/intel/ipp-crypto.git
15-
branch = ipp-crypto_2020_update3
15+
branch = ipp-crypto_2019_update5

build-scripts/sgx-asm-pp.py

Lines changed: 0 additions & 366 deletions
This file was deleted.

common/inc/internal/se_version.h

Lines changed: 8 additions & 8 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.101.2"
34+
#define STRFILEVER "2.13.100.4"
3535
#define SGX_MAJOR_VERSION 2
3636
#define SGX_MINOR_VERSION 13
37-
#define SGX_REVISION_VERSION 101
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.208.2"
44-
#define URTS_VERSION "1.1.112.2"
45-
#define ENCLAVE_COMMON_VERSION "1.0.115.2"
46-
#define LAUNCH_VERSION "1.0.110.2"
47-
#define EPID_VERSION "1.0.110.2"
48-
#define QUOTE_EX_VERSION "1.1.110.2"
43+
#define UAE_SERVICE_VERSION "2.3.207.4"
44+
#define URTS_VERSION "1.1.111.4"
45+
#define ENCLAVE_COMMON_VERSION "1.0.114.4"
46+
#define LAUNCH_VERSION "1.0.109.4"
47+
#define EPID_VERSION "1.0.109.4"
48+
#define QUOTE_EX_VERSION "1.1.109.4"
4949

5050
#endif

download_prebuilt.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,11 +33,11 @@
3333

3434
top_dir=`dirname $0`
3535
out_dir=$top_dir
36-
optlib_name=optimized_libs_2.13.1.tar.gz
37-
ae_file_name=prebuilt_ae_2.13.1.tar.gz
36+
optlib_name=optimized_libs_2.13.tar.gz
37+
ae_file_name=prebuilt_ae_2.13.tar.gz
3838
binutils_file_name=as.ld.objdump.gold.r3.tar.gz
39-
checksum_file=SHA256SUM_prebuilt_2.13.1.cfg
40-
server_url_path=https://download.01.org/intel-sgx/sgx-linux/2.13.1
39+
checksum_file=SHA256SUM_prebuilt_2.13.cfg
40+
server_url_path=https://download.01.org/intel-sgx/sgx-linux/2.13
4141
server_optlib_url=$server_url_path/$optlib_name
4242
server_ae_url=$server_url_path/$ae_file_name
4343
server_binutils_url=$server_url_path/$binutils_file_name

external/epid-sdk/ext/ipp/include/sgx_ippcp.h

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (C) 2011-2021 Intel Corporation. All rights reserved.
2+
* Copyright (C) 2011-2019 Intel Corporation. All rights reserved.
33
*
44
* Redistribution and use in source and binary forms, with or without
55
* modification, are permitted provided that the following conditions
@@ -83,7 +83,6 @@ extern "C" {
8383
#define ippsAESDecryptCTR sgx_disp_ippsAESDecryptCTR
8484
#define ippsAESEncryptXTS_Direct sgx_disp_ippsAESEncryptXTS_Direct
8585
#define ippsAESDecryptXTS_Direct sgx_disp_ippsAESDecryptXTS_Direct
86-
#define ippsAES_EncryptCFB16_MB sgx_disp_ippsAES_EncryptCFB16_MB
8786
#define ippsSMS4GetSize sgx_disp_ippsSMS4GetSize
8887
#define ippsSMS4Init sgx_disp_ippsSMS4Init
8988
#define ippsSMS4SetKey sgx_disp_ippsSMS4SetKey
@@ -348,14 +347,6 @@ extern "C" {
348347
#define ippsRSAVerify_PKCS1v15 sgx_disp_ippsRSAVerify_PKCS1v15
349348
#define ippsRSASign_PKCS1v15_rmf sgx_disp_ippsRSASign_PKCS1v15_rmf
350349
#define ippsRSAVerify_PKCS1v15_rmf sgx_disp_ippsRSAVerify_PKCS1v15_rmf
351-
#define ippsRSA_MB_GetBufferSizePublicKey sgx_disp_ippsRSA_MB_GetBufferSizePublicKey
352-
#define ippsRSA_MB_GetBufferSizePrivateKey sgx_disp_ippsRSA_MB_GetBufferSizePrivateKey
353-
#define ippsRSA_MB_Encrypt sgx_disp_ippsRSA_MB_Encrypt
354-
#define ippsRSA_MB_Decrypt sgx_disp_ippsRSA_MB_Decrypt
355-
#define ippsRSA_MB_Sign_PSS_rmf sgx_disp_ippsRSA_MB_Sign_PSS_rmf
356-
#define ippsRSA_MB_Verify_PSS_rmf sgx_disp_ippsRSA_MB_Verify_PSS_rmf
357-
#define ippsRSA_MB_Sign_PKCS1v15_rmf sgx_disp_ippsRSA_MB_Sign_PKCS1v15_rmf
358-
#define ippsRSA_MB_Verify_PKCS1v15_rmf sgx_disp_ippsRSA_MB_Verify_PKCS1v15_rmf
359350
#define ippsDLGetResultString sgx_disp_ippsDLGetResultString
360351
#define ippsDLPGetSize sgx_disp_ippsDLPGetSize
361352
#define ippsDLPInit sgx_disp_ippsDLPInit
@@ -518,9 +509,7 @@ extern "C" {
518509
#define ippsGFpECSetPointRandom sgx_disp_ippsGFpECSetPointRandom
519510
#define ippsGFpECMakePoint sgx_disp_ippsGFpECMakePoint
520511
#define ippsGFpECSetPointHash sgx_disp_ippsGFpECSetPointHash
521-
#define ippsGFpECSetPointHashBackCompatible sgx_disp_ippsGFpECSetPointHashBackCompatible
522512
#define ippsGFpECSetPointHash_rmf sgx_disp_ippsGFpECSetPointHash_rmf
523-
#define ippsGFpECSetPointHashBackCompatible_rmf sgx_disp_ippsGFpECSetPointHashBackCompatible_rmf
524513
#define ippsGFpECGetPoint sgx_disp_ippsGFpECGetPoint
525514
#define ippsGFpECGetPointRegular sgx_disp_ippsGFpECGetPointRegular
526515
#define ippsGFpECSetPointOctString sgx_disp_ippsGFpECSetPointOctString

external/ippcp_internal/Makefile

Lines changed: 22 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,8 @@ include ../../buildenv.mk
3434
DIR = $(CURDIR)
3535

3636
IPP_CONFIG = -Bbuild -DCMAKE_VERBOSE_MAKEFILE=on
37-
37+
# Set the mitigation version assembler for IPP assembly code build
38+
IPP_CONFIG += -DCMAKE_ASM-ATT_COMPILER="$(BINUTILS_DIR)/as"
3839
# Ignore the CMAKE C/C++ compiler check to avoid conflicts with mitigation options
3940
IPP_CONFIG += -DCMAKE_C_COMPILER_WORKS=TRUE -DCMAKE_CXX_COMPILER_WORKS=TRUE
4041
IPP_SOURCE = ipp-crypto
@@ -48,23 +49,29 @@ ENC_CXXFLAGS = $(ENC_CFLAGS)
4849

4950
IPP_CONFIG += -DCMAKE_C_FLAGS="$(ENC_CFLAGS)"
5051
IPP_CONFIG += -DCMAKE_CXX_FLAGS="$(ENC_CXXFLAGS)"
52+
comma:= ,
53+
ASM_FLAGS = $(subst -Wa$(comma),,$(MITIGATION_ASFLAGS))
54+
ENC_ASM_FLAGS = $(patsubst -fno-plt, , $(ASM_FLAGS))
55+
56+
IPP_CONFIG += -DCMAKE_ENC_ASM_FLAGS="$(ENC_ASM_FLAGS)"
5157

5258
SUB_DIR = no_mitigation
5359
ifeq ($(MITIGATION-CVE-2020-0551), LOAD)
5460
SUB_DIR = cve_2020_0551_load
55-
PRE_CONFIG= ASM_NASM="python $(DIR)/../../build-scripts/sgx-asm-pp.py --assembler=nasm --MITIGATION-CVE-2020-0551=LOAD"
5661
else ifeq ($(MITIGATION-CVE-2020-0551), CF)
5762
SUB_DIR = cve_2020_0551_cf
58-
PRE_CONFIG= ASM_NASM="python $(DIR)/../../build-scripts/sgx-asm-pp.py --assembler=nasm --MITIGATION-CVE-2020-0551=CF"
5963
endif
6064
OUT_DIR = lib/linux/$(ARCH)/$(SUB_DIR)/
6165

62-
CHECK_SOURCE :=
66+
PATCH_LOG = $(shell cd ./$(IPP_SOURCE) && git log --oneline --grep='Add mitigation support to assembly code' | cut -d' ' -f 3)
67+
CHECK_PATCHED :=
6368
# For reproducibility build in docker, the code should be
6469
# prepared before build. So skip the code check to avoid
6570
# triggering network request
6671
ifneq ($(origin NIX_PATH), environment)
67-
CHECK_SOURCE:= ipp_source
72+
ifneq ($(PATCH_LOG), mitigation)
73+
CHECK_PATCHED:= ipp_source
74+
endif
6875
endif
6976

7077
.PHONY: all build_ipp
@@ -73,21 +80,23 @@ all: build_ipp
7380
$(MKDIR) $(OUT_DIR)
7481
$(CP) ipp-crypto/build/.build/RELEASE/lib/libippcp.a $(OUT_DIR)
7582
$(CP) ipp-crypto/include/* ./inc/
76-
patch ipp-crypto/include/ippcp.h -i ./inc/ippcp20u3.patch -o ./inc/ippcp.h
83+
patch ipp-crypto/include/ippcp.h -i ./inc/ippcp19u5.patch -o ./inc/ippcp.h
7784
$(MKDIR) license
7885
$(CP) ipp-crypto/LICENSE ./license/
7986

80-
build_ipp: $(CHECK_SOURCE)
81-
cd $(IPP_SOURCE) && $(PRE_CONFIG) cmake CMakeLists.txt $(IPP_CONFIG) && cd build && make ippcp_s
87+
build_ipp: $(CHECK_PATCHED)
88+
cd $(IPP_SOURCE) && cmake CMakeLists.txt $(IPP_CONFIG) && cd build && make ippcp_s
8289

8390
.PHONY: ipp_source
8491
ipp_source:
85-
ifeq ($(shell git rev-parse --is-inside-work-tree), true)
86-
git submodule update -f --init --recursive --remote -- $(IPP_SOURCE)
87-
else
92+
## Need to enable below code when release
93+
#ifeq ($(shell git rev-parse --is-inside-work-tree), true)
94+
# git submodule update -f --init --recursive --remote -- $(IPP_SOURCE)
95+
#else
8896
$(RM) -rf $(IPP_SOURCE)
89-
git clone -b ipp-crypto_2020_update3 https://github.com/intel/ipp-crypto.git --depth 1 $(IPP_SOURCE)
90-
endif
97+
git clone -b ipp-crypto_2019_update5 https://github.com/intel/ipp-crypto.git --depth 1 $(IPP_SOURCE)
98+
#endif
99+
cd $(IPP_SOURCE) && git am ../0001-Add-mitigation-support-to-assembly-code.patch
91100

92101
.PHONY: clean
93102
clean:
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
--- ipp-crypto/include/ippcp.h 2019-10-16 18:12:26.157669380 +0800
2+
+++ inc/ippcp.h 2019-10-28 23:53:28.871586537 +0800
3+
@@ -49,6 +49,11 @@
4+
#define IPPCP_H__
5+
6+
7+
+#ifndef _SGX_IPPCP_H_
8+
+#include "sgx_ippcp.h"
9+
+#endif
10+
+
11+
+
12+
#ifndef IPPCPDEFS_H__
13+
#include "ippcpdefs.h"
14+
#endif
15+
@@ -70,11 +75,6 @@
16+
#endif
17+
#endif
18+
19+
-#pragma warning(push)
20+
-#ifdef _MSC_VER
21+
-#pragma warning(disable : 4100) // for MSVC, unreferenced param
22+
-#endif
23+
-
24+
/* /////////////////////////////////////////////////////////////////////////////
25+
// Name: ippcpGetLibVersion
26+
// Purpose: getting of the library version
27+
@@ -1331,7 +1331,6 @@
28+
IPPAPI(IppStatus, ippsGFpECESGetBuffersSize_SM2, (int* pPublicKeySize,
29+
int* pMaximumTagSize, const IppsECESState_SM2* pState))
30+
31+
-#pragma warning(pop)
32+
#ifdef __cplusplus
33+
}
34+
#endif

external/ippcp_internal/inc/ippcp20u3.patch

Lines changed: 0 additions & 12 deletions
This file was deleted.

0 commit comments

Comments
 (0)