Commit Graph

183 Commits

Author SHA1 Message Date
Dionna Glaze f60ac7fe75 Remove #defines reserved by the C standard
The libc implementation newlib defines these symbols and causes a compiler error. Per the standard (ISO 9899:1999 reserved identifiers section), any identifier beginning with two underscores or an underscore and a capital letter is reserved for libc. The definitions are not used anywhere in the source code either.

Signed-off-by: Dionna Glaze <dionnaglaze@google.com>
2018-08-31 09:35:19 -07:00
lzha101 b0cc03a818 Merge pull request #301 from deeglaze/frame_pointer_pragma
Localize -O0 to necessary functions

Signed-off-by: Zhang Lili Z <lili.z.zhang@intel.com>
2018-08-17 09:01:17 +08:00
Dionna Glaze 4495449cea Localize -O0 to necessary functions
The load_regs assembly function uses its caller's frame pointer.
C/C++ compilers are allowed to make optimizations to their
representation of the stack, and frequently omit the frame pointer.

The functions _EEXIT in t_instructions.cpp and _SE3 in
u_instructions.cpp both call load_regs, and thus should be the only ones
that should be affected by deoptimization.

Even -O0 may omit the frame pointer (indeed we found this to be the case
when compiling with GCC 7.3.0), so this change also makes that requirement
explicit by by means of -fno-omit-frame-pointer.

The analogous attribute for -fno-omit-frame-pointer is not available in
clang, so the clang version of the LOAD_REGS_ATTRIBUTES is simply
[[clang:optnone]].

An added bonus of switching the -O0 flag over to an attribute in source
code is that alternate build tools are easier to port to :)

Signed-off-by: Dionna Glaze <dionnaglaze@google.com>
2018-08-14 08:11:31 -07:00
Li Xun abb0d35a39 Merge pull request #298 from anakrish/master
Emitter Plugin for Edger8r.
2018-08-10 09:23:11 +08:00
lzha101 f54da2d12b Merge pull request #297 from deeglaze/minor_compilation_fixes
Minor fixes for compilation errors

Signed-off-by: Zhang Lili Z <lili.z.zhang@intel.com>
2018-08-09 15:18:50 +08:00
Dionna Glaze fb5a866289 Minor fixes for compilation errors
Document that _mm_pause definition requires -ffreestanding.
Guard the definition of __STDC_FORMAT_MACROS with #ifndef/#endif.
Consistently refer to std::hex with std:: qualification in SignTool.

Signed-off-by: Dionna Glaze <dionnaglaze@google.com>
2018-08-08 22:30:07 -07:00
lzha101 5234aa7210 Merge pull request #299 from lzha101/create_enclave_ex
Add 'const' to sgx_create_enclave_ex()

Signed-off-by: Zhang Lili Z lili.z.zhang@intel.com
2018-08-07 15:59:25 +08:00
Zhang Lili Z 62dc69d355 Add 'const' to sgx_create_enclave_ex()
Signed-off-by: Zhang Lili Z <lili.z.zhang@intel.com>
2018-08-07 22:31:27 +08:00
Anand Krishnamoorthi ca6d709fcd Emitter Plugin for Edger8r.
CodeGen.ml checks whether a plugin is available and if so, invoked the plugin to emit edge routines.

Signed-off-by: Anand Krishnamoorthi <anakrish@microsoft.com>
2018-08-05 15:21:03 -07:00
Li, Xun a169a69497 Linux 2.2 Open Source Gold Release
Support for Switchless Calls
Bug fixes

Signed-off-by: Li, Xun <xun.li@intel.com>
sgx_2.2
2018-07-03 10:48:20 +08:00
lzha101 8f48696ec3 Merge pull request #286 from lzha101/dp_script
Update checksum in the download script.

Signed-off-by: Zhang Lili Z <lili.z.zhang@intel.com>
2018-06-28 12:27:43 +08:00
Zhang Lili Z ec46250251 Update download script.
Signed-off-by: Zhang Lili Z <lili.z.zhang@intel.com>
2018-06-28 20:21:07 +08:00
Zhang Lili Z b1f6f25dec Update checksum in the download script.
Signed-off-by: Zhang Lili Z <lili.z.zhang@intel.com>
2018-06-27 16:50:20 +08:00
lzha101 984c04c696 Merge pull request #273 from daveti/dup-mov
remove dup mov in load_regs

Signed-off-by: Zhang Lili Z lili.z.zhang@intel.com
2018-06-26 14:40:40 +08:00
Dave Tian 1d50f7c238 Merge branch 'dup-mov' of https://github.com/daveti/linux-sgx into dup-mov 2018-06-26 00:16:48 -04:00
Dave Tian e9e66673ff remove dup mov in load_regs
Signed-off-by: Dave Tian <root@davejingtian.org>
2018-06-26 00:12:15 -04:00
Andy Zhao 0b493e04ef Merge pull request #275 from jiazhang0/master
libsample_libcrypto.so: Fix link error
2018-06-12 09:57:34 +08:00
Jia Zhang 9338007c3a libsample_libcrypto.so: Fix link error
The C_OBJS is forgotten to link OBJS togeter in Makefile.
This mistake causes a build failure on SampleCode/RemoteAttestation:

/opt/intel/sgxsdk/SampleCode/RemoteAttestation/sample_libcrypto/libsample_libcrypto.so:
undefined reference to `sgx_disp_ippsAES_GCMGetTag'
/opt/intel/sgxsdk/SampleCode/RemoteAttestation/sample_libcrypto/libsample_libcrypto.so:
undefined reference to `sgx_disp_ippsAES_GCMGetSize'
...

Signed-off-by: Jia Zhang <zhang.jia@linux.alibaba.com>
2018-06-11 17:01:56 +08:00
lzha101 5a7e3e6240 Update download_prebuilt.sh
Update script to use an updated tarball.
Signed-off-by: Zhang Lili Z lili.z.zhang@intel.com
2018-06-07 21:17:03 +08:00
lzha101 8b6c63253a Update checksum in download script
Update checksum for the updated optimized libs in download script.

Signed-off-by: Zhang Lili Z lili.z.zhang@intel.com
2018-06-07 15:38:55 +08:00
lzha101 f010869a2e Merge pull request #274 from lzha101/sgxssl
Use latest sgxssl and remove an insecure flag '--no-check-certificate' from script

Signed-off-by: Zhang Lili Z lili.z.zhang@intel.com
2018-06-07 08:35:53 +08:00
Zhang Lili Z 43b8f79721 Use latest sgxssl and remove an insecure flag
Signed-off-by: Zhang Lili Z <lili.z.zhang@intel.com>
2018-06-07 00:49:40 +08:00
Dave Tian 86b9e70c3b remove dup mov in load_regs 2018-06-05 14:58:16 -04:00
Li Xun a911f996de Merge pull request #270 from npmccallum/gcc
Two minor compile fixes on GCC 8.1.1
2018-06-05 10:31:54 +08:00
Nathaniel McCallum 81c1e0056c Remove unnecessary cast
GCC 8.1.1 complains about this cast, producing an error under the
default compilation flags.

Signed-off-by: Nathaniel McCallum <npmccallum@redhat.com>
2018-05-29 17:13:29 -04:00
Nathaniel McCallum 87632f621f Catch std::bad_alloc by reference
GCC 8.1.1 complains when catching by value due to polymorphism.

Signed-off-by: Nathaniel McCallum <npmccallum@redhat.com>
2018-05-29 17:13:29 -04:00
haitaohuang 54cae063cd Merge pull request #260 from lshacham/master
Removed wrong link
2018-05-10 09:59:58 -05:00
Liron Shacham ef87f1f4f7 Removed wrong link
Signed-off-by: Shacham, Liron<liron.shacham@intel.com>
2018-05-10 17:56:42 +03:00
Andy Zhao 1543a82ca1 Merge pull request #259 from yuyuany/fedora-support
Update supported OS version in readme file
2018-05-10 14:40:11 +08:00
Yu Yuan fb7a0a03e5 update supported OS version in readme file
Signed-off-by: Yu Yuan <yuan.yu@intel.com>
2018-05-10 22:24:54 +08:00
Li, Xun 75dd558bda Linux 2.1.3 Open Source Gold Release
Security updates to Linux SDK and PSW
Support for Intel SGX Protected Code Loader

Signed-off-by: Li, Xun <xun.li@intel.com>
sgx_2.1.3
2018-05-10 11:05:38 +08:00
Andy Zhao 4b31cebfe5 Merge pull request #253 from yuyuany/refle
fix ref_le build issue with edger8r
2018-04-16 10:28:26 +08:00
Yu Yuan 2544dbd729 fix ref_le build issue with edger8r
Signed-off-by: Yu Yuan <yuan.yu@intel.com>
2018-04-16 18:14:29 +08:00
Andy Zhao e9a7c096a8 Merge pull request #250 from llly/tlibcrypto_update
Update tlibcrypto to add new crypto wrapper function
2018-04-13 09:30:58 +08:00
Li, Xun 5d59856dae Update tlibcrypto to add new crypto wrapper function
New API:
sgx_create_rsa_key_pair
sgx_rsa_priv_decrypt_sha256
sgx_rsa_pub_encrypt_sha256
sgx_create_rsa_priv2_key
sgx_create_rsa_priv1_key

Signed-off-by: Li, Xun <xun.li@intel.com>
2018-04-12 11:15:57 +08:00
lzha101 646b2d37ba Merge pull request #248 from yuyuany/fedora-support
Add Fedora support info to README

Signed-off-by: Zhang Lili Z <lili.z.zhang@intel.com>
2018-04-12 11:02:25 +08:00
Yu Yuan c697a4a836 Add Fedora support info to README
Signed-off-by: Yu Yuan <yuan.yu@intel.com>
2018-04-11 21:34:44 +08:00
lzha101 08bff79aa6 Merge pull request #245 from yuyuany/no-unused-parameter
add -Wno-unused-parameter to protobufs

Signed-off-by: Zhang Lili Z <lili.z.zhang@intel.com>
2018-04-09 14:47:45 +08:00
Yu Yuan b588e5d43e add -Wno-unused-parameter to protobufs
Signed-off-by: Yu Yuan <yuan.yu@intel.com>
2018-04-09 22:24:08 +08:00
lzha101 0f45cad401 Merge pull request #231 from lzha101/trts_red_zone
Fix red zone issue in continue_execution()

Signed-off-by: Zhang Lili Z <lili.z.zhang@intel.com>
2018-03-20 11:03:05 +08:00
Zhang Lili Z edb18459b8 Fix red zone issue in continue_execution(). And create a header file for shared constants between assembly code and C code.
Signed-off-by: Zhang Lili Z <lili.z.zhang@intel.com>
2018-03-19 23:18:37 +08:00
lzha101 a31b0b6034 Merge pull request #143 from deeglaze/ioctl_retry
Expose an internal error on enclave_create ioctl interrupt.

Signed-off-by: Zhang Lili Z <lili.z.zhang@intel.com>
2018-03-16 17:13:40 +08:00
Li, Xun bd59dc35dc Linux 2.1.2 Open Source Gold Release
Security updates to Linux SDK and PSW

Signed-off-by: Li, Xun <xun.li@intel.com>
2018-03-16 12:56:41 +08:00
Dionna Glaze 25709d8403 Expose an internal error on enclave_create ioctl interrupt.
After months of debugging to find the source of the interrupt, this
is the middle ground solution to make progress.

Signed-off-by: Dionna Glaze <dionnaglaze@google.com>
2018-03-14 11:26:27 -07:00
lzha101 7ce7e243d2 Merge pull request #216 from deeglaze/typedef_include
Adds includes to allow use of some typedefs when in pickier compilers.

Signed-off-by: Zhang Lili Z <lili.z.zhang@intel.com>
2018-03-05 15:54:56 +08:00
lzha101 3535f30bd2 Merge pull request #215 from deeglaze/sgx_is_enclave_crashed
Adds an API function to check if the enclave has crashed.

Signed-off-by: Zhang Lili Z <lili.z.zhang@intel.com>
2018-03-05 15:52:56 +08:00
Dionna Glaze 22f9f6008e Adds includes to allow use of some typedefs when in pickier compilers.
Signed-off-by: Dionna Glaze <dionnaglaze@google.com>
2018-03-02 09:58:08 -08:00
Dionna Glaze 3d80233b42 Adds an API function to check if the enclave has crashed.
Signed-off-by: Dionna Glaze <dionnaglaze@google.com>
2018-03-02 09:56:44 -08:00
lzha101 7d0a4086ed Merge pull request #219 from lzha101/st_fix
Fix dump command for sgx_sign

Signed-off-by: Zhang Lili Z <lili.z.zhang@intel.com>
2018-02-28 10:53:58 +08:00
Zhang Lili Z 08d15d554e Fix dump command for sgx_sign
Signed-off-by: Zhang Lili Z <lili.z.zhang@intel.com>
2018-02-28 18:46:37 +08:00