I have been using RedHat based distros, namely Fedora and Cent OS. This is a fast how-to on the installation of a SGX development environment in F29 as it took me some iterations to get everything properly setup.
- Install Driver
- Setup PSW Dependencies
- Install icls Client
- Install DAL/JHI
- Install PSW
- Install SDK
- Send certificate to (IA) Intel Attestation Service.
1. Install Driver (Kernel 4.20 - 5.0.5)
The releases page of Intel SGX at the time of writing points to Release 2.4 as the latest with explicit support for Fedora 27.
Starting with Kernel 4.20,
vm_insert_pfn transitions to
vmf_insert_pfn breaking backward compatibility. These changes did not make it into Intel SGX 2.4 therefore we must compile from source starting from this commit.
The instructions that follow are mostly copied from the github page. Just make sure you are running the latest kernel or a fixed kernel if you want to avoid bad surprises:
- To check if matching kernel headers are installed:
- To install matching headers:
- 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.
To make the driver all you need is:
After that it can be installed through
$ sudo make install if you don’t mind using
/etc/modules-load.d/sgx.conf with the following contents:
This will allow the system (using systemd) to automatically load the driver at boot.
2. Install Platform Software (PSW) optional dependencies
To have everything working without errors or warnings 2 extra pieces of software must be installed: the icls client and the DAL/JHI for Intel ME support
The icls links have been taken down from the download page and there are notes of contacting [email protected] for a download link here but it’s been more than a week without reply from that email address, therefore here it is, extracted from an older guide.
$ sudo dnf install iclsClient-1.45.449.12-1.x86_64.rpm should do the trick.
Should report the service as active with everything working.
3. Install PSW and Software Development Kit (SDK)
This will create the installers in
linux/installer/bin/ after this just install the PSW and the SDK.
When asked to install the SDK in the current location answer no and specify
/opt/intel so the SDK gets installed to the same location as the PSW.
Check the aesmd service is working
$ sudo systemctl status aesmd. If you’re behind a corporate proxy make sure to define it in
/etc/aesmd.conf and restart the service.
The first command will source the environment variables for your current session and the second one will setup the environment variables on login.
This should cover the basic setup in order to start compiling and testing SGX software.