gramineproject / gramine

A library OS for Linux multi-process applications, with Intel SGX support
GNU Lesser General Public License v3.0
587 stars 193 forks source link

The `CI-examples/ra-tcp-mbedtls` does not work OoTB #1901

Closed jakubDoka closed 3 months ago

jakubDoka commented 3 months ago

Description of the problem

When following the steps in the README.md I ran into error related to incomplete configuration.

Steps to reproduce

# PWD=/CI-Examples/ra-tcp-mbedtls
make clean
make app dcap RA_TYPE=dcap

gramine-sgx ./server &

Expected results

The server should boot normally, I managed to fix this by:

diff --git a/CI-Examples/ra-tls-mbedtls/server.manifest.template b/CI-Examples/ra-tls-mbedtls/server.manifest.template
index abd1c873..1712b2c6 100644
--- a/CI-Examples/ra-tls-mbedtls/server.manifest.template
+++ b/CI-Examples/ra-tls-mbedtls/server.manifest.template
@@ -11,6 +11,8 @@ loader.env.LD_LIBRARY_PATH = "/lib:{{ arch_libdir }}:/usr{{ arch_libdir }}"

 loader.insecure__use_cmdline_argv = true

+loader.entrypoint = "file:/usr/lib/x86_64-linux-gnu/gramine/libsysdb.so"
+
 sys.enable_sigterm_injection = true

 fs.mounts = [

Actual results

Gramine is starting. Parsing TOML manifest file, this may take some time...
error: PAL failed No 'loader.entrypoint' is specified in the manifest

Gramine commit hash

5169fdb78af8dc099b23c07ea47191e2261fd8ef

mkow commented 3 months ago

This is because you most likely ran CI-examples/ra-tcp-mbedtls from master, but Gramine from the last release, which is older. You need to use the examples in the version matching your Gramine (i.e. either build Gramine from the same version of sources, or use an older version of this example from the appropriate git tag).