[LibOS+Pal] manifest: Remove support for loader.exec and sgx.sigfile

Supporting these options complicates the design of Graphene and loading
logic significantly, providing little useful functionality:
- loader.exec:
    - the main user of it were our tests
    - worked only for the first process spawned inside Graphene, as it
      was a unidirectional manifest->binary mapping, so the child
      process didn't know about the corresponding manifest.
- sgx.sigfile:
    - probably all existing usages of it were completely redundant
    - was resolved relatively to CWD instead of the executable location,
      which made it mostly useless

From now on, the correct location of the files is:
- either place the manifest and sigfile next to the binary, with a
  matching name, or
- create a symlink to the binary in the folder where manifests are
  stored and launch it through this symlink
This commit is contained in:
Michał Kowalczyk
2020-10-23 00:06:46 +02:00
parent fcadd3d580
commit e587869e13
98 changed files with 618 additions and 691 deletions
+1
View File
@@ -1 +1,2 @@
/nodejs
/OUTPUT
+6 -3
View File
@@ -21,7 +21,7 @@ GRAPHENEDEBUG = none
endif
.PHONY: all
all: nodejs.manifest pal_loader
all: nodejs.manifest | nodejs pal_loader
ifeq ($(SGX),1)
all: nodejs.token
endif
@@ -63,6 +63,7 @@ nodejs.manifest: nodejs.manifest.template nodejs-trusted-libs
# Generate SGX-specific manifest, enclave signature, and token for enclave initialization
nodejs.manifest.sgx: nodejs.manifest helloworld.js
$(GRAPHENEDIR)/Pal/src/host/Linux-SGX/signer/pal-sgx-sign \
-exec nodejs \
-libpal $(GRAPHENEDIR)/Runtime/libpal-Linux-SGX.so \
-key $(SGX_SIGNER_KEY) \
-manifest $< -output $@
@@ -72,7 +73,9 @@ nodejs.sig: nodejs.manifest.sgx
nodejs.token: nodejs.sig
$(GRAPHENEDIR)/Pal/src/host/Linux-SGX/signer/pal-sgx-get-token -output $@ -sig $<
# Extra executables
nodejs:
ln -s $(NODEJS_DIR)nodejs $@
pal_loader:
ln -s $(GRAPHENEDIR)/Runtime/pal_loader $@
@@ -84,7 +87,7 @@ check: all
.PHONY: clean
clean:
$(RM) *.manifest *.manifest.sgx *.token *.sig pal_loader OUTPUT
$(RM) *.manifest *.manifest.sgx *.token *.sig nodejs pal_loader OUTPUT
.PHONY: distclean
distclean: clean
-2
View File
@@ -2,8 +2,6 @@
#
# This manifest was prepared and tested on Ubuntu 18.04.
# Executable to load into Graphene and run.
loader.exec = file:$(NODEJS_DIR)nodejs
loader.argv0_override = nodejs
# LibOS layer library of Graphene. There is currently only one implementation,