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

SGX driver used by OpenEnclave is not supported by the latest Ubuntu 18.04 (kernel version 5.4.0) #851

Closed
randoruf opened this issue Sep 11, 2022 · 0 comments
Labels
needs-triage Bug does not yet have a priority assigned

Comments

@randoruf
Copy link

randoruf commented Sep 11, 2022

The openenclave can not install the SGX driver since SGX driver 1.33 does not support Linux kernel that is lower than 5.4.0.

When building the SGX driver 1.33, the compiler will report errors like

/var/lib/dkms/sgx/1.33/build/encl.c: In function ‘sgx_encl_mm_release_deferred’:
./include/linux/kernel.h:994:51: error: ‘struct sgx_encl_mm’ has no member named ‘rcu’
  BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) && \                                                   ^

The default version of openclave used by sgx-lkl is at
https://github.com/intel/SGXDataCenterAttestationPrimitives/blob/DCAP_1.6/driver/linux/encl.c#L137

Intel updated the driver later, this function will only be compiled against Linux kernels that are below than 5.4.0.
see at https://github.com/intel/SGXDataCenterAttestationPrimitives/blob/DCAP_1.7/driver/linux/encl.c#L136

An easy way to work around is to update the source in the openenclave configuration file, see this commit openenclave/openenclave@f3ba83a

@github-actions github-actions bot added the needs-triage Bug does not yet have a priority assigned label Sep 11, 2022
@randoruf randoruf changed the title OpenEnclave uses SGX driver that is not supported by the latest Ubuntu 18.04 (kernel version 5.4.0) SGX driver used by OpenEnclave is not supported by the latest Ubuntu 18.04 (kernel version 5.4.0) Sep 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-triage Bug does not yet have a priority assigned
Projects
None yet
Development

No branches or pull requests

1 participant