Skip to content
This repository has been archived by the owner on Jan 20, 2022. It is now read-only.

OpenMP apps are not supported because libgomp.so executes a raw syscall instruction #567

Closed
dimakuv opened this issue Mar 29, 2019 · 1 comment · Fixed by #749
Closed

Comments

@dimakuv
Copy link
Contributor

dimakuv commented Mar 29, 2019

Libgomp (the library to support OpenMP) uses a raw syscall instruction to call futex() which is not supported by Graphene-SGX. (Graphene-SGX expects that apps and libraries never issue an actual syscall but instead must rely on glibc for that.)

This issue is very similar to this one: cloudius-systems/osv#590

PR #561 adds support for syscall-instruction emulation. I have not yet tested OpenMP apps with this PR.

Simple test to reproduce an "Illegal instruction" failure in Graphene-SGX:

/* build with: gcc -fopenmp openmp-test.c -o openmp-test */
#include <stdio.h>
#include <stdlib.h>
#include <omp.h>

int v[10];

int main(void) {
#pragma omp parallel for
    for (int i=0; i<10; i++)
        v[i] = i;

    printf("first: %d, last: %d\n", v[0], v[9]);
    return 0;
}
@mkow
Copy link
Member

mkow commented Apr 1, 2019

Additional note: Blender also uses #pragma omp, which makes it fail on some scenes.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants