From 16d076dce1326c25eef7a8e2bcae44c57a371448 Mon Sep 17 00:00:00 2001 From: Wojtek Porczyk Date: Mon, 30 Sep 2024 17:49:25 +0200 Subject: [PATCH] [LibOS/tests] Fix openmp manifest to add shm tmpfs There is a known issue in some versions of `libomp` (the LLVM implementation of OpenMP), and probably also in `libiomp` (Intel implementation of OpenMP). Those versions require /dev/shm to exist. This commit modifies the openmp manifest to add this dir as a tmpfs mount. With this fix, the files under /dev/shm/ are not visible on the host, so security of the application remains intact. Based on the suggestion by Dmitrii Kuvaiskii. See https://github.com/gramineproject/gramine/discussions/1780#discussioncomment-8589083 Signed-off-by: Wojtek Porczyk --- libos/test/regression/openmp.manifest.template | 1 + 1 file changed, 1 insertion(+) diff --git a/libos/test/regression/openmp.manifest.template b/libos/test/regression/openmp.manifest.template index cfcc63bb41..a723a31f56 100644 --- a/libos/test/regression/openmp.manifest.template +++ b/libos/test/regression/openmp.manifest.template @@ -19,6 +19,7 @@ fs.mounts = [ { path = "/lib", uri = "file:{{ gramine.runtimedir(libc) }}" }, { path = "/{{ entrypoint }}", uri = "file:{{ binary_dir }}/{{ entrypoint }}" }, { path = "/usr/{{ arch_libdir }}", uri = "file:/usr/{{ arch_libdir }}" }, + { path = "/dev/shm", type = "tmpfs" }, ] sgx.max_threads = {{ '1' if env.get('EDMM', '0') == '1' else '32' }}