From: Peter Georg <peter.georg(a)physik.uni-regensburg.de>
x86/sgx: mark tech preview
Bugzilla:
http://bugzilla.redhat.com/2025959
Upstream Status: RHEL only
Note: Wrapped with #ifdef CONFIG_RHEL_DIFFERENCES
commit 3f0640a134b32ffbbc504b18b8560799eec4f2e8
Author: Wander Lairson Costa <wander(a)redhat.com>
Date: Wed Nov 24 14:16:38 2021 -0300
x86/sgx: mark tech preview
Bugzilla:
http://bugzilla.redhat.com/2025959
Upstream Status: RHEL only
commit ca44d5d42c6076963ba2c391f2636a9adc4f53b8
Author: Vladis Dronov <vdronov(a)redhat.com>
Date: Fri Feb 5 11:20:39 2021 -0500
[x86] x86/sgx: mark tech preview
Message-id: <20210205112040.9144-39-vdronov(a)redhat.com>
Patchwork-id: 352798
Patchwork-instance: patchwork
O-Subject: [RHEL8.4 BZ1660337 v2 PATCH 38/39] x86/sgx: mark tech preview
Bugzilla: 1660337
RH-Acked-by: Rafael Aquini <aquini(a)redhat.com>
RH-Acked-by: Waiman Long <longman(a)redhat.com>
RH-Acked-by: Chris von Recklinghausen <crecklin(a)redhat.com>
RH-Acked-by: Josh Poimboeuf <jpoimboe(a)redhat.com>
Bugzilla:
https://bugzilla.redhat.com/show_bug.cgi?id=1660337
Upstream Status: RHEL only
SGX enclaves must be built before they can be executed (entered). The first
step in building an enclave is opening the /dev/sgx_enclave device. Make sure
to taint the kernel with TAINT_TECH_PREVIEW at the first attempt to open it.
Signed-off-by: Vladis Dronov <vdronov(a)redhat.com>
Signed-off-by: Jan Stancek <jstancek(a)redhat.com>
Signed-off-by: Wander Lairson Costa <wander(a)redhat.com>
Signed-off-by: Peter Georg <peter.georg(a)physik.uni-regensburg.de>
diff --git a/arch/x86/kernel/cpu/sgx/driver.c b/arch/x86/kernel/cpu/sgx/driver.c
index blahblah..blahblah 100644
--- a/arch/x86/kernel/cpu/sgx/driver.c
+++ b/arch/x86/kernel/cpu/sgx/driver.c
@@ -36,6 +36,14 @@ static int sgx_open(struct inode *inode, struct file *file)
return ret;
}
+#ifdef CONFIG_RHEL_DIFFERENCES
+ static bool warned = false;
+ if (!warned) {
+ mark_tech_preview("Intel Software Guard Extensions (SGX)", NULL);
+ warned = true;
+ }
+#endif
+
file->private_data = encl;
return 0;
--
https://gitlab.com/cki-project/kernel-ark/-/merge_requests/1610