Commit Graph

37 Commits

Author SHA1 Message Date
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 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
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
Andy Zhao 1bcdf2ed21 Linux 2.1.1 Open Source Gold Release
Signed-off-by: Andy Zhao <yebin.andy.zhao@intel.com>
2018-02-13 06:29:03 +00:00
Zhang Lili Z a12405a2b3 Fix OpenSSL 1.1.0 compatibility issue in sign_tool and urts_sim
Signed-off-by: Zhang Lili Z <lili.z.zhang@intel.com>
2018-01-27 01:45:19 +08:00
Yu Ding 550724f559 Merge remote-tracking branch 'upstream/master' 2018-01-19 10:53:43 -08:00
Li, Xun 1ccf25b64a Linux 2.1 Open Source Gold release
Signed-off-by: Li, Xun <xun.li@intel.com>
2018-01-19 11:02:56 +08:00
Yu Ding 4752534fb2 Fix improper Makefile for tprotected_fs and uprotected_fs, enabling make -j.
Signed-off-by: Yu Ding <dingelish@gmail.com>
2018-01-17 14:50:33 -08:00
Yu Yuan 5fd7026fc3 Clear the heap pages after enclave initialization
Signed-off-by: Yu Yuan <yuan.yu@intel.com>
2017-12-11 21:56:40 +08:00
Reimo Rebane d15da77481 Fix linker error due to undefined reference.
* Calling the macro "SGX_ACCESS_VERSION(sgx_capable, 1)" results in a
  reference to "sgx_sgx_capable_version" which is undefined. The correct
  reference is "sgx_capable_version".

Signed-off-by: Reimo Rebane <reimo.rebane@cyber.ee>
2017-11-13 13:05:47 +02:00
Li, Xun 159f60223e Linux 2.0 Open Source Gold release
Signed-off-by: Li, Xun <xun.li@intel.com>
2017-11-07 14:41:20 +08:00
Yu Ding 4b78988578 Fix to a static library linking problem.
The new `protected_fs` library is shipped within two static libraries (libsgx_tprotected_fs.a and libsgx_uprotected_fs.a). Both of them include a header file. These two header files would cause linking problem because in many circumstances, these two header files appear in source code directories and source codes include them. This patch is intended to resolve this conflict.

Signed-off-by: Yu Ding <dingyu02@baidu.com>
2017-09-28 20:45:08 -07:00
Li, Xun e22c569335 Update libunwind for glibc 2.26 compatibility
libunwind should include <signal.h> explicitly.
glibc change sys/ucontext.h as a bug fix(https://sourceware.org/git/?p=glibc.git;a=commit;h=cfed8ece799b6e6540193a14b41d9de52dc3b08f)

Signed-off-by: Li, Xun <xun.li@intel.com>
2017-09-20 11:12:20 +08:00
Chris Rankin 36918f071f Ensure trts_nsp.cpp is compiled without stack protection.
Signed-off-by: Chris Rankin <chris.rankin@r3.com>
2017-09-19 08:07:59 +00:00
Kai Mast 94c162c98b g++7 fixes (#148)
Signed-off-by: Li, Xun<xun.li@intel.com>
2017-09-18 16:07:19 +08:00
Chris Rankin 635e3a3708 Resolve warnings about deprecated throw(std::bad_alloc) in C++11. 2017-09-13 10:31:11 +01:00
yuyuany f2cf6d18aa Revert "Check for crash in sgx_ocall and exit enclave if enclave is crashed" 2017-09-07 15:21:45 +08:00
Yu Yuan a20449f5f8 tRTS check the enclave crash state when doing an OCALL. If the enclave is crashed, tRTS unwind the stack to ECALL, and exit the enclave with SGX_ERROR_ENCLAVE_CRASHED.
Signed-off-by: Yu Yuan <yuan.yu@intel.com>
2017-09-01 22:46:27 +08:00
Zhang Lili 6979d81807 Add two missing delete functions.
Signed-off-by: Zhang Lili <lili.z.zhang@intel.com>
2017-08-28 23:17:47 +08:00
Dionna Glaze aa8e9755aa Move pms pointer validation before its dereference in local_vars definitions.
Also fix "sgx_status_t" typo in generated comment.
2017-08-15 12:28:54 -07:00
John Mechalas 6f0e20cfd9 Implements most of libsgx_capable for Linux (previously only available in the Windows SDK) (#107)
* Adds libsgx_capable, which is currently only available in the Windows
version of the Intel SGX SDK. The Linux implementation of this library
adds the following functions:

  sgx_status_t sgx_is_capable (int *sgx_capable);
  sgx_status_t sgx_cap_get_status (sgx_device_status_t *sgx_device_status);
  sgx_status_t sgx_cap_enable_device (sgx_device_status_t *sgx_device_status);

And adds the following error code (also from the Windows version of the
Intel SGX SDK):

  SGX_ERROR_NO_PRIVILEGE

Generates both a static and dynamic build of libsgx_capable. This is
incorporated into the SDK package, not the PSW package, since software
installers need to check for Intel SGX capability on systems where the PSW
may not already be installed. This means that installers will either have
to statically link, or distribute the .so with their installation package.

----------------------

Developer Certificate of Origin
Version 1.1

Copyright (C) 2004, 2006 The Linux Foundation and its contributors.
660 York Street, Suite 102,
San Francisco, CA 94110 USA

Everyone is permitted to copy and distribute verbatim copies of this
license document, but changing it is not allowed.

Developer's Certificate of Origin 1.1

By making a contribution to this project, I certify that:

(a) The contribution was created in whole or in part by me and I
    have the right to submit it under the open source license
    indicated in the file; or

(b) The contribution is based upon previous work that, to the best
    of my knowledge, is covered under an appropriate open source
    license and I have the right under that license to submit that
    work with modifications, whether created in whole or in part
    by me, under the same open source license (unless I am
    permitted to submit under a different license), as indicated
    in the file; or

(c) The contribution was provided directly to me by some other
    person who certified (a), (b) or (c) and I have not modified
    it.

(d) I understand and agree that this project and the contribution
    are public and that a record of the contribution (including all
    personal information I submit with it, including my sign-off) is
    maintained indefinitely and may be redistributed consistent with
    this project or the open source license(s) involved.

Signed-off-by: John P Mechalas <john.p.mechalas@intel.com>
2017-08-11 10:00:34 +08:00
Jaak Randmets d42cd14bdd Merge pull request #124 from Jaak/master
Improve const correctness of sgx_fopen and sgx_fimport_auto_key.

Signed-off-by: Zhang Lili <lili.z.zhang@intel.com>
2017-07-24 14:04:03 +08:00
Li, Xun 0fb9f47e78 Linux 1.9 Open Source Gold release
Signed-off-by: Li, Xun <xun.li@intel.com>
2017-06-30 15:51:16 +08:00
lzha101 75336444e8 Update comment
Signed-off-by: Zhang Lili <lili.z.zhang@intel.com>
2017-04-14 16:03:48 +08:00
lzha101 2224616cb4 Change alignment for metadata section
Signed-off-by: Lili Zhang <lili.z.zhang@intel.com>
2017-04-14 15:43:05 +08:00
Li, Xun 1115c195cd Linux 1.8 Open Source Gold release
Signed-off-by: Li, Xun <xun.li@intel.com>
2017-03-16 15:30:38 +09:00
Andras Slemmer 24dc91d77c Change mallinfo field type to int as per system malloc.h
Signed-off-by: Andras Slemmer <andras.slemmer@r3cev.com>
2017-02-16 10:09:18 +00:00
Jarkko Sakkinen fc4cd7ead0 Do not define CC and CXX in sdk/cpprt/Makefile
This will prevent the cross compilation environment from defining its
own CC and CXX.

Signed-off-by: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
2016-12-25 18:49:26 +02:00
llly 6662022bf8 Linux 1.7 Open Source Gold release
Signed-off-by: Li, Xun <xun.li@email.com>
2016-12-20 09:47:15 +09:00
Andy Zhao 4ed901beda Merge pull request #33 from yuyuany/driver_api_change
update enclave_creator to align with driver API change
2016-10-24 12:50:42 +08:00
Yu Yuan 5cd3c5a7bf update enclave_creator to align with driver API change 2016-10-24 12:27:44 +08:00
ZongminGu 9700628686 Update gdb_sgx_plugin.py
fix the simulation mode support issue
2016-10-24 11:53:26 +08:00
yuyuany 57cb162f12 Merge pull request #9 from wh0/64bit
Large enclave support
2016-10-20 09:19:16 +08:00
zhaohuidu 85947caa12 Upgrade to Linux 1.6 gold release
switch code to linux 1.6 opensource gold release
2016-09-19 14:55:22 +08:00
Warren He b57e8d0469 Widen XML parameters to 64 bits
The signing tool parses values in the enclave configuration as 32-bit
integers. This patch changes it to parse them as 64-bit integers, so
that it can process larger enclaves. This only affects properties such
as MaxStackSize and MaxHeapSize, while subsequent 32-bit bookkeeping,
such as TCSPolicy, MiscSelect, and MiscMask are unchanged.

Signed-off-by: Warren He <-w@berkeley.edu>
2016-08-01 08:39:17 -07:00
Warren He 8bde48e653 Avoid overflow when shifting
The urts library and the signing tool often shift page counts as
32-bit integers, then passes the result as a 64-bit value. This patch
casts page counts into 64-bit integers first, so that large page
counts don't overflow.

Signed-off-by: Warren He <-w@berkeley.edu>
2016-08-01 08:39:04 -07:00
Angie Chinchilla 9441de4c38 Initial release of Intel SGX for Linux.
This release is used in conjunction with the linux-sgx-driver Intial release:
https://github.com/01org/linux-sgx-driver
commit-id: 0e865ce5e6b297a787bcdc12d98bada8174be6d7

Intel-id: 33399

Signed-off-by: Angie Chinchilla <angie.v.chinchilla@intel.com>
2016-06-23 18:51:53 -04:00