Skip to content

Commit

Permalink
[LibOS/tests] Fix openmp manifest to add shm tmpfs
Browse files Browse the repository at this point in the history
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
#1780 (comment)

Signed-off-by: Wojtek Porczyk <woju@invisiblethingslab.com>
  • Loading branch information
woju committed Oct 15, 2024
1 parent c74d9bc commit 16d076d
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions libos/test/regression/openmp.manifest.template
Original file line number Diff line number Diff line change
Expand Up @@ -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' }}
Expand Down

0 comments on commit 16d076d

Please sign in to comment.