Intel® Software Guard Extensions (Intel® SGX)
Use hardware-based isolation and memory encryption to provide more code protection in your solutions.
1338 Discussions

Error! Bad return status for module build on kernel: 4.18.0-305.19.1.el8_4.x86_64 (x86_64)

enclave_Research
2,921 Views

in Red Hat Enterprise Linux release 8.4,kernel: 4.18.0-305.19.1.el8_4.x86_64.I install sgx_driver_1.41,but it show: Error! Bad return status for module build on kernel: 4.18.0-305.19.1.el8_4.x86_64 (x86_64),Failed to build driver. Please check if the matching kernel headers are installed.How can I install sgx_driver_1.41?

0 Kudos
1 Solution
JesusG_Intel
Moderator
2,815 Views

Hello enclave_research,


The SGX drivers are part of the 5.11 kernel and higher, which means that you do not have to install the SGX driver separately. Follow this transition guidance If you upgrade to kernel 5.11 or higher and are moving an existing DCAP application.


Regarding your question on SGX 2 memory, the answer is Yes. Section 2.1 Platform Requirements of the SuperMicro enabling guide states: "For each memory controller, all channel 0 slots should be populated (8 DIMMS per socket at least), DIMM population should be symmetric across IMCs"


Sincerely,

Jesus G.

Intel Customer Support


View solution in original post

10 Replies
JesusG_Intel
Moderator
2,904 Views

Hello enclave_research,


Try installing the RHEL kernel headers using the command: yum install kernel-devel then install the SGX driver.


We will continue to help you on this thread and delete the second thread you posted with the same question.


Sincerely,

Jesus G.

Intel Customer Support


enclave_Research
2,892 Views

I used the command:yum install kernel-devel before install the SGX driver.But it didn't work.

JesusG_Intel
Moderator
2,875 Views

Hello enclave_research,

 

Confirm that you have followed the instructions for installing the DCAP driver for RHEL on page 7 of the Intel SGX SW Installation Guide for Linux.

 

a. Since the DCAP Driver is built from the driver package, install the required components that support the Intel® SGX PSW installation. To install protobuf-devel and dkms, you need to enable the CodeReady Builder repo and install the EPEL repo:

 

$ sudo subscription-manager repos --enable codeready-builder-for-rhel8-x86_64-rpms

$ sudo yum install https://dl.fedoraproject.org/pub/epel/epel-releaselatest-8.noarch.rpm

 

Now install the required packages.

 

Note: This command line contains modules that are needed in components described in subsequent sections of this document

 

ENSURE YOU RUN THESE COMMANDS:

$ sudo yum install openssl-devel libcurl-devel yum-utils wget dkms

$ make kernel-devel kernel

 

b. Download the latest Intel SGX Driver binary file the appropriate distro directory: https://download.01.org/intel-sgx/latest/linux-latest/distro For example, to download the driver for RHEL 8.1, use the following command:

 

$ wget - https://download.01.org/intel-sgx/latest/dcap-latest/linux/distro/rhel8.2-server/sgx_linux_x64_drive...

 

c. Set the protections to allow for the .bin file execution:

 

$ chmod 777 sgx_linux_x64_driver_1.41.bin

 

d. Install the driver:

 

$ sudo ./sgx_linux_x64_driver_1.41.bin

 

The installer also loads the DCAP Driver and sets it to auto-load when the system reboots. To verify the driver loaded correctly, check that the device shows up in the /dev folder:

 

$ ls -la /dev/sgx*

 

crw-------. 1 root root 10, 60 Mar 18 15:06 /dev/sgx_enclave

 

crw-------. 1 root root 10, 59 Mar 18 15:06 /dev/sgx_provision

 

Sincerely,

Jesus G.

Intel Customer Support

 

enclave_Research
2,866 Views

I always follewed the instructions for installing the DCAP driver for RHEL on page 7 of the Intel_SGX_SW_Installation_Guide_for_Linux.pdf , but the error happened.Do I need to update the system?I install RHEL8.2,if I update the system,the system will be RHEL8.4.

enclave_Research
2,865 Views

Do servers that support sgx2 startup require memory?Do I have to configure 8 memory modules for each CPU?

JesusG_Intel
Moderator
2,855 Views

Hello enclave_research,

 

You can try building the driver from source but that also requires the kernel headers. The instructions to build the Linux DCAP driver recommend:

 

  • On RHEL 8
  • To check if matching kernel headers are installed:
    • $ ls /usr/src/kernels/$(uname -r)

 

  • To install matching headers:
  • $ sudo yum install kernel-devel

 

  • After the above command, if the matching headers are still missing in /usr/src/kernels, try update kernel and reboot using commands below. Then choose updated kernel on boot menu.
  • $ sudo yum install kernel
  • $ sudo reboot

 

  • Additional packages need be installed:
  • $ sudo yum install -y elfutils-libelf-devel
  • $ sudo yum groupinstall 'Development Tools'

 

 

 

Regarding your question on SGX2 memory, I will consult with my resources and respond when I have an answer.

 

Sincerely,

Jesus G.

Intel Customer Support


enclave_Research
2,831 Views

instructions to build the Linux DCAP driver show:

 As of the Kernel release 5.11, the SGX patches are merged into the mainline kernel. To avoid future incompatibilities, it is recommended that existing solutions using this driver be transitioned to directly using kernel 5.11 or higher. Guidelines for the transition can be found here.

Do I have to use a kernel above 5.11 to install the 1.41 driver?

JesusG_Intel
Moderator
2,816 Views

Hello enclave_research,


The SGX drivers are part of the 5.11 kernel and higher, which means that you do not have to install the SGX driver separately. Follow this transition guidance If you upgrade to kernel 5.11 or higher and are moving an existing DCAP application.


Regarding your question on SGX 2 memory, the answer is Yes. Section 2.1 Platform Requirements of the SuperMicro enabling guide states: "For each memory controller, all channel 0 slots should be populated (8 DIMMS per socket at least), DIMM population should be symmetric across IMCs"


Sincerely,

Jesus G.

Intel Customer Support


JesusG_Intel
Moderator
2,786 Views

Hello enclave_research,


Do you still need help with this issue?


Sincerely,

Jesus G.

Intel Customer Support


JesusG_Intel
Moderator
2,757 Views

This thread has been marked as answered and Intel will no longer monitor this thread. If you want a response from Intel in a follow-up question, please open a new thread.


Reply