You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@teaclave.apache.org by rd...@apache.org on 2023/03/27 03:28:08 UTC

[incubator-teaclave-sgx-sdk] branch v2.0.0-preview updated (e3d94b90 -> ff3543ba)

This is an automated email from the ASF dual-hosted git repository.

rduan pushed a change to branch v2.0.0-preview
in repository https://gitbox.apache.org/repos/asf/incubator-teaclave-sgx-sdk.git


    from e3d94b90 Add proc-macro to sysroot
     new d2656c6f Fix backtrace access to illegal memory
     new ff3543ba Update dockerfile

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .gitignore                                         |  1 +
 sgx_backtrace/sgx_backtrace_sys/libbacktrace/elf.c | 30 ++++++++++------------
 sgx_unwind/libunwind/src/x86_64/Ginit.c            | 10 ++++----
 tools/docker/Dockerfile.centos8                    |  2 +-
 tools/docker/Dockerfile.ubuntu18.04                |  2 +-
 tools/docker/Dockerfile.ubuntu20.04                |  2 +-
 6 files changed, 23 insertions(+), 24 deletions(-)


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@teaclave.apache.org
For additional commands, e-mail: commits-help@teaclave.apache.org


[incubator-teaclave-sgx-sdk] 02/02: Update dockerfile

Posted by rd...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

rduan pushed a commit to branch v2.0.0-preview
in repository https://gitbox.apache.org/repos/asf/incubator-teaclave-sgx-sdk.git

commit ff3543ba695c65ac8e623402c8f82b6a736fb100
Author: volcano <vo...@163.com>
AuthorDate: Mon Mar 27 10:20:26 2023 +0800

    Update dockerfile
---
 .gitignore                          | 1 +
 tools/docker/Dockerfile.centos8     | 2 +-
 tools/docker/Dockerfile.ubuntu18.04 | 2 +-
 tools/docker/Dockerfile.ubuntu20.04 | 2 +-
 4 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/.gitignore b/.gitignore
index 72711c86..a3285da6 100644
--- a/.gitignore
+++ b/.gitignore
@@ -72,3 +72,4 @@ sgx_unwind/libunwind/aclocal.m4
 sgx_unwind/libunwind/autom4te.cache/*
 sgx_unwind/libunwind/configure
 sgx_unwind/libunwind/src/Makefile.in
+sgx_unwind/libunwind/configure~
diff --git a/tools/docker/Dockerfile.centos8 b/tools/docker/Dockerfile.centos8
index 19fe2d26..2154df76 100644
--- a/tools/docker/Dockerfile.centos8
+++ b/tools/docker/Dockerfile.centos8
@@ -80,7 +80,7 @@ ENV SGX_SDK_PKGS_VERSION        2.17.100.3
 ENV SGX_DCAP_PKGS_VERSION       1.14.100.3
 ENV SGX_SDK_VERSION             ${SGX_SDK_PKGS_VERSION}
 ENV SGX_DCAP_VERSION            ${SGX_DCAP_PKGS_VERSION}
-ENV RUST_TOOLCHAIN              nightly-2022-02-23
+ENV RUST_TOOLCHAIN              nightly-2022-10-22
 ENV OS_NAME                     centos
 ENV BINUTILS_DIST               centos8
 ENV SGX_SDK_URL                 "https://download.01.org/intel-sgx/sgx-linux/${SGX_SDK_CODE_VERSION}/distro/${OS_NAME}-stream/sgx_linux_x64_sdk_${SGX_SDK_BIN_VERSION}.bin"
diff --git a/tools/docker/Dockerfile.ubuntu18.04 b/tools/docker/Dockerfile.ubuntu18.04
index f681f879..6d747d99 100644
--- a/tools/docker/Dockerfile.ubuntu18.04
+++ b/tools/docker/Dockerfile.ubuntu18.04
@@ -87,7 +87,7 @@ ENV SGX_SDK_PKGS_VERSION        2.17.100.3
 ENV SGX_DCAP_PKGS_VERSION       1.14.100.3
 ENV SGX_SDK_VERSION             ${SGX_SDK_PKGS_VERSION}-bionic1
 ENV SGX_DCAP_VERSION            ${SGX_DCAP_PKGS_VERSION}-bionic1
-ENV RUST_TOOLCHAIN              nightly-2022-02-23
+ENV RUST_TOOLCHAIN              nightly-2022-10-22
 ENV OS_NAME                     ubuntu
 ENV BINUTILS_DIST               ubuntu18.04
 ENV SGX_SDK_URL                 "https://download.01.org/intel-sgx/sgx-linux/${SGX_SDK_CODE_VERSION}/distro/${BINUTILS_DIST}-server/sgx_linux_x64_sdk_${SGX_SDK_BIN_VERSION}.bin"
diff --git a/tools/docker/Dockerfile.ubuntu20.04 b/tools/docker/Dockerfile.ubuntu20.04
index 9b8855b8..5ff63ff7 100644
--- a/tools/docker/Dockerfile.ubuntu20.04
+++ b/tools/docker/Dockerfile.ubuntu20.04
@@ -86,7 +86,7 @@ ENV SGX_SDK_PKGS_VERSION        2.17.100.3
 ENV SGX_DCAP_PKGS_VERSION       1.14.100.3
 ENV SGX_SDK_VERSION             ${SGX_SDK_PKGS_VERSION}-focal1
 ENV SGX_DCAP_VERSION            ${SGX_DCAP_PKGS_VERSION}-focal1
-ENV RUST_TOOLCHAIN              nightly-2022-02-23
+ENV RUST_TOOLCHAIN              nightly-2022-10-22
 ENV OS_NAME                     ubuntu
 ENV BINUTILS_DIST               ubuntu20.04
 ENV SGX_SDK_URL                 "https://download.01.org/intel-sgx/sgx-linux/${SGX_SDK_CODE_VERSION}/distro/${BINUTILS_DIST}-server/sgx_linux_x64_sdk_${SGX_SDK_BIN_VERSION}.bin"


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@teaclave.apache.org
For additional commands, e-mail: commits-help@teaclave.apache.org


[incubator-teaclave-sgx-sdk] 01/02: Fix backtrace access to illegal memory

Posted by rd...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

rduan pushed a commit to branch v2.0.0-preview
in repository https://gitbox.apache.org/repos/asf/incubator-teaclave-sgx-sdk.git

commit d2656c6f1075f494a9053170ec65731cf7a16359
Author: volcano <vo...@163.com>
AuthorDate: Mon Mar 27 10:19:18 2023 +0800

    Fix backtrace access to illegal memory
---
 sgx_backtrace/sgx_backtrace_sys/libbacktrace/elf.c | 30 ++++++++++------------
 sgx_unwind/libunwind/src/x86_64/Ginit.c            | 10 ++++----
 2 files changed, 19 insertions(+), 21 deletions(-)

diff --git a/sgx_backtrace/sgx_backtrace_sys/libbacktrace/elf.c b/sgx_backtrace/sgx_backtrace_sys/libbacktrace/elf.c
index 7bf46b65..4b493ef2 100644
--- a/sgx_backtrace/sgx_backtrace_sys/libbacktrace/elf.c
+++ b/sgx_backtrace/sgx_backtrace_sys/libbacktrace/elf.c
@@ -3000,22 +3000,20 @@ elf_add (struct backtrace_state *state, const char *filename, int descriptor,
         debug_view_valid = 0;
     }
 
-    if (!backtrace_dwarf_add (state, base_address,
-                              sections[DEBUG_INFO].data,
-                              sections[DEBUG_INFO].size,
-                              sections[DEBUG_LINE].data,
-                              sections[DEBUG_LINE].size,
-                              sections[DEBUG_ABBREV].data,
-                              sections[DEBUG_ABBREV].size,
-                              sections[DEBUG_RANGES].data,
-                              sections[DEBUG_RANGES].size,
-                              sections[DEBUG_STR].data,
-                              sections[DEBUG_STR].size,
-                              ehdr.e_ident[EI_DATA] == ELFDATA2MSB,
-                              error_callback, data, fileline_fn))
-        goto fail;
-
-    *found_dwarf = 1;
+    if (backtrace_dwarf_add (state, base_address,
+                             sections[DEBUG_INFO].data,
+                             sections[DEBUG_INFO].size,
+                             sections[DEBUG_LINE].data,
+                             sections[DEBUG_LINE].size,
+                             sections[DEBUG_ABBREV].data,
+                             sections[DEBUG_ABBREV].size,
+                             sections[DEBUG_RANGES].data,
+                             sections[DEBUG_RANGES].size,
+                             sections[DEBUG_STR].data,
+                             sections[DEBUG_STR].size,
+                             ehdr.e_ident[EI_DATA] == ELFDATA2MSB,
+                             error_callback, data, fileline_fn))
+        *found_dwarf = 1;
 
     return 1;
 
diff --git a/sgx_unwind/libunwind/src/x86_64/Ginit.c b/sgx_unwind/libunwind/src/x86_64/Ginit.c
index cf65579c..7bbd1db2 100644
--- a/sgx_unwind/libunwind/src/x86_64/Ginit.c
+++ b/sgx_unwind/libunwind/src/x86_64/Ginit.c
@@ -134,11 +134,11 @@ write_validate (void *addr)
 static int (*mem_validate_func) (void *addr, size_t len);
 static int msync_validate (void *addr, size_t len)
 {
-  // #ifdef HAVE_SGX
-  // extern int sgx_is_within_enclave(const void *addr, size_t size);
-  // if(!sgx_is_within_enclave(addr, len))
-  //   abort();
-  // #endif
+#ifdef HAVE_SGX
+  extern int sgx_is_within_enclave(const void *addr, size_t size);
+  if(!sgx_is_within_enclave(addr, len))
+    abort();
+#endif
 
   if (msync (addr, len, MS_ASYNC) != 0)
     {


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@teaclave.apache.org
For additional commands, e-mail: commits-help@teaclave.apache.org