Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Convert manifests to new mount format #417

Merged
merged 5 commits into from
Feb 22, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 6 additions & 15 deletions CI-Examples/bash/manifest.template
Original file line number Diff line number Diff line change
Expand Up @@ -13,21 +13,12 @@ loader.env.PATH = "{{ execdir }}"

loader.insecure__use_cmdline_argv = true

fs.mount.lib.type = "chroot"
fs.mount.lib.path = "/lib"
fs.mount.lib.uri = "file:{{ gramine.runtimedir() }}"

fs.mount.lib64.type = "chroot"
fs.mount.lib64.path = "{{ arch_libdir }}"
fs.mount.lib64.uri = "file:{{ arch_libdir }}"

fs.mount.usr_lib.type = "chroot"
fs.mount.usr_lib.path = "/usr/lib"
fs.mount.usr_lib.uri = "file:/usr/lib"

fs.mount.bin.type = "chroot"
fs.mount.bin.path = "{{ execdir }}"
fs.mount.bin.uri = "file:{{ execdir }}"
fs.mounts = [
{ path = "/lib", uri = "file:{{ gramine.runtimedir() }}" },
{ path = "{{ arch_libdir }}", uri = "file:{{ arch_libdir }}" },
{ path = "/usr/lib", uri = "file:/usr/lib" },
{ path = "{{ execdir }}", uri = "file:{{ execdir }}" },
]

sgx.debug = true
sgx.nonpie_binary = true
Expand Down
31 changes: 8 additions & 23 deletions CI-Examples/blender/blender.manifest.template
Original file line number Diff line number Diff line change
Expand Up @@ -13,29 +13,14 @@ loader.env.PWD = ""

loader.insecure__use_cmdline_argv = true

fs.mount.gramine_lib.type = "chroot"
fs.mount.gramine_lib.path = "/gramine_lib"
fs.mount.gramine_lib.uri = "file:{{ gramine.runtimedir() }}"

fs.mount.blender_lib.type = "chroot"
fs.mount.blender_lib.path = "/blender_lib"
fs.mount.blender_lib.uri = "file:{{ blender_dir }}/lib"

fs.mount.usr_lib.type = "chroot"
fs.mount.usr_lib.path = "/usr/{{ arch_libdir }}"
fs.mount.usr_lib.uri = "file:/usr/{{ arch_libdir }}"

fs.mount.lib.type = "chroot"
fs.mount.lib.path = "{{ arch_libdir }}"
fs.mount.lib.uri = "file:{{ arch_libdir }}"

fs.mount.scenes.type = "chroot"
fs.mount.scenes.path = "/data"
fs.mount.scenes.uri = "file:{{ data_dir }}"

fs.mount.blender.type = "chroot"
fs.mount.blender.path = "/blender"
fs.mount.blender.uri = "file:{{ blender_dir }}"
fs.mounts = [
{ path = "/gramine_lib", uri = "file:{{ gramine.runtimedir() }}" },
{ path = "/blender_lib", uri = "file:{{ blender_dir }}/lib" },
{ path = "{{ arch_libdir }}", uri = "file:{{ arch_libdir }}" },
{ path = "/usr/{{ arch_libdir }}", uri = "file:/usr/{{ arch_libdir }}" },
{ path = "/data", uri = "file:{{ data_dir }}" },
{ path = "/blender", uri = "file:{{ blender_dir }}" },
]

sgx.debug = true
sgx.nonpie_binary = true
Expand Down
16 changes: 5 additions & 11 deletions CI-Examples/busybox/busybox.manifest.template
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,11 @@ loader.env.HOSTNAME = "test"

loader.insecure__use_cmdline_argv = true

fs.mount.lib1.type = "chroot"
fs.mount.lib1.path = "/lib"
fs.mount.lib1.uri = "file:{{ gramine.runtimedir() }}"

fs.mount.lib2.type = "chroot"
fs.mount.lib2.path = "{{ arch_libdir }}"
fs.mount.lib2.uri = "file:{{ arch_libdir }}"

fs.mount.etc.type = "chroot"
fs.mount.etc.path = "/etc"
fs.mount.etc.uri = "file:/etc"
fs.mounts = [
{ path = "/lib", uri = "file:{{ gramine.runtimedir() }}" },
{ path = "{{ arch_libdir }}", uri = "file:{{ arch_libdir }}" },
{ path = "/etc", uri = "file:/etc" },
]

sgx.debug = true

Expand Down
6 changes: 3 additions & 3 deletions CI-Examples/helloworld/helloworld.manifest.template
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ loader.argv0_override = "helloworld"

loader.env.LD_LIBRARY_PATH = "/lib"

fs.mount.lib.type = "chroot"
fs.mount.lib.path = "/lib"
fs.mount.lib.uri = "file:{{ gramine.runtimedir() }}"
fs.mounts = [
{ path = "/lib", uri = "file:{{ gramine.runtimedir() }}" },
]

sgx.debug = true
sgx.nonpie_binary = true
Expand Down
25 changes: 7 additions & 18 deletions CI-Examples/lighttpd/lighttpd.manifest.template
Original file line number Diff line number Diff line change
Expand Up @@ -13,25 +13,14 @@ loader.insecure__use_cmdline_argv = true

sys.enable_sigterm_injection = true

fs.mount.lib.type = "chroot"
fs.mount.lib.path = "/lib"
fs.mount.lib.uri = "file:{{ gramine.runtimedir() }}"
fs.mounts = [
{ path = "/lib", uri = "file:{{ gramine.runtimedir() }}" },
{ path = "{{ arch_libdir }}", uri = "file:{{ arch_libdir }}" },
{ path = "/usr", uri = "file:/usr" },
{ path = "{{ install_dir_abspath }}", uri = "file:{{ install_dir }}" },

fs.mount.lib2.type = "chroot"
fs.mount.lib2.path = "{{ arch_libdir }}"
fs.mount.lib2.uri = "file:{{ arch_libdir }}"

fs.mount.usr.type = "chroot"
fs.mount.usr.path = "/usr"
fs.mount.usr.uri = "file:/usr"

fs.mount.cwd.type = "chroot"
fs.mount.cwd.path = "{{ install_dir_abspath }}"
fs.mount.cwd.uri = "file:{{ install_dir }}"

fs.mount.var_tmp.type = "tmpfs"
fs.mount.var_tmp.path = "/var/tmp"
fs.mount.var_tmp.uri = "file:dummy-unused-by-tmpfs-uri"
{ type = "tmpfs", path = "/var/tmp" },
]

sgx.debug = true
sgx.nonpie_binary = true
Expand Down
21 changes: 6 additions & 15 deletions CI-Examples/memcached/memcached.manifest.template
Original file line number Diff line number Diff line change
Expand Up @@ -13,21 +13,12 @@ loader.insecure__use_cmdline_argv = true

sys.enable_sigterm_injection = true

fs.mount.lib.type = "chroot"
fs.mount.lib.path = "/lib"
fs.mount.lib.uri = "file:{{ gramine.runtimedir() }}"

fs.mount.lib2.type = "chroot"
fs.mount.lib2.path = "{{ arch_libdir }}"
fs.mount.lib2.uri = "file:{{ arch_libdir }}"

fs.mount.lib3.type = "chroot"
fs.mount.lib3.path = "/usr/{{ arch_libdir }}"
fs.mount.lib3.uri = "file:/usr/{{ arch_libdir }}"

fs.mount.etc.type = "chroot"
fs.mount.etc.path = "/etc"
fs.mount.etc.uri = "file:/etc"
fs.mounts = [
{ path = "/lib", uri = "file:{{ gramine.runtimedir() }}" },
{ path = "{{ arch_libdir }}", uri = "file:{{ arch_libdir }}" },
{ path = "/usr/{{ arch_libdir }}", uri = "file:/usr/{{ arch_libdir }}" },
{ path = "/etc", uri = "file:/etc" },
]

sgx.debug = true
sgx.nonpie_binary = true
Expand Down
31 changes: 8 additions & 23 deletions CI-Examples/nginx/nginx.manifest.template
Original file line number Diff line number Diff line change
Expand Up @@ -13,29 +13,14 @@ loader.insecure__use_cmdline_argv = true

sys.enable_sigterm_injection = true

fs.mount.lib.type = "chroot"
fs.mount.lib.path = "/lib"
fs.mount.lib.uri = "file:{{ gramine.runtimedir() }}"

fs.mount.lib2.type = "chroot"
fs.mount.lib2.path = "{{ arch_libdir }}"
fs.mount.lib2.uri = "file:{{ arch_libdir }}"

fs.mount.lib3.type = "chroot"
fs.mount.lib3.path = "/usr{{ arch_libdir }}"
fs.mount.lib3.uri = "file:/usr{{ arch_libdir }}"

fs.mount.lib4.type = "chroot"
fs.mount.lib4.path = "/usr/local/lib"
fs.mount.lib4.uri = "file:/usr/local/lib"

fs.mount.etc.type = "chroot"
fs.mount.etc.path = "/etc"
fs.mount.etc.uri = "file:/etc"

fs.mount.cwd.type = "chroot"
fs.mount.cwd.path = "{{ install_dir_abspath }}"
fs.mount.cwd.uri = "file:{{ install_dir }}"
fs.mounts = [
{ path = "/lib", uri = "file:{{ gramine.runtimedir() }}" },
{ path = "{{ arch_libdir }}", uri = "file:{{ arch_libdir }}" },
{ path = "/usr{{ arch_libdir }}", uri = "file:/usr{{ arch_libdir }}" },
{ path = "/usr/local/lib", uri = "file:/usr/local/lib" },
{ path = "/etc", uri = "file:/etc" },
{ path = "{{ install_dir_abspath }}", uri = "file:{{ install_dir }}" },
]

sgx.debug = true
sgx.nonpie_binary = true
Expand Down
38 changes: 10 additions & 28 deletions CI-Examples/python/python.manifest.template
Original file line number Diff line number Diff line change
Expand Up @@ -13,33 +13,16 @@ loader.insecure__use_cmdline_argv = true

sys.enable_sigterm_injection = true

fs.mount.lib.type = "chroot"
fs.mount.lib.path = "/lib"
fs.mount.lib.uri = "file:{{ gramine.runtimedir() }}"

fs.mount.lib2.type = "chroot"
fs.mount.lib2.path = "{{ arch_libdir }}"
fs.mount.lib2.uri = "file:{{ arch_libdir }}"

fs.mount.usr.type = "chroot"
fs.mount.usr.path = "/usr"
fs.mount.usr.uri = "file:/usr"

fs.mount.pyhome.type = "chroot"
fs.mount.pyhome.path = "{{ python.stdlib }}"
fs.mount.pyhome.uri = "file:{{ python.stdlib }}"

fs.mount.pydisthome.type = "chroot"
fs.mount.pydisthome.path = "{{ python.distlib }}"
fs.mount.pydisthome.uri = "file:{{ python.distlib }}"

fs.mount.tmp.type = "chroot"
fs.mount.tmp.path = "/tmp"
fs.mount.tmp.uri = "file:/tmp"

fs.mount.etc.type = "chroot"
fs.mount.etc.path = "/etc"
fs.mount.etc.uri = "file:/etc"
fs.mounts = [
{ path = "/lib", uri = "file:{{ gramine.runtimedir() }}" },
{ path = "{{ arch_libdir }}", uri = "file:{{ arch_libdir }}" },
{ path = "/usr", uri = "file:/usr" },
{ path = "{{ python.stdlib }}", uri = "file:{{ python.stdlib }}" },
{ path = "{{ python.distlib }}", uri = "file:{{ python.distlib }}" },
{ path = "/etc", uri = "file:/etc" },

{ type = "tmpfs", path = "/tmp" },
]

sgx.debug = true
sgx.nonpie_binary = true
Expand Down Expand Up @@ -69,5 +52,4 @@ sgx.allowed_files = [
"file:/etc/gai.conf",
"file:/etc/host.conf",
"file:/etc/resolv.conf",
"file:/tmp",
]
21 changes: 6 additions & 15 deletions CI-Examples/ra-tls-mbedtls/client.manifest.template
Original file line number Diff line number Diff line change
Expand Up @@ -14,21 +14,12 @@ loader.env.LC_ALL = "C"
loader.insecure__use_cmdline_argv = true
loader.insecure__use_host_env = true

fs.mount.lib.type = "chroot"
fs.mount.lib.path = "/lib"
fs.mount.lib.uri = "file:{{ gramine.runtimedir() }}"

fs.mount.lib2.type = "chroot"
fs.mount.lib2.path = "{{ arch_libdir }}"
fs.mount.lib2.uri = "file:{{ arch_libdir }}"

fs.mount.lib3.type = "chroot"
fs.mount.lib3.path = "/usr{{ arch_libdir }}"
fs.mount.lib3.uri = "file:/usr{{ arch_libdir }}"

fs.mount.etc.type = "chroot"
fs.mount.etc.path = "/etc"
fs.mount.etc.uri = "file:/etc"
fs.mounts = [
{ path = "/lib", uri = "file:{{ gramine.runtimedir() }}" },
{ path = "{{ arch_libdir }}", uri = "file:{{ arch_libdir }}" },
{ path = "/usr{{ arch_libdir }}", uri = "file:/usr{{ arch_libdir }}" },
{ path = "/etc", uri = "file:/etc" },
]

sgx.debug = true
sgx.remote_attestation = true
Expand Down
21 changes: 6 additions & 15 deletions CI-Examples/ra-tls-mbedtls/server.manifest.template
Original file line number Diff line number Diff line change
Expand Up @@ -13,21 +13,12 @@ loader.insecure__use_cmdline_argv = true

sys.enable_sigterm_injection = true

fs.mount.lib.type = "chroot"
fs.mount.lib.path = "/lib"
fs.mount.lib.uri = "file:{{ gramine.runtimedir() }}"

fs.mount.lib2.type = "chroot"
fs.mount.lib2.path = "{{ arch_libdir }}"
fs.mount.lib2.uri = "file:{{ arch_libdir }}"

fs.mount.lib3.type = "chroot"
fs.mount.lib3.path = "/usr{{ arch_libdir }}"
fs.mount.lib3.uri = "file:/usr{{ arch_libdir }}"

fs.mount.etc.type = "chroot"
fs.mount.etc.path = "/etc"
fs.mount.etc.uri = "file:/etc"
fs.mounts = [
{ path = "/lib", uri = "file:{{ gramine.runtimedir() }}" },
{ path = "{{ arch_libdir }}", uri = "file:{{ arch_libdir }}" },
{ path = "/usr{{ arch_libdir }}", uri = "file:/usr{{ arch_libdir }}" },
{ path = "/etc", uri = "file:/etc" },
]

sgx.debug = true
sgx.remote_attestation = true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,21 +11,12 @@ loader.env.LD_LIBRARY_PATH = "/lib:{{ arch_libdir }}:/usr{{ arch_libdir }}"

loader.insecure__use_cmdline_argv = true

fs.mount.lib.type = "chroot"
fs.mount.lib.path = "/lib"
fs.mount.lib.uri = "file:{{ gramine.runtimedir() }}"

fs.mount.lib2.type = "chroot"
fs.mount.lib2.path = "{{ arch_libdir }}"
fs.mount.lib2.uri = "file:{{ arch_libdir }}"

fs.mount.lib3.type = "chroot"
fs.mount.lib3.path = "/usr{{ arch_libdir }}"
fs.mount.lib3.uri = "file:/usr{{ arch_libdir }}"

fs.mount.etc.type = "chroot"
fs.mount.etc.path = "/etc"
fs.mount.etc.uri = "file:/etc"
fs.mounts = [
{ path = "/lib", uri = "file:{{ gramine.runtimedir() }}" },
{ path = "{{ arch_libdir }}", uri = "file:{{ arch_libdir }}" },
{ path = "/usr{{ arch_libdir }}", uri = "file:/usr{{ arch_libdir }}" },
{ path = "/etc", uri = "file:/etc" },
]

sgx.debug = true
sgx.remote_attestation = true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,21 +15,12 @@ loader.env.SECRET_PROVISION_SERVERS = "dummyserver:80;localhost:4433;anotherdumm

loader.insecure__use_cmdline_argv = true

fs.mount.lib.type = "chroot"
fs.mount.lib.path = "/lib"
fs.mount.lib.uri = "file:{{ gramine.runtimedir() }}"

fs.mount.lib2.type = "chroot"
fs.mount.lib2.path = "{{ arch_libdir }}"
fs.mount.lib2.uri = "file:{{ arch_libdir }}"

fs.mount.lib3.type = "chroot"
fs.mount.lib3.path = "/usr{{ arch_libdir }}"
fs.mount.lib3.uri = "file:/usr{{ arch_libdir }}"

fs.mount.etc.type = "chroot"
fs.mount.etc.path = "/etc"
fs.mount.etc.uri = "file:/etc"
fs.mounts = [
{ path = "/lib", uri = "file:{{ gramine.runtimedir() }}" },
{ path = "{{ arch_libdir }}", uri = "file:{{ arch_libdir }}" },
{ path = "/usr{{ arch_libdir }}", uri = "file:/usr{{ arch_libdir }}" },
{ path = "/etc", uri = "file:/etc" },
]

sgx.debug = true
sgx.remote_attestation = true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,21 +16,12 @@ loader.env.SECRET_PROVISION_SERVERS = "dummyserver:80;localhost:4433;anotherdumm

loader.insecure__use_cmdline_argv = true

fs.mount.lib.type = "chroot"
fs.mount.lib.path = "/lib"
fs.mount.lib.uri = "file:{{ gramine.runtimedir() }}"

fs.mount.lib2.type = "chroot"
fs.mount.lib2.path = "{{ arch_libdir }}"
fs.mount.lib2.uri = "file:{{ arch_libdir }}"

fs.mount.lib3.type = "chroot"
fs.mount.lib3.path = "/usr{{ arch_libdir }}"
fs.mount.lib3.uri = "file:/usr{{ arch_libdir }}"

fs.mount.etc.type = "chroot"
fs.mount.etc.path = "/etc"
fs.mount.etc.uri = "file:/etc"
fs.mounts = [
{ path = "/lib", uri = "file:{{ gramine.runtimedir() }}" },
{ path = "{{ arch_libdir }}", uri = "file:{{ arch_libdir }}" },
{ path = "/usr{{ arch_libdir }}", uri = "file:/usr{{ arch_libdir }}" },
{ path = "/etc", uri = "file:/etc" },
]

sgx.debug = true
sgx.remote_attestation = true
Expand Down
Loading