nixpkgs/nixos/modules
Vincent Haupert b88ddadf8b nixos/intel-sgx: add option for Intel SGX DCAP compatibility
The Intel SGX DCAP driver makes the SGX application enclave device and
the SGX provisioning enclave available below the path `/dev/sgx/`. Since
Linux 5.11, a derivation of the DCAP driver is part of the kernel and
available through the X86_SGX config option; NixOS enables this option
by default.

In contrast to the out-of-tree DCAP driver, the in-tree SGX driver uses
a flat hierarchy for the SGX devices resulting in the paths
`/dev/sgx_enclave` for the application enclave device and
`/dev/sgx_provison` for the provisioning enclave device.

As of this commit, even the latest version of the Intel SGX PSW
libraries still tries to open the (legacy) DCAP paths only. This means
that SGX software currently cannot find the required SGX devices even if
the system actually supports SGX through the in-tree driver. Intel wants
to change this behavior in an upcoming release of intel/linux-sgx.

Having said that, SGX software assuming the SGX devices below
`/dev/sgx/` will prevail. Therefore, this commit introduces the NixOS
configuration option `hardware.cpu.intel.sgx.enableDcapCompat` which
creates the necessary symlinks to support existing SGX software. The
option defaults to true as it is currently the only way to support SGX
software. Also, enabling the SGX AESM service enables the option.

The permissions of the devices `/dev/sgx_enclave` and
`/dev/sgx_provison` remain the same, i.e., are not affected regardless
of having the new option enabled or not.
2022-01-11 14:02:16 +01:00
..
config users-groups service: add autoSubUidGidRange option 2022-01-09 09:43:55 +03:00
hardware nixos/intel-sgx: add option for Intel SGX DCAP compatibility 2022-01-11 14:02:16 +01:00
i18n/input-method nixos/documentation: split options doc build 2022-01-02 19:46:13 +01:00
installer Merge pull request #125451 from zhaofengli/qemu-riscv64-sd-image 2022-01-07 22:14:05 +01:00
misc nixos/documentation: fix docs cross build 2022-01-08 16:03:23 +01:00
profiles all-hardware: Add virtio_mmio module 2022-01-06 17:23:10 -08:00
programs Merge pull request #149532 from pennae/split-docs-build 2022-01-04 22:33:23 +01:00
security Merge pull request #152594 from ju1m/apparmor 2021-12-31 15:09:52 +01:00
services nixos/intel-sgx: add option for Intel SGX DCAP compatibility 2022-01-11 14:02:16 +01:00
system Merge pull request #125451 from zhaofengli/qemu-riscv64-sd-image 2022-01-07 22:14:05 +01:00
tasks Merge pull request #148637 from hexagonal-sun/network/gre-tap-tun 2022-01-01 17:04:29 +00:00
testing nixos/lib/qemu-flags: rename to qemu-common 2021-09-18 16:58:16 +02:00
virtualisation nixos/make-options-doc: turn relatedPackages into links 2022-01-02 19:46:13 +01:00
module-list.nix Merge pull request #153987 from jakubgs/init/mtr-exporter 2022-01-09 22:34:30 -05:00
rename.nix couchpotato, nixos/couchpotato: remove 2022-01-02 13:38:11 +01:00