From 5cc0ae0c9e757b8f232db1abc2b89931d01493fb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Kowalczyk?= Date: Wed, 25 Mar 2020 01:32:23 +0100 Subject: [PATCH] Clean up newly migrated apps and LTP --- .ci/prfilter | 34 +++++------ .ci/run-pylint | 6 +- .ci/run-shellcheck | 6 +- .gitmodules | 6 +- CONTRIBUTING.rst | 2 +- .../oldwiki/Introduction-to-Graphene-SGX.rst | 8 +-- Documentation/quickstart.rst | 8 +-- Documentation/sample-apps.rst | 41 ++++++------- Examples/README.md | 23 +------- Examples/apache/Makefile | 2 +- Examples/bash/Makefile | 2 +- Examples/blender/Makefile | 2 +- Examples/busybox/Makefile | 2 +- Examples/busybox/README.md | 2 +- Examples/capnproto/Makefile | 2 +- Examples/curl/Makefile | 2 +- Examples/gcc/Makefile | 2 +- Examples/lighttpd/Makefile | 2 +- Examples/lmbench/Makefile | 2 +- Examples/memcached/Makefile | 2 +- Examples/nginx/Makefile | 2 +- Examples/nodejs-express-server/Makefile | 2 +- Examples/nodejs/Makefile | 2 +- Examples/openvino/Makefile | 2 +- Examples/python-scipy-insecure/Makefile | 2 +- Examples/python-simple/Makefile | 2 +- Examples/pytorch/Makefile | 2 +- Examples/r/Makefile | 2 +- Examples/redis/Makefile | 2 +- Examples/tensorflow/Makefile | 2 +- Jenkinsfiles/Linux | 58 +++++++++---------- Jenkinsfiles/Linux-18.04 | 58 +++++++++---------- Jenkinsfiles/Linux-Debug | 58 +++++++++---------- Jenkinsfiles/Linux-Debug-18.04 | 58 +++++++++---------- Jenkinsfiles/Linux-SGX | 14 ++--- Jenkinsfiles/Linux-SGX-18.04 | 14 ++--- Jenkinsfiles/Linux-SGX-18.04-apps | 48 +++++++-------- Jenkinsfiles/Linux-SGX-apps | 48 +++++++-------- LICENSE.addendum.txt | 6 -- LibOS/shim/Makefile | 2 +- LibOS/shim/test/ltp/.gitignore | 1 + LibOS/shim/test/ltp/Makefile | 2 +- LibOS/shim/test/ltp/Makefile.Test | 6 +- LibOS/shim/test/ltp/src | 1 + README.rst | 2 +- 45 files changed, 261 insertions(+), 291 deletions(-) create mode 160000 LibOS/shim/test/ltp/src diff --git a/.ci/prfilter b/.ci/prfilter index bb1970af..acdf5729 100755 --- a/.ci/prfilter +++ b/.ci/prfilter @@ -16,20 +16,20 @@ THE_BIG_LIST_OF_NAUGHTY_FILES = list(map(pathlib.Path, [ # for pylint 'Documentation/conf.py', - 'LibOS/shim/test/apps/ltp/contrib/conf_lint.py', - 'LibOS/shim/test/apps/ltp/contrib/conf_merge.py', - 'LibOS/shim/test/apps/ltp/contrib/conf_missing.py', - 'LibOS/shim/test/apps/ltp/contrib/conf_remove_must_pass.py', - 'LibOS/shim/test/apps/ltp/contrib/has_own_main.py', - 'LibOS/shim/test/apps/ltp/contrib/report.py', - 'LibOS/shim/test/apps/ltp/runltp_xml.py', - 'LibOS/shim/test/apps/python-scipy-insecure/scripts/test-numpy.py', - 'LibOS/shim/test/apps/python-scipy-insecure/scripts/test-scipy.py', - 'LibOS/shim/test/apps/python-simple/scripts/benchrun.py', - 'LibOS/shim/test/apps/python-simple/scripts/dummy-web-server.py', - 'LibOS/shim/test/apps/python-simple/scripts/fibonacci.py', - 'LibOS/shim/test/apps/python-simple/scripts/helloworld.py', - 'LibOS/shim/test/apps/python-simple/scripts/test-http.py', + 'LibOS/shim/test/ltp/contrib/conf_lint.py', + 'LibOS/shim/test/ltp/contrib/conf_merge.py', + 'LibOS/shim/test/ltp/contrib/conf_missing.py', + 'LibOS/shim/test/ltp/contrib/conf_remove_must_pass.py', + 'LibOS/shim/test/ltp/contrib/has_own_main.py', + 'LibOS/shim/test/ltp/contrib/report.py', + 'LibOS/shim/test/ltp/runltp_xml.py', + 'Examples/python-scipy-insecure/scripts/test-numpy.py', + 'Examples/python-scipy-insecure/scripts/test-scipy.py', + 'Examples/python-simple/scripts/benchrun.py', + 'Examples/python-simple/scripts/dummy-web-server.py', + 'Examples/python-simple/scripts/fibonacci.py', + 'Examples/python-simple/scripts/helloworld.py', + 'Examples/python-simple/scripts/test-http.py', 'LibOS/shim/test/fs/test_fs.py', 'LibOS/shim/test/regression/test_libos.py', 'Pal/regression/test_pal.py', @@ -39,9 +39,9 @@ THE_BIG_LIST_OF_NAUGHTY_FILES = list(map(pathlib.Path, [ 'Tools', # for shellcheck - 'LibOS/shim/test/apps/bash/scripts/bash_test.sh', - 'LibOS/shim/test/apps/common_tools/benchmark-http.sh', - 'LibOS/shim/test/apps/python-simple/run-tests.sh', + 'Examples/bash/scripts/bash_test.sh', + 'Examples/common_tools/benchmark-http.sh', + 'Examples/python-simple/run-tests.sh', 'LibOS/shim/test/native', 'Pal/src/host/Linux-SGX/debugger/gdb', 'Scripts/list-all-graphene.sh', diff --git a/.ci/run-pylint b/.ci/run-pylint index 024ec96a..2f7f2ac0 100755 --- a/.ci/run-pylint +++ b/.ci/run-pylint @@ -14,9 +14,9 @@ find . -name \*.py \ -and -not -path ./Pal/lib/crypto/mbedtls/\* \ -and -not -path ./LibOS/glibc-build/\* \ -and -not -path ./LibOS/glibc-\?.\?\?/\* \ - -and -not -path ./LibOS/shim/test/apps/ltp/opt/\* \ - -and -not -path ./LibOS/shim/test/apps/ltp/src/\* \ - -and -not -path ./LibOS/shim/test/apps/pytorch/\* \ + -and -not -path ./LibOS/shim/test/ltp/opt/\* \ + -and -not -path ./LibOS/shim/test/ltp/src/\* \ + -and -not -path ./Examples/pytorch/\* \ | sed 's/./\\&/g' \ | xargs "${PYLINT}" "$@" \ Pal/src/host/Linux-SGX/signer/pal-sgx-get-token \ diff --git a/.ci/run-shellcheck b/.ci/run-shellcheck index be0d76d8..82d4dbb6 100755 --- a/.ci/run-shellcheck +++ b/.ci/run-shellcheck @@ -5,9 +5,9 @@ set -e cd "$(git rev-parse --show-toplevel)" shellcheck "$@" \ - LibOS/shim/test/apps/bash/scripts/bash_test.sh \ - LibOS/shim/test/apps/common_tools/benchmark-http.sh \ - LibOS/shim/test/apps/python-simple/run-tests.sh \ + Examples/bash/scripts/bash_test.sh \ + Examples/common_tools/benchmark-http.sh \ + Examples/python-simple/run-tests.sh \ LibOS/shim/test/native/*.sh \ Pal/src/host/Linux-SGX/debugger/gdb \ Runtime/pal_loader \ diff --git a/.gitmodules b/.gitmodules index 1b0190ac..6a395bee 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,6 +1,6 @@ [submodule "Pal/src/host/Linux-SGX/sgx-driver"] path = Pal/src/host/Linux-SGX/sgx-driver url = https://github.com/oscarlab/graphene-sgx-driver.git -[submodule "LibOS/shim/test/apps"] - path = LibOS/shim/test/apps - url = https://github.com/oscarlab/graphene-tests.git +[submodule "LibOS/shim/test/ltp/src"] + path = LibOS/shim/test/ltp/src + url = https://github.com/linux-test-project/ltp.git diff --git a/CONTRIBUTING.rst b/CONTRIBUTING.rst index d637a303..a2a8e7c6 100644 --- a/CONTRIBUTING.rst +++ b/CONTRIBUTING.rst @@ -181,7 +181,7 @@ currently only supported on the Linux host. To run these tests:: - cd LibOS/shim/test/apps/ltp + cd LibOS/shim/test/ltp make make ltp.xml # or diff --git a/Documentation/oldwiki/Introduction-to-Graphene-SGX.rst b/Documentation/oldwiki/Introduction-to-Graphene-SGX.rst index e86f009c..76f92bd0 100644 --- a/Documentation/oldwiki/Introduction-to-Graphene-SGX.rst +++ b/Documentation/oldwiki/Introduction-to-Graphene-SGX.rst @@ -81,7 +81,7 @@ Please note that all supporting binaries must be shipped and placed at the same developer's machine. For security reasons, Graphene will not allow loading any binaries that are not signed/hashed. -For applications that are prepared in the Graphene apps directory, such as GCC, Apache, and Bash +For applications that are prepared in the Graphene Examples directory, such as GCC, Apache, and Bash (more are listed in [Run Applications in Graphene](Run-Applications-in-Graphene.md)), just type 'make SGX=1' in the corresponding directory. The scripts are automated to build the applications and sign their manifests in order to ship them to the untrusted host. @@ -110,9 +110,9 @@ information), one can acquire an enclave token to launch Graphene with the appli token tool `Pal/src/host/Linux-SGX/signer/pal-sgx-get-token` to connect to the aesmd service and retrieve the token. -For applications that are prepared in the Graphene apps directory (GCC, Apache, Bash, etc.), type -`make SGX=1 sgx-tokens` in the corresponding directory. The scripts are automated to retrieve the -tokens for the applications. +For applications that are prepared in the Graphene Examples directory (GCC, Apache, Bash, etc.), +type `make SGX=1 sgx-tokens` in the corresponding directory. The scripts are automated to retrieve +the tokens for the applications. With the manifest (`.manifest.sgx`), the signature (`.sig`), and the token (`.token`) ready, one can launch Graphene-SGX to run the application. Graphene-SGX provides three options for specifying diff --git a/Documentation/quickstart.rst b/Documentation/quickstart.rst index b6ba0421..d42612e5 100644 --- a/Documentation/quickstart.rst +++ b/Documentation/quickstart.rst @@ -21,9 +21,7 @@ Quick Start 4. Test LMBench Application:: - cd .. - git submodule update --init apps - cd apps/lmbench + cd ../../../../Examples/lmbench make cd lmbench-2.5/bin/linux ./pal_loader lat_syscall null @@ -90,9 +88,7 @@ the process status of :command:`aesm_service`. 8. Test LMBench Application:: - cd $GRAPHENE_DIR - git submodule update --init -- LibOS/shim/test/apps - cd $GRAPHENE_DIR/LibOS/shim/test/apps/lmbench + cd $GRAPHENE_DIR/Examples/lmbench make SGX=1 cd lmbench-2.5/bin/linux SGX=1 ./pal_loader lat_syscall null diff --git a/Documentation/sample-apps.rst b/Documentation/sample-apps.rst index ba51ba74..19cc66a1 100644 --- a/Documentation/sample-apps.rst +++ b/Documentation/sample-apps.rst @@ -13,11 +13,11 @@ LMBench ------- The LMBench source and scripts are stored in the directory -:file:`LibOS/shim/test/apps/lmbench`. Many convenient commands are written in -the Makefile inside the directory. The following steps compile and run LMBench -in a |~| native environment and under Graphene:: +:file:`Examples/lmbench`. Many convenient commands are written in the Makefile +inside the directory. The following steps compile and run LMBench in a |~| +native environment and under Graphene:: - cd LibOS/shim/test/apps/lmbench + cd Examples/lmbench make # compile lmbench and set up manifests as target of Graphene tests make test-native # run the whole package in native environment make test-graphene # run the whole package in Graphene @@ -33,7 +33,7 @@ The file with the largest number as suffix will be the latest output. For debugging purposes, you may want to test each LMBench test individually. To do that, run the following commands:: - cd LibOS/shim/test/apps/lmbench + cd Examples/lmbench cd lmbench-2.5/bin/linux/ ./lat_syscall null # run the specific test, for example, lat_syscall ./pal lat_syscall null # run lat_syscall in Graphene @@ -55,7 +55,7 @@ Python To run Python, first prepare the manifest:: - cd LibOS/shim/test/apps/python + cd Examples/python-simple make # or under SGX @@ -79,7 +79,7 @@ R To run R, first prepare the manifest:: - cd LibOS/shim/test/apps/r + cd Examples/r make # or under SGX: @@ -99,7 +99,7 @@ GCC We prepared several C/C++ source files to test the performance of file I/O. The scripts and the tested source files can be found in -:file:`LibOS/shim/test/apps/gcc/test_files`. The source files include: +:file:`Examples/gcc/test_files`. The source files include: * :file:`helloworld.c`: an extremely small source file * :file:`gzip.c`: a |~| larger real-world application @@ -110,7 +110,7 @@ scripts and the tested source files can be found in To test compilation of these source files, first prepare the GCC manifest to compile the program:: - cd LibOS/shim/test/apps/gcc + cd Examples/gcc make To test GCC, run :command:`gcc.manifest` as an executable. The manifest file is @@ -130,10 +130,9 @@ Lighttpd Lighttpd can be used to test the TCP latency and throughput of Graphene and/or Graphene-SGX, in either single-threaded or multi-threaded environment. The scripts and the source code for Lighttpd can be found in -:file:`LibOS/shim/test/apps/lighttpd`. To build Lighttpd, run the following -command:: +:file:`Examples/lighttpd`. To build Lighttpd, run the following commands:: - cd LibOS/shim/test/apps/lighttpd + cd Examples/lighttpd make # or under SGX: make SGX=1 @@ -183,10 +182,9 @@ Apache Apache is a |~| commercial-class web server that can be used to test the TCP latency and throughput of Graphene. The scripts and the source code can be found -in :file:`LibOS/shim/test/apps/apache`. To build Apache, run the following -command:: +in :file:`Examples/apache`. To build Apache, run the following command:: - cd LibOS/shim/test/apps/apache + cd Examples/apache make # or under SGX: make SGX=1 @@ -218,11 +216,10 @@ Busybox ------- Busybox is a standalone shell including general-purpose system utilities. The -scripts and the source code for Busybox is stored in -:file:`LibOS/shim/apps/busybox`. To build the source code with the proper -manifest, run the following commands:: +scripts and the source code for Busybox is stored in :file:`Examples/busybox`. +To build the source code with the proper manifest, run the following commands:: - cd LibOS/shim/test/apps/busybox + cd Examples/busybox make # or under SGX: make SGX=1 @@ -242,10 +239,10 @@ Bash ---- Bash is the most commonly used shell utility in Linux. The scripts and the -source code for Bash are stored in :file:`LibOS/shim/apps/bash`. To build the -source code with the proper manifest, simply run the following commands:: +source code for Bash are stored in :file:`Examples/bash`. To build the source +code with the proper manifest, simply run the following commands:: - cd LibOS/shim/test/apps/bash + cd Examples/bash make # or under SGX: make SGX=1 diff --git a/Examples/README.md b/Examples/README.md index 7b50e9ae..f640149f 100644 --- a/Examples/README.md +++ b/Examples/README.md @@ -1,18 +1,12 @@ -# Graphene Applications +# Example Integrations -This repository contains application samples for -[Graphene Library OS](https://github.com/oscarlab/graphene). -For how to build and run the Graphene Library OS, -please see the README in the Graphene repository. +This folder contains application integration examples. For instructions how to build and run each application under Graphene, please see the README or README.md in each subdirectory. ## How to Contribute? -If you are interested in submitting an application sample for Graphene, -please submit a pull request to this GitHub repository. - Please put your application sample in a subdirectory with a comprehensible name. Ideally, the subdirectory name should be the same as your application. In addition, your application sample should @@ -51,16 +45,3 @@ application samples. If an application requires downloading the source code or binaries, please provide instructions in the `README.md`, or download them automatically and verify the checksums as part of the build process. - -## Contact - -For any questions or bug reports, please send an email to - or report an issue in the following -GitHub repositories: - -- Graphene issues: -- Application sample issues (manifest, configuration, scripts): - - -Our mailing list is publicly archived -[here](https://groups.google.com/forum/#!forum/graphene-support). diff --git a/Examples/apache/Makefile b/Examples/apache/Makefile index 91b68ce9..6bd1b5ac 100644 --- a/Examples/apache/Makefile +++ b/Examples/apache/Makefile @@ -28,7 +28,7 @@ LISTEN_HOST ?= 127.0.0.1 LISTEN_PORT ?= 8001 # Relative path to Graphene root -GRAPHENEDIR ?= $(THIS_DIR)../../../../.. +GRAPHENEDIR ?= $(THIS_DIR)../.. ifeq ($(DEBUG),1) GRAPHENEDEBUG = inline diff --git a/Examples/bash/Makefile b/Examples/bash/Makefile index 6cff05dc..6c4c5a0b 100644 --- a/Examples/bash/Makefile +++ b/Examples/bash/Makefile @@ -11,7 +11,7 @@ PROGRAMS = ls cat rm cp date # Relative path to Graphene root and key for enclave signing -GRAPHENEDIR ?= ../../../../.. +GRAPHENEDIR ?= ../.. GRAPHENEKEY ?= $(GRAPHENEDIR)/Pal/src/host/Linux-SGX/signer/enclave-key.pem ifeq ($(DEBUG),1) diff --git a/Examples/blender/Makefile b/Examples/blender/Makefile index 495ca8d9..dc143bcc 100644 --- a/Examples/blender/Makefile +++ b/Examples/blender/Makefile @@ -1,7 +1,7 @@ # assumes this makefile lies in cwd PWD := $(shell pwd) -GRAPHENE_DIR = $(PWD)/../../../../.. +GRAPHENE_DIR = $(PWD)/../.. BLENDER_DIR = $(PWD)/blender_dir BLENDER_URL ?= https://ftp.nluug.nl/pub/graphics/blender/release/Blender2.82/blender-2.82-linux64.tar.xz diff --git a/Examples/busybox/Makefile b/Examples/busybox/Makefile index 39380a7b..79de515c 100644 --- a/Examples/busybox/Makefile +++ b/Examples/busybox/Makefile @@ -13,7 +13,7 @@ ################################# CONSTANTS ################################### # Relative path to Graphene root -GRAPHENEDIR = ../../../../.. +GRAPHENEDIR = ../.. SRCDIR = src BUSYBOX_URL ?= https://busybox.net/downloads/busybox-1.31.1.tar.bz2 diff --git a/Examples/busybox/README.md b/Examples/busybox/README.md index 1d91f617..4529b2f8 100644 --- a/Examples/busybox/README.md +++ b/Examples/busybox/README.md @@ -30,4 +30,4 @@ ls ``` Note that busybox can be started via manifest file (which contains path to -the busybox binary). More about this can be read [here](https://github.com/oscarlab/graphene/wiki#run-an-application-in-the-graphene-library-os). +the busybox binary). More about this can be read [here](https://graphene.readthedocs.io/en/latest/sample-apps.html#busybox). diff --git a/Examples/capnproto/Makefile b/Examples/capnproto/Makefile index eef5a951..9281f45a 100644 --- a/Examples/capnproto/Makefile +++ b/Examples/capnproto/Makefile @@ -12,7 +12,7 @@ # additionally remove the Addressbook sources. # Relative path to Graphene root and key for enclave signing -GRAPHENEDIR ?= ../../../../.. +GRAPHENEDIR ?= ../.. GRAPHENEKEY ?= $(GRAPHENEDIR)/Pal/src/host/Linux-SGX/signer/enclave-key.pem SRCDIR = src diff --git a/Examples/curl/Makefile b/Examples/curl/Makefile index b1fc3a66..e254ff53 100644 --- a/Examples/curl/Makefile +++ b/Examples/curl/Makefile @@ -11,7 +11,7 @@ THIS_DIR := $(dir $(lastword $(MAKEFILE_LIST))) CURL_DIR ?= /usr/bin/ # Relative path to Graphene root and key for enclave signing -GRAPHENEDIR ?= ../../../../.. +GRAPHENEDIR ?= ../.. GRAPHENEKEY ?= $(GRAPHENEDIR)/Pal/src/host/Linux-SGX/signer/enclave-key.pem ifeq ($(DEBUG),1) diff --git a/Examples/gcc/Makefile b/Examples/gcc/Makefile index d875d66d..7ba286cd 100644 --- a/Examples/gcc/Makefile +++ b/Examples/gcc/Makefile @@ -1,7 +1,7 @@ THIS_DIR := $(dir $(lastword $(MAKEFILE_LIST))) # Relative path to Graphene root -GRAPHENEDIR ?= $(THIS_DIR)../../../../.. +GRAPHENEDIR ?= $(THIS_DIR)../.. ifeq ($(DEBUG),1) GRAPHENEDEBUG = inline diff --git a/Examples/lighttpd/Makefile b/Examples/lighttpd/Makefile index 2df2e992..901ad1f5 100644 --- a/Examples/lighttpd/Makefile +++ b/Examples/lighttpd/Makefile @@ -13,7 +13,7 @@ HOST ?= 127.0.0.1 PORT ?= 8003 # Relative path to Graphene root -GRAPHENEDIR ?= $(THIS_DIR)../../../../.. +GRAPHENEDIR ?= $(THIS_DIR)../.. ifeq ($(DEBUG),1) GRAPHENEDEBUG = inline diff --git a/Examples/lmbench/Makefile b/Examples/lmbench/Makefile index 8cfe079c..aa2d25fa 100644 --- a/Examples/lmbench/Makefile +++ b/Examples/lmbench/Makefile @@ -17,7 +17,7 @@ INSTALLDIR = $(LMBENCHDIR)/bin/linux LMBENCHCONFIG = $(INSTALLDIR)$(shell $(LMBENCHDIR)/scripts/config) # Relative path to Graphene root -GRAPHENEDIR ?= ../../../../.. +GRAPHENEDIR ?= ../.. # If GRAPHENEDIR is a relative path, extend the path from where LMBench is installed ifeq ($(patsubst /%,,$(GRAPHENEDIR)),) diff --git a/Examples/memcached/Makefile b/Examples/memcached/Makefile index 01701c52..44e80fce 100644 --- a/Examples/memcached/Makefile +++ b/Examples/memcached/Makefile @@ -13,7 +13,7 @@ ################################# CONSTANTS ################################### # Relative path to Graphene root -GRAPHENEDIR = ../../../../.. +GRAPHENEDIR = ../.. SRCDIR = src MEMCACHED_URL ?= https://memcached.org/files/memcached-1.5.21.tar.gz diff --git a/Examples/nginx/Makefile b/Examples/nginx/Makefile index 0836a3a9..88157191 100644 --- a/Examples/nginx/Makefile +++ b/Examples/nginx/Makefile @@ -25,7 +25,7 @@ LISTEN_HOST ?= 127.0.0.1 LISTEN_PORT ?= 8002 # Relative path to Graphene root -GRAPHENEDIR ?= $(THIS_DIR)../../../../.. +GRAPHENEDIR ?= $(THIS_DIR)../.. ifeq ($(DEBUG),1) GRAPHENEDEBUG = inline diff --git a/Examples/nodejs-express-server/Makefile b/Examples/nodejs-express-server/Makefile index 6cd6cfbc..c94368ba 100644 --- a/Examples/nodejs-express-server/Makefile +++ b/Examples/nodejs-express-server/Makefile @@ -11,7 +11,7 @@ THIS_DIR := $(dir $(lastword $(MAKEFILE_LIST))) NODEJS_DIR ?= /usr/bin/ # Relative path to Graphene root and key for enclave signing -GRAPHENEDIR ?= ../../../../.. +GRAPHENEDIR ?= ../.. GRAPHENEKEY ?= $(GRAPHENEDIR)/Pal/src/host/Linux-SGX/signer/enclave-key.pem ifeq ($(DEBUG),1) diff --git a/Examples/nodejs/Makefile b/Examples/nodejs/Makefile index a937aebd..9f50d514 100644 --- a/Examples/nodejs/Makefile +++ b/Examples/nodejs/Makefile @@ -11,7 +11,7 @@ THIS_DIR := $(dir $(lastword $(MAKEFILE_LIST))) NODEJS_DIR ?= /usr/bin/ # Relative path to Graphene root and key for enclave signing -GRAPHENEDIR ?= ../../../../.. +GRAPHENEDIR ?= ../.. GRAPHENEKEY ?= $(GRAPHENEDIR)/Pal/src/host/Linux-SGX/signer/enclave-key.pem ifeq ($(DEBUG),1) diff --git a/Examples/openvino/Makefile b/Examples/openvino/Makefile index 2a6f6a85..52c0590a 100644 --- a/Examples/openvino/Makefile +++ b/Examples/openvino/Makefile @@ -19,7 +19,7 @@ OPENVINO_DIR ?= $(THIS_DIR)openvino OPENVINO_COMMIT ?= ba6e22b1b5ee4cbefcc30e8d9493cddb0bb3dfdf # corresponds to tag "2019_R2" # Relative path to Graphene root and key for enclave signing -GRAPHENE_DIR ?= ../../../../.. +GRAPHENE_DIR ?= ../.. GRAPHENE_KEY ?= $(GRAPHENE_DIR)/Pal/src/host/Linux-SGX/signer/enclave-key.pem ifeq ($(DEBUG),1) diff --git a/Examples/python-scipy-insecure/Makefile b/Examples/python-scipy-insecure/Makefile index c1c52f1e..16a473de 100644 --- a/Examples/python-scipy-insecure/Makefile +++ b/Examples/python-scipy-insecure/Makefile @@ -19,7 +19,7 @@ PYTHONDISTHOME = $(PYTHONPATH)/lib/python3/dist-packages PYTHONSHORTVERSION = $(subst python,,$(subst .,,$(PYTHONVERSION))) # Relative path to Graphene root -GRAPHENEDIR ?= ../../../../.. +GRAPHENEDIR ?= ../.. ifeq ($(DEBUG),1) GRAPHENEDEBUG = inline diff --git a/Examples/python-simple/Makefile b/Examples/python-simple/Makefile index 78c64bbf..1f09dcdb 100644 --- a/Examples/python-simple/Makefile +++ b/Examples/python-simple/Makefile @@ -19,7 +19,7 @@ PYTHONDISTHOME := $(PYTHONPATH)/lib/python3/dist-packages PYTHONSHORTVERSION := $(subst python,,$(subst .,,$(PYTHONVERSION))) # Relative path to Graphene root -GRAPHENEDIR ?= ../../../../.. +GRAPHENEDIR ?= ../.. ifeq ($(DEBUG),1) GRAPHENEDEBUG = inline diff --git a/Examples/pytorch/Makefile b/Examples/pytorch/Makefile index 1c5c057a..a0a96b4f 100644 --- a/Examples/pytorch/Makefile +++ b/Examples/pytorch/Makefile @@ -9,7 +9,7 @@ # # Use `make clean` to remove Graphene-generated files. -GRAPHENEDIR ?= ../../../../.. +GRAPHENEDIR ?= ../.. ifeq ($(DEBUG),1) GRAPHENEDEBUG = inline diff --git a/Examples/r/Makefile b/Examples/r/Makefile index 080f8d55..d39ea736 100644 --- a/Examples/r/Makefile +++ b/Examples/r/Makefile @@ -14,7 +14,7 @@ R_HOME ?= /usr/lib/R R_EXEC = $(R_HOME)/bin/exec/R # Relative path to Graphene root -GRAPHENEDIR ?= ../../../../.. +GRAPHENEDIR ?= ../.. ifeq ($(DEBUG),1) GRAPHENEDEBUG = inline diff --git a/Examples/redis/Makefile b/Examples/redis/Makefile index 575daca9..35b8e177 100644 --- a/Examples/redis/Makefile +++ b/Examples/redis/Makefile @@ -17,7 +17,7 @@ ################################# CONSTANTS ################################### # Relative path to Graphene root -GRAPHENEDIR = ../../../../.. +GRAPHENEDIR = ../.. SRCDIR = src COMMIT = 5.0.5 diff --git a/Examples/tensorflow/Makefile b/Examples/tensorflow/Makefile index 57b57ee1..bb13e9ff 100644 --- a/Examples/tensorflow/Makefile +++ b/Examples/tensorflow/Makefile @@ -2,7 +2,7 @@ manifests = $(addsuffix .manifest,label_image) exec_target = $(manifests) target = label_image -GRAPHENEDIR ?= ../../../../.. +GRAPHENEDIR ?= ../.. TF_DIR ?= tensorflow BAZEL_BIN ?= $(HOME)/bin/bazel diff --git a/Jenkinsfiles/Linux b/Jenkinsfiles/Linux index 8ed7d7f9..e98cf4bc 100644 --- a/Jenkinsfiles/Linux +++ b/Jenkinsfiles/Linux @@ -40,49 +40,49 @@ pipeline { make test ''' sh ''' - cd LibOS/shim/test/apps/ltp + cd LibOS/shim/test/ltp make make ltp.xml ''' timeout(time: 5, unit: 'MINUTES') { sh ''' - cd LibOS/shim/test/apps/python-simple + cd Examples/python-simple make check ''' } timeout(time: 5, unit: 'MINUTES') { sh ''' - cd LibOS/shim/test/apps/python-scipy-insecure + cd Examples/python-scipy-insecure make check ''' } timeout(time: 5, unit: 'MINUTES') { sh ''' - cd LibOS/shim/test/apps/bash + cd Examples/bash make regression ''' } timeout(time: 5, unit: 'MINUTES') { sh ''' - cd LibOS/shim/test/apps/curl + cd Examples/curl make check ''' } timeout(time: 5, unit: 'MINUTES') { sh ''' - cd LibOS/shim/test/apps/gcc + cd Examples/gcc make check ''' } timeout(time: 15, unit: 'MINUTES') { sh ''' - cd LibOS/shim/test/apps/lmbench + cd Examples/lmbench make test N_RUNS=1 ENOUGH=100 ''' } timeout(time: 10, unit: 'MINUTES') { sh ''' - cd LibOS/shim/test/apps/redis + cd Examples/redis make USE_SELECT=1 make start-graphene-server & sleep 1 @@ -91,7 +91,7 @@ pipeline { } timeout(time: 10, unit: 'MINUTES') { sh ''' - cd LibOS/shim/test/apps/lighttpd + cd Examples/lighttpd make make start-graphene-server & sleep 1 @@ -100,7 +100,7 @@ pipeline { } timeout(time: 10, unit: 'MINUTES') { sh ''' - cd LibOS/shim/test/apps/nginx + cd Examples/nginx make make start-graphene-server & sleep 1 @@ -109,7 +109,7 @@ pipeline { } timeout(time: 20, unit: 'MINUTES') { sh ''' - cd LibOS/shim/test/apps/apache + cd Examples/apache make make start-graphene-server & sleep 1 @@ -119,13 +119,13 @@ pipeline { } timeout(time: 5, unit: 'MINUTES') { sh ''' - cd LibOS/shim/test/apps/blender + cd Examples/blender make check ''' } sh ''' # Workaround LTP bug (see https://github.com/linux-test-project/ltp/issues/560 for upstream fix): - git -C LibOS/shim/test/apps/ltp/src checkout -- utils/ffsb-6.0-rc2/config.h.in utils/ffsb-6.0-rc2/configure + git -C LibOS/shim/test/ltp/src checkout -- utils/ffsb-6.0-rc2/config.h.in utils/ffsb-6.0-rc2/configure ./Scripts/gitignore-test ''' @@ -137,22 +137,22 @@ pipeline { rm LibOS/glibc-2.23.tar.gz make -C LibOS/shim/test/regression clean - make -C LibOS/shim/test/apps/ltp clean + make -C LibOS/shim/test/ltp clean # LTP's make clean is broken, see https://github.com/linux-test-project/ltp/issues/559 - rm -rf /tmp/graphene.clean-check.clean/LibOS/shim/test/apps/ltp/src - rm -rf LibOS/shim/test/apps/ltp/src + rm -rf /tmp/graphene.clean-check.clean/LibOS/shim/test/ltp/src + rm -rf LibOS/shim/test/ltp/src - make -C LibOS/shim/test/apps/python-simple clean - make -C LibOS/shim/test/apps/python-scipy-insecure clean - make -C LibOS/shim/test/apps/bash clean - make -C LibOS/shim/test/apps/curl clean - make -C LibOS/shim/test/apps/gcc clean - make -C LibOS/shim/test/apps/lmbench distclean - make -C LibOS/shim/test/apps/redis distclean - make -C LibOS/shim/test/apps/lighttpd distclean - make -C LibOS/shim/test/apps/nginx distclean - make -C LibOS/shim/test/apps/apache distclean - make -C LibOS/shim/test/apps/blender distclean + make -C Examples/python-simple clean + make -C Examples/python-scipy-insecure clean + make -C Examples/bash clean + make -C Examples/curl clean + make -C Examples/gcc clean + make -C Examples/lmbench distclean + make -C Examples/redis distclean + make -C Examples/lighttpd distclean + make -C Examples/nginx distclean + make -C Examples/apache distclean + make -C Examples/blender distclean make -C Pal/src PAL_HOST=Skeleton clean ./Scripts/clean-check @@ -160,11 +160,11 @@ pipeline { } post { always { - archiveArtifacts 'LibOS/shim/test/apps/ltp/ltp.xml' + archiveArtifacts 'LibOS/shim/test/ltp/ltp.xml' junit 'Pal/regression/pal-regression.xml' junit 'LibOS/shim/test/regression/libos-regression.xml' - junit 'LibOS/shim/test/apps/ltp/ltp.xml' + junit 'LibOS/shim/test/ltp/ltp.xml' } } } diff --git a/Jenkinsfiles/Linux-18.04 b/Jenkinsfiles/Linux-18.04 index dda43a00..ffc604b8 100644 --- a/Jenkinsfiles/Linux-18.04 +++ b/Jenkinsfiles/Linux-18.04 @@ -42,49 +42,49 @@ pipeline { make test ''' sh ''' - cd LibOS/shim/test/apps/ltp + cd LibOS/shim/test/ltp make make ltp.xml ''' timeout(time: 5, unit: 'MINUTES') { sh ''' - cd LibOS/shim/test/apps/python-simple + cd Examples/python-simple PYTHONVERSION=python3.6 make check ''' } timeout(time: 5, unit: 'MINUTES') { sh ''' - cd LibOS/shim/test/apps/python-scipy-insecure + cd Examples/python-scipy-insecure PYTHONVERSION=python3.6 make check ''' } timeout(time: 5, unit: 'MINUTES') { sh ''' - cd LibOS/shim/test/apps/bash + cd Examples/bash make regression ''' } timeout(time: 5, unit: 'MINUTES') { sh ''' - cd LibOS/shim/test/apps/curl + cd Examples/curl make check ''' } timeout(time: 5, unit: 'MINUTES') { sh ''' - cd LibOS/shim/test/apps/gcc + cd Examples/gcc make check ''' } timeout(time: 15, unit: 'MINUTES') { sh ''' - cd LibOS/shim/test/apps/lmbench + cd Examples/lmbench make test N_RUNS=1 ENOUGH=100 ''' } timeout(time: 10, unit: 'MINUTES') { sh ''' - cd LibOS/shim/test/apps/redis + cd Examples/redis make make start-graphene-server & sleep 1 @@ -93,7 +93,7 @@ pipeline { } timeout(time: 10, unit: 'MINUTES') { sh ''' - cd LibOS/shim/test/apps/lighttpd + cd Examples/lighttpd make make start-graphene-server & sleep 1 @@ -102,7 +102,7 @@ pipeline { } timeout(time: 10, unit: 'MINUTES') { sh ''' - cd LibOS/shim/test/apps/nginx + cd Examples/nginx make make start-graphene-server & sleep 1 @@ -111,7 +111,7 @@ pipeline { } timeout(time: 20, unit: 'MINUTES') { sh ''' - cd LibOS/shim/test/apps/apache + cd Examples/apache make make start-graphene-server & sleep 1 @@ -121,13 +121,13 @@ pipeline { } timeout(time: 5, unit: 'MINUTES') { sh ''' - cd LibOS/shim/test/apps/blender + cd Examples/blender make check ''' } sh ''' # Workaround LTP bug (see https://github.com/linux-test-project/ltp/issues/560 for upstream fix): - git -C LibOS/shim/test/apps/ltp/src checkout -- utils/ffsb-6.0-rc2/config.h.in utils/ffsb-6.0-rc2/configure + git -C LibOS/shim/test/ltp/src checkout -- utils/ffsb-6.0-rc2/config.h.in utils/ffsb-6.0-rc2/configure ./Scripts/gitignore-test ''' @@ -139,33 +139,33 @@ pipeline { rm LibOS/glibc-2.27.tar.gz make -C LibOS/shim/test/regression clean - make -C LibOS/shim/test/apps/ltp clean + make -C LibOS/shim/test/ltp clean # LTP's make clean is broken, see https://github.com/linux-test-project/ltp/issues/559 - rm -rf /tmp/graphene-18.04.clean-check.clean/LibOS/shim/test/apps/ltp/src - rm -rf LibOS/shim/test/apps/ltp/src + rm -rf /tmp/graphene-18.04.clean-check.clean/LibOS/shim/test/ltp/src + rm -rf LibOS/shim/test/ltp/src - make -C LibOS/shim/test/apps/python-simple clean - make -C LibOS/shim/test/apps/python-scipy-insecure clean - make -C LibOS/shim/test/apps/bash clean - make -C LibOS/shim/test/apps/curl clean - make -C LibOS/shim/test/apps/gcc clean - make -C LibOS/shim/test/apps/lmbench distclean - make -C LibOS/shim/test/apps/redis distclean - make -C LibOS/shim/test/apps/lighttpd distclean - make -C LibOS/shim/test/apps/nginx distclean - make -C LibOS/shim/test/apps/apache distclean - make -C LibOS/shim/test/apps/blender distclean + make -C Examples/python-simple clean + make -C Examples/python-scipy-insecure clean + make -C Examples/bash clean + make -C Examples/curl clean + make -C Examples/gcc clean + make -C Examples/lmbench distclean + make -C Examples/redis distclean + make -C Examples/lighttpd distclean + make -C Examples/nginx distclean + make -C Examples/apache distclean + make -C Examples/blender distclean ./Scripts/clean-check ''' } post { always { - archiveArtifacts 'LibOS/shim/test/apps/ltp/ltp.xml' + archiveArtifacts 'LibOS/shim/test/ltp/ltp.xml' junit 'Pal/regression/pal-regression.xml' junit 'LibOS/shim/test/regression/libos-regression.xml' - junit 'LibOS/shim/test/apps/ltp/ltp.xml' + junit 'LibOS/shim/test/ltp/ltp.xml' } } } diff --git a/Jenkinsfiles/Linux-Debug b/Jenkinsfiles/Linux-Debug index e12f81f6..66c74238 100644 --- a/Jenkinsfiles/Linux-Debug +++ b/Jenkinsfiles/Linux-Debug @@ -39,49 +39,49 @@ pipeline { make test ''' sh ''' - cd LibOS/shim/test/apps/ltp + cd LibOS/shim/test/ltp make make ltp.xml ''' timeout(time: 5, unit: 'MINUTES') { sh ''' - cd LibOS/shim/test/apps/python-simple + cd Examples/python-simple make check ''' } timeout(time: 5, unit: 'MINUTES') { sh ''' - cd LibOS/shim/test/apps/python-scipy-insecure + cd Examples/python-scipy-insecure make check ''' } timeout(time: 5, unit: 'MINUTES') { sh ''' - cd LibOS/shim/test/apps/bash + cd Examples/bash make regression ''' } timeout(time: 5, unit: 'MINUTES') { sh ''' - cd LibOS/shim/test/apps/curl + cd Examples/curl make check ''' } timeout(time: 5, unit: 'MINUTES') { sh ''' - cd LibOS/shim/test/apps/gcc + cd Examples/gcc make check ''' } timeout(time: 20, unit: 'MINUTES') { sh ''' - cd LibOS/shim/test/apps/lmbench + cd Examples/lmbench make test N_RUNS=1 ENOUGH=100 ''' } timeout(time: 10, unit: 'MINUTES') { sh ''' - cd LibOS/shim/test/apps/redis + cd Examples/redis make USE_SELECT=1 make start-graphene-server & sleep 1 @@ -90,7 +90,7 @@ pipeline { } timeout(time: 10, unit: 'MINUTES') { sh ''' - cd LibOS/shim/test/apps/lighttpd + cd Examples/lighttpd make make start-graphene-server & sleep 1 @@ -99,7 +99,7 @@ pipeline { } timeout(time: 10, unit: 'MINUTES') { sh ''' - cd LibOS/shim/test/apps/nginx + cd Examples/nginx make make start-graphene-server & sleep 1 @@ -108,7 +108,7 @@ pipeline { } timeout(time: 20, unit: 'MINUTES') { sh ''' - cd LibOS/shim/test/apps/apache + cd Examples/apache make make start-graphene-server & sleep 1 @@ -118,13 +118,13 @@ pipeline { } timeout(time: 5, unit: 'MINUTES') { sh ''' - cd LibOS/shim/test/apps/blender + cd Examples/blender make check ''' } sh ''' # Workaround LTP bug (see https://github.com/linux-test-project/ltp/issues/560 for upstream fix): - git -C LibOS/shim/test/apps/ltp/src checkout -- utils/ffsb-6.0-rc2/config.h.in utils/ffsb-6.0-rc2/configure + git -C LibOS/shim/test/ltp/src checkout -- utils/ffsb-6.0-rc2/config.h.in utils/ffsb-6.0-rc2/configure ./Scripts/gitignore-test ''' @@ -134,22 +134,22 @@ pipeline { make GLIBC_VERSION=2.27 distclean make -C LibOS/shim/test/regression clean - make -C LibOS/shim/test/apps/ltp clean + make -C LibOS/shim/test/ltp clean # LTP's make clean is broken, see https://github.com/linux-test-project/ltp/issues/559 - rm -rf /tmp/graphene-debug.clean-check.clean/LibOS/shim/test/apps/ltp/src - rm -rf LibOS/shim/test/apps/ltp/src + rm -rf /tmp/graphene-debug.clean-check.clean/LibOS/shim/test/ltp/src + rm -rf LibOS/shim/test/ltp/src - make -C LibOS/shim/test/apps/python-simple clean - make -C LibOS/shim/test/apps/python-scipy-insecure clean - make -C LibOS/shim/test/apps/bash clean - make -C LibOS/shim/test/apps/curl clean - make -C LibOS/shim/test/apps/gcc clean - make -C LibOS/shim/test/apps/lmbench distclean - make -C LibOS/shim/test/apps/redis distclean - make -C LibOS/shim/test/apps/lighttpd distclean - make -C LibOS/shim/test/apps/nginx distclean - make -C LibOS/shim/test/apps/apache distclean - make -C LibOS/shim/test/apps/blender distclean + make -C Examples/python-simple clean + make -C Examples/python-scipy-insecure clean + make -C Examples/bash clean + make -C Examples/curl clean + make -C Examples/gcc clean + make -C Examples/lmbench distclean + make -C Examples/redis distclean + make -C Examples/lighttpd distclean + make -C Examples/nginx distclean + make -C Examples/apache distclean + make -C Examples/blender distclean make -C Pal/src PAL_HOST=Skeleton clean ./Scripts/clean-check @@ -157,11 +157,11 @@ pipeline { } post { always { - archiveArtifacts 'LibOS/shim/test/apps/ltp/ltp.xml' + archiveArtifacts 'LibOS/shim/test/ltp/ltp.xml' junit 'Pal/regression/pal-regression.xml' junit 'LibOS/shim/test/regression/libos-regression.xml' - junit 'LibOS/shim/test/apps/ltp/ltp.xml' + junit 'LibOS/shim/test/ltp/ltp.xml' } } } diff --git a/Jenkinsfiles/Linux-Debug-18.04 b/Jenkinsfiles/Linux-Debug-18.04 index 5c84f881..3810de1e 100644 --- a/Jenkinsfiles/Linux-Debug-18.04 +++ b/Jenkinsfiles/Linux-Debug-18.04 @@ -38,49 +38,49 @@ pipeline { make test ''' sh ''' - cd LibOS/shim/test/apps/ltp + cd LibOS/shim/test/ltp make make ltp.xml ''' timeout(time: 5, unit: 'MINUTES') { sh ''' - cd LibOS/shim/test/apps/python-simple + cd Examples/python-simple PYTHONVERSION=python3.6 make check ''' } timeout(time: 5, unit: 'MINUTES') { sh ''' - cd LibOS/shim/test/apps/python-scipy-insecure + cd Examples/python-scipy-insecure PYTHONVERSION=python3.6 make check ''' } timeout(time: 5, unit: 'MINUTES') { sh ''' - cd LibOS/shim/test/apps/bash + cd Examples/bash make regression ''' } timeout(time: 5, unit: 'MINUTES') { sh ''' - cd LibOS/shim/test/apps/curl + cd Examples/curl make check ''' } timeout(time: 5, unit: 'MINUTES') { sh ''' - cd LibOS/shim/test/apps/gcc + cd Examples/gcc make check ''' } timeout(time: 20, unit: 'MINUTES') { sh ''' - cd LibOS/shim/test/apps/lmbench + cd Examples/lmbench make test N_RUNS=1 ENOUGH=100 ''' } timeout(time: 10, unit: 'MINUTES') { sh ''' - cd LibOS/shim/test/apps/redis + cd Examples/redis make make start-graphene-server & sleep 1 @@ -89,7 +89,7 @@ pipeline { } timeout(time: 10, unit: 'MINUTES') { sh ''' - cd LibOS/shim/test/apps/lighttpd + cd Examples/lighttpd make make start-graphene-server & sleep 1 @@ -98,7 +98,7 @@ pipeline { } timeout(time: 10, unit: 'MINUTES') { sh ''' - cd LibOS/shim/test/apps/nginx + cd Examples/nginx make make start-graphene-server & sleep 1 @@ -107,7 +107,7 @@ pipeline { } timeout(time: 20, unit: 'MINUTES') { sh ''' - cd LibOS/shim/test/apps/apache + cd Examples/apache make make start-graphene-server & sleep 1 @@ -117,13 +117,13 @@ pipeline { } timeout(time: 5, unit: 'MINUTES') { sh ''' - cd LibOS/shim/test/apps/blender + cd Examples/blender make check ''' } sh ''' # Workaround LTP bug (see https://github.com/linux-test-project/ltp/issues/560 for upstream fix): - git -C LibOS/shim/test/apps/ltp/src checkout -- utils/ffsb-6.0-rc2/config.h.in utils/ffsb-6.0-rc2/configure + git -C LibOS/shim/test/ltp/src checkout -- utils/ffsb-6.0-rc2/config.h.in utils/ffsb-6.0-rc2/configure ./Scripts/gitignore-test ''' @@ -133,33 +133,33 @@ pipeline { make distclean make -C LibOS/shim/test/regression clean - make -C LibOS/shim/test/apps/ltp clean + make -C LibOS/shim/test/ltp clean # LTP's make clean is broken, see https://github.com/linux-test-project/ltp/issues/559 - rm -rf /tmp/graphene-debug-18.04.clean-check.clean/LibOS/shim/test/apps/ltp/src - rm -rf LibOS/shim/test/apps/ltp/src + rm -rf /tmp/graphene-debug-18.04.clean-check.clean/LibOS/shim/test/ltp/src + rm -rf LibOS/shim/test/ltp/src - make -C LibOS/shim/test/apps/python-simple clean - make -C LibOS/shim/test/apps/python-scipy-insecure clean - make -C LibOS/shim/test/apps/bash clean - make -C LibOS/shim/test/apps/curl clean - make -C LibOS/shim/test/apps/gcc clean - make -C LibOS/shim/test/apps/lmbench distclean - make -C LibOS/shim/test/apps/redis distclean - make -C LibOS/shim/test/apps/lighttpd distclean - make -C LibOS/shim/test/apps/nginx distclean - make -C LibOS/shim/test/apps/apache distclean - make -C LibOS/shim/test/apps/blender distclean + make -C Examples/python-simple clean + make -C Examples/python-scipy-insecure clean + make -C Examples/bash clean + make -C Examples/curl clean + make -C Examples/gcc clean + make -C Examples/lmbench distclean + make -C Examples/redis distclean + make -C Examples/lighttpd distclean + make -C Examples/nginx distclean + make -C Examples/apache distclean + make -C Examples/blender distclean ./Scripts/clean-check ''' } post { always { - archiveArtifacts 'LibOS/shim/test/apps/ltp/ltp.xml' + archiveArtifacts 'LibOS/shim/test/ltp/ltp.xml' junit 'Pal/regression/pal-regression.xml' junit 'LibOS/shim/test/regression/libos-regression.xml' - junit 'LibOS/shim/test/apps/ltp/ltp.xml' + junit 'LibOS/shim/test/ltp/ltp.xml' } } } diff --git a/Jenkinsfiles/Linux-SGX b/Jenkinsfiles/Linux-SGX index a0520988..a9fb79cb 100644 --- a/Jenkinsfiles/Linux-SGX +++ b/Jenkinsfiles/Linux-SGX @@ -74,14 +74,14 @@ pipeline { // LTP is ignored under SGX because of random segfaults sh ''' - cd LibOS/shim/test/apps/ltp + cd LibOS/shim/test/ltp make SGX=1 all sgx-tokens make SGX=1 ltp-sgx.xml || : ''' sh ''' # Workaround LTP bug (see https://github.com/linux-test-project/ltp/issues/560 for upstream fix): - git -C LibOS/shim/test/apps/ltp/src checkout -- utils/ffsb-6.0-rc2/config.h.in utils/ffsb-6.0-rc2/configure + git -C LibOS/shim/test/ltp/src checkout -- utils/ffsb-6.0-rc2/config.h.in utils/ffsb-6.0-rc2/configure ./Scripts/gitignore-test ''' @@ -92,23 +92,23 @@ pipeline { rm Pal/src/host/Linux-SGX/signer/enclave-key.pem make SGX=1 GLIBC_VERSION=2.27 distclean make -C LibOS/shim/test/regression SGX=1 clean - make -C LibOS/shim/test/apps/ltp clean + make -C LibOS/shim/test/ltp clean # LTP's make clean is broken, see https://github.com/linux-test-project/ltp/issues/559 - rm -rf /tmp/graphene-sgx.clean-check.clean/LibOS/shim/test/apps/ltp/src - rm -rf LibOS/shim/test/apps/ltp/src + rm -rf /tmp/graphene-sgx.clean-check.clean/LibOS/shim/test/ltp/src + rm -rf LibOS/shim/test/ltp/src ./Scripts/clean-check ''' } post { always { - archiveArtifacts 'LibOS/shim/test/apps/ltp/ltp-sgx.xml' + archiveArtifacts 'LibOS/shim/test/ltp/ltp-sgx.xml' junit 'Pal/regression/pal-regression.xml' junit 'LibOS/shim/test/regression/libos-regression.xml' // LTP is ignored under SGX because of random segfaults - //junit 'LibOS/shim/test/apps/ltp/ltp-sgx.xml' + //junit 'LibOS/shim/test/ltp/ltp-sgx.xml' } } } diff --git a/Jenkinsfiles/Linux-SGX-18.04 b/Jenkinsfiles/Linux-SGX-18.04 index 169922da..e3714c36 100644 --- a/Jenkinsfiles/Linux-SGX-18.04 +++ b/Jenkinsfiles/Linux-SGX-18.04 @@ -77,13 +77,13 @@ pipeline { // LTP is ignored under SGX because of random segfaults sh ''' - cd LibOS/shim/test/apps/ltp + cd LibOS/shim/test/ltp make SGX=1 all sgx-tokens make SGX=1 ltp-sgx.xml || : ''' sh ''' # Workaround LTP bug (see https://github.com/linux-test-project/ltp/issues/560 for upstream fix): - git -C LibOS/shim/test/apps/ltp/src checkout -- utils/ffsb-6.0-rc2/config.h.in utils/ffsb-6.0-rc2/configure + git -C LibOS/shim/test/ltp/src checkout -- utils/ffsb-6.0-rc2/config.h.in utils/ffsb-6.0-rc2/configure ./Scripts/gitignore-test ''' @@ -93,23 +93,23 @@ pipeline { rm Pal/src/host/Linux-SGX/signer/enclave-key.pem make SGX=1 distclean make -C LibOS/shim/test/regression SGX=1 clean - make -C LibOS/shim/test/apps/ltp clean + make -C LibOS/shim/test/ltp clean # LTP's make clean is broken, see https://github.com/linux-test-project/ltp/issues/559 - rm -rf /tmp/graphene-sgx-18.04.clean-check.clean/LibOS/shim/test/apps/ltp/src - rm -rf LibOS/shim/test/apps/ltp/src + rm -rf /tmp/graphene-sgx-18.04.clean-check.clean/LibOS/shim/test/ltp/src + rm -rf LibOS/shim/test/ltp/src ./Scripts/clean-check ''' } post { always { - archiveArtifacts 'LibOS/shim/test/apps/ltp/ltp-sgx.xml' + archiveArtifacts 'LibOS/shim/test/ltp/ltp-sgx.xml' junit 'Pal/regression/pal-regression.xml' junit 'LibOS/shim/test/regression/libos-regression.xml' // LTP is ignored under SGX because of random segfaults - //junit 'LibOS/shim/test/apps/ltp/ltp-sgx.xml' + //junit 'LibOS/shim/test/ltp/ltp-sgx.xml' } } } diff --git a/Jenkinsfiles/Linux-SGX-18.04-apps b/Jenkinsfiles/Linux-SGX-18.04-apps index 384584f7..96012f53 100644 --- a/Jenkinsfiles/Linux-SGX-18.04-apps +++ b/Jenkinsfiles/Linux-SGX-18.04-apps @@ -45,49 +45,49 @@ pipeline { steps { timeout(time: 5, unit: 'MINUTES') { sh ''' - cd LibOS/shim/test/apps/python-simple + cd Examples/python-simple PYTHONVERSION=python3.6 make SGX=1 PYTHONVERSION=python3.6 make SGX=1 check ''' } timeout(time: 5, unit: 'MINUTES') { sh ''' - cd LibOS/shim/test/apps/python-scipy-insecure + cd Examples/python-scipy-insecure PYTHONVERSION=python3.6 make SGX=1 PYTHONVERSION=python3.6 make SGX=1 check ''' } timeout(time: 5, unit: 'MINUTES') { sh ''' - cd LibOS/shim/test/apps/bash + cd Examples/bash make SGX=1 all make SGX=1 regression ''' } timeout(time: 5, unit: 'MINUTES') { sh ''' - cd LibOS/shim/test/apps/curl + cd Examples/curl make SGX=1 all make SGX=1 check ''' } timeout(time: 10, unit: 'MINUTES') { sh ''' - cd LibOS/shim/test/apps/gcc + cd Examples/gcc make SGX=1 all make SGX=1 check ''' } timeout(time: 15, unit: 'MINUTES') { sh ''' - cd LibOS/shim/test/apps/lmbench + cd Examples/lmbench make SGX=1 all make SGX=1 test N_RUNS=1 ENOUGH=100 ''' } timeout(time: 15, unit: 'MINUTES') { sh ''' - cd LibOS/shim/test/apps/redis + cd Examples/redis make SGX=1 make SGX=1 start-graphene-server & sleep 30 @@ -96,7 +96,7 @@ pipeline { } timeout(time: 15, unit: 'MINUTES') { sh ''' - cd LibOS/shim/test/apps/lighttpd + cd Examples/lighttpd make SGX=1 make SGX=1 start-graphene-server & sleep 10 @@ -105,7 +105,7 @@ pipeline { } timeout(time: 15, unit: 'MINUTES') { sh ''' - cd LibOS/shim/test/apps/nginx + cd Examples/nginx make SGX=1 make SGX=1 start-graphene-server & sleep 30 @@ -114,7 +114,7 @@ pipeline { } timeout(time: 25, unit: 'MINUTES') { sh ''' - cd LibOS/shim/test/apps/apache + cd Examples/apache make SGX=1 make SGX=1 start-graphene-server & sleep 30 @@ -124,7 +124,7 @@ pipeline { } timeout(time: 5, unit: 'MINUTES') { sh ''' - cd LibOS/shim/test/apps/blender + cd Examples/blender make SGX=1 make SGX=1 check ''' @@ -138,24 +138,24 @@ pipeline { rm Pal/src/host/Linux-SGX/signer/enclave-key.pem make SGX=1 distclean - make -C LibOS/shim/test/apps/python-simple SGX=1 clean - make -C LibOS/shim/test/apps/python-scipy-insecure SGX=1 clean - make -C LibOS/shim/test/apps/bash SGX=1 clean - make -C LibOS/shim/test/apps/curl SGX=1 clean - make -C LibOS/shim/test/apps/gcc SGX=1 clean - make -C LibOS/shim/test/apps/lmbench SGX=1 distclean - make -C LibOS/shim/test/apps/redis SGX=1 distclean - make -C LibOS/shim/test/apps/lighttpd SGX=1 distclean - make -C LibOS/shim/test/apps/nginx SGX=1 distclean - make -C LibOS/shim/test/apps/apache SGX=1 distclean - make -C LibOS/shim/test/apps/blender SGX=1 distclean + make -C Examples/python-simple SGX=1 clean + make -C Examples/python-scipy-insecure SGX=1 clean + make -C Examples/bash SGX=1 clean + make -C Examples/curl SGX=1 clean + make -C Examples/gcc SGX=1 clean + make -C Examples/lmbench SGX=1 distclean + make -C Examples/redis SGX=1 distclean + make -C Examples/lighttpd SGX=1 distclean + make -C Examples/nginx SGX=1 distclean + make -C Examples/apache SGX=1 distclean + make -C Examples/blender SGX=1 distclean # Currently used release of LTP contains broken symlinks under # utils/ffsb-6.0-rc2/ (config.guess and config.sub); without explicit # rm of these symlinks, the clean-check utility fails. We should # update to newer release of LTP where this issue will be fixed. - rm -rf /tmp/graphene-sgx-18.04-apps.clean-check.clean/LibOS/shim/test/apps/ltp/src - rm -rf LibOS/shim/test/apps/ltp/src + rm -rf /tmp/graphene-sgx-18.04-apps.clean-check.clean/LibOS/shim/test/ltp/src + rm -rf LibOS/shim/test/ltp/src ./Scripts/clean-check ''' diff --git a/Jenkinsfiles/Linux-SGX-apps b/Jenkinsfiles/Linux-SGX-apps index 23e36e11..f2a471ce 100644 --- a/Jenkinsfiles/Linux-SGX-apps +++ b/Jenkinsfiles/Linux-SGX-apps @@ -42,49 +42,49 @@ pipeline { steps { timeout(time: 5, unit: 'MINUTES') { sh ''' - cd LibOS/shim/test/apps/python-simple + cd Examples/python-simple make SGX=1 make SGX=1 check ''' } timeout(time: 5, unit: 'MINUTES') { sh ''' - cd LibOS/shim/test/apps/python-scipy-insecure + cd Examples/python-scipy-insecure make SGX=1 make SGX=1 check ''' } timeout(time: 5, unit: 'MINUTES') { sh ''' - cd LibOS/shim/test/apps/bash + cd Examples/bash make SGX=1 all make SGX=1 regression ''' } timeout(time: 5, unit: 'MINUTES') { sh ''' - cd LibOS/shim/test/apps/curl + cd Examples/curl make SGX=1 all make SGX=1 check ''' } timeout(time: 10, unit: 'MINUTES') { sh ''' - cd LibOS/shim/test/apps/gcc + cd Examples/gcc make SGX=1 all make SGX=1 check ''' } timeout(time: 15, unit: 'MINUTES') { sh ''' - cd LibOS/shim/test/apps/lmbench + cd Examples/lmbench make SGX=1 all make SGX=1 test N_RUNS=1 ENOUGH=100 ''' } timeout(time: 15, unit: 'MINUTES') { sh ''' - cd LibOS/shim/test/apps/redis + cd Examples/redis make SGX=1 USE_SELECT=1 make SGX=1 start-graphene-server & sleep 30 @@ -93,7 +93,7 @@ pipeline { } timeout(time: 15, unit: 'MINUTES') { sh ''' - cd LibOS/shim/test/apps/lighttpd + cd Examples/lighttpd make SGX=1 make SGX=1 start-graphene-server & sleep 10 @@ -102,7 +102,7 @@ pipeline { } timeout(time: 15, unit: 'MINUTES') { sh ''' - cd LibOS/shim/test/apps/nginx + cd Examples/nginx make SGX=1 make SGX=1 start-graphene-server & sleep 30 @@ -111,7 +111,7 @@ pipeline { } timeout(time: 25, unit: 'MINUTES') { sh ''' - cd LibOS/shim/test/apps/apache + cd Examples/apache make SGX=1 make SGX=1 start-graphene-server & sleep 30 @@ -121,7 +121,7 @@ pipeline { } timeout(time: 5, unit: 'MINUTES') { sh ''' - cd LibOS/shim/test/apps/blender + cd Examples/blender make SGX=1 make SGX=1 check ''' @@ -135,24 +135,24 @@ pipeline { rm Pal/src/host/Linux-SGX/signer/enclave-key.pem make SGX=1 GLIBC_VERSION=2.27 distclean - make -C LibOS/shim/test/apps/python-simple SGX=1 clean - make -C LibOS/shim/test/apps/python-scipy-insecure SGX=1 clean - make -C LibOS/shim/test/apps/bash SGX=1 clean - make -C LibOS/shim/test/apps/curl SGX=1 clean - make -C LibOS/shim/test/apps/gcc SGX=1 clean - make -C LibOS/shim/test/apps/lmbench SGX=1 distclean - make -C LibOS/shim/test/apps/redis SGX=1 distclean - make -C LibOS/shim/test/apps/lighttpd SGX=1 distclean - make -C LibOS/shim/test/apps/nginx SGX=1 distclean - make -C LibOS/shim/test/apps/apache SGX=1 distclean - make -C LibOS/shim/test/apps/blender SGX=1 distclean + make -C Examples/python-simple SGX=1 clean + make -C Examples/python-scipy-insecure SGX=1 clean + make -C Examples/bash SGX=1 clean + make -C Examples/curl SGX=1 clean + make -C Examples/gcc SGX=1 clean + make -C Examples/lmbench SGX=1 distclean + make -C Examples/redis SGX=1 distclean + make -C Examples/lighttpd SGX=1 distclean + make -C Examples/nginx SGX=1 distclean + make -C Examples/apache SGX=1 distclean + make -C Examples/blender SGX=1 distclean # Currently used release of LTP contains broken symlinks under # utils/ffsb-6.0-rc2/ (config.guess and config.sub); without explicit # rm of these symlinks, the clean-check utility fails. We should # update to newer release of LTP where this issue will be fixed. - rm -rf /tmp/graphene-sgx-apps.clean-check.clean/LibOS/shim/test/apps/ltp/src - rm -rf LibOS/shim/test/apps/ltp/src + rm -rf /tmp/graphene-sgx-apps.clean-check.clean/LibOS/shim/test/ltp/src + rm -rf LibOS/shim/test/ltp/src ./Scripts/clean-check ''' diff --git a/LICENSE.addendum.txt b/LICENSE.addendum.txt index a5459013..a5d7cfa6 100644 --- a/LICENSE.addendum.txt +++ b/LICENSE.addendum.txt @@ -33,9 +33,3 @@ A number of files taken from other C libraries: ** Pal/src/dynamic_link.h, do-rel.h , dl-machine-x86_64.h ** Pal/src/host/Linux/include/ - whole directory - for signal API definitions ** We also build a patched glibc, but this could be moved into a separate repo - -Some app and benchmark sources are redistributed under -LibOS/shim/test/apps. These will be migrated to subrepositories, as -needed, and should be considered separate projects, subject to their -original licenses. - diff --git a/LibOS/shim/Makefile b/LibOS/shim/Makefile index 61513465..d350200e 100644 --- a/LibOS/shim/Makefile +++ b/LibOS/shim/Makefile @@ -22,4 +22,4 @@ $(clean_targets): .PHONY: format format: - clang-format -i $(shell find . -path ./test/apps -prune -o \( -name '*.h' -o -name '*.c' \) -print) + clang-format -i $(shell find . -path ./test/ltp -prune -o \( -name '*.h' -o -name '*.c' \) -print) diff --git a/LibOS/shim/test/ltp/.gitignore b/LibOS/shim/test/ltp/.gitignore index 48531cc5..626d563f 100644 --- a/LibOS/shim/test/ltp/.gitignore +++ b/LibOS/shim/test/ltp/.gitignore @@ -1,2 +1,3 @@ opt/ ltp*.xml +/pal_loader diff --git a/LibOS/shim/test/ltp/Makefile b/LibOS/shim/test/ltp/Makefile index 354ed768..3087faf4 100644 --- a/LibOS/shim/test/ltp/Makefile +++ b/LibOS/shim/test/ltp/Makefile @@ -19,7 +19,7 @@ $(BUILDDIR)/runltp: $(SRCDIR)/configure cd $(SRCDIR) && $(MAKE) "DESTDIR=$(PWD)" SKIP_IDCHECK=1 install $(TESTCASEDIR)/pal_loader: $(BUILDDIR)/runltp - ln -sf $(call relative-to,$(dir $@),../../../Runtime/pal_loader) $@ + ln -sf $(call relative-to,$(dir $@),../../Runtime/pal_loader) $@ build-manifest: $(TESTCASEDIR)/manifest.template $(TESTCASEDIR)/Makefile cd $(TESTCASEDIR) && $(MAKE) diff --git a/LibOS/shim/test/ltp/Makefile.Test b/LibOS/shim/test/ltp/Makefile.Test index 1c09a79b..11630e4b 100644 --- a/LibOS/shim/test/ltp/Makefile.Test +++ b/LibOS/shim/test/ltp/Makefile.Test @@ -3,9 +3,9 @@ LTP_DIR := $(dir $(lastword $(MAKEFILE_LIST))) SYS ?= $(shell gcc -dumpmachine) export SYS -PALDIR = $(LTP_DIR)/../../../../../Pal/src -SHIMDIR = $(LTP_DIR)/../../../src -RUNTIME = $(LTP_DIR)/../../../../../Runtime +PALDIR = $(LTP_DIR)/../../../../Pal/src +SHIMDIR = $(LTP_DIR)/../../src +RUNTIME = $(LTP_DIR)/../../../../Runtime ifeq ($(SGX),1) PAL_LOADER = pal_loader SGX diff --git a/LibOS/shim/test/ltp/src b/LibOS/shim/test/ltp/src new file mode 160000 index 00000000..ac33ef87 --- /dev/null +++ b/LibOS/shim/test/ltp/src @@ -0,0 +1 @@ +Subproject commit ac33ef87f0b9dc56533026435be3ea8c67ce86d2 diff --git a/README.rst b/README.rst index 7c29b892..5ec7a82f 100644 --- a/README.rst +++ b/README.rst @@ -87,7 +87,7 @@ Here is an example manifest file:: More examples can be found in the test directories (``LibOS/shim/test``). We have also tested several applications, such as GCC, Bash, and Apache. The manifest files for these applications are provided in the -individual directories under ``LibOS/shim/test/apps``. +individual directories under ``Examples``. For the full documentation of the Graphene manifest syntax, see the `Graphene documentation