Linux-Sgx Archive on lore.kernel.org
 help / color / Atom feed
* [PATCH] x86/sgx: Remove INTEL_SGX_DRIVER
@ 2019-08-22  1:36 Jarkko Sakkinen
  0 siblings, 0 replies; only message in thread
From: Jarkko Sakkinen @ 2019-08-22  1:36 UTC (permalink / raw)
  To: linux-sgx; +Cc: Jarkko Sakkinen, Sean Christopherson

As there are the SGX driver is the only SGX core user, remove
INTEL_SGX_DRIVER config flag for now. When there are >= 2 in-kernel
users, we can consider adding it back and make INTEL_SGX config depend
on disjunction of its clients config flags.

Reported-by: Sean Christopherson <sean.j.christopherson@intel.com>
Signed-off-by: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
---
 arch/x86/Kconfig                        | 14 --------------
 arch/x86/kernel/cpu/sgx/Makefile        |  2 +-
 arch/x86/kernel/cpu/sgx/driver/Makefile |  4 +---
 arch/x86/kernel/cpu/sgx/main.c          |  8 +++-----
 4 files changed, 5 insertions(+), 23 deletions(-)

diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
index f53cfc8d03e8..eac03f448b59 100644
--- a/arch/x86/Kconfig
+++ b/arch/x86/Kconfig
@@ -1948,20 +1948,6 @@ config INTEL_SGX
 
 	  If unsure, say N.
 
-config INTEL_SGX_DRIVER
-	bool "Intel(R) SGX Driver"
-	depends on X86_64 && CPU_SUP_INTEL && INTEL_SGX
-	select CRYPTO
-	select CRYPTO_SHA256
-	---help---
-	  This options enables the kernel SGX driver that allows to construct
-	  enclaves to the process memory by using a device node (by default
-	  /dev/sgx) and a set of ioctls. The driver requires that the MSRs
-	  specifying the public key hash for the launch enclave are writable so
-	  that Linux has the full control to run enclaves.
-
-	  If unsure, say N.
-
 config EFI
 	bool "EFI runtime service support"
 	depends on ACPI
diff --git a/arch/x86/kernel/cpu/sgx/Makefile b/arch/x86/kernel/cpu/sgx/Makefile
index e5d1e862969c..debde5345355 100644
--- a/arch/x86/kernel/cpu/sgx/Makefile
+++ b/arch/x86/kernel/cpu/sgx/Makefile
@@ -1,2 +1,2 @@
 obj-y += encl.o encls.o main.o reclaim.o
-obj-$(CONFIG_INTEL_SGX_DRIVER) += driver/
+obj-y += driver/
diff --git a/arch/x86/kernel/cpu/sgx/driver/Makefile b/arch/x86/kernel/cpu/sgx/driver/Makefile
index 01ebbbb06a47..9fd98c6ee61c 100644
--- a/arch/x86/kernel/cpu/sgx/driver/Makefile
+++ b/arch/x86/kernel/cpu/sgx/driver/Makefile
@@ -1,3 +1 @@
-obj-$(CONFIG_INTEL_SGX_DRIVER) += sgx.o
-sgx-$(CONFIG_INTEL_SGX_DRIVER) += ioctl.o
-sgx-$(CONFIG_INTEL_SGX_DRIVER) += main.o
+obj-y = ioctl.o main.o
diff --git a/arch/x86/kernel/cpu/sgx/main.c b/arch/x86/kernel/cpu/sgx/main.c
index e919e9ba5292..f790a03571c5 100644
--- a/arch/x86/kernel/cpu/sgx/main.c
+++ b/arch/x86/kernel/cpu/sgx/main.c
@@ -344,11 +344,9 @@ static __init int sgx_init(void)
 	if (ret)
 		goto err_page_cache;
 
-	if (IS_ENABLED(CONFIG_INTEL_SGX_DRIVER)) {
-		ret = sgx_drv_init();
-		if (ret)
-			goto err_kthread;
-	}
+	ret = sgx_drv_init();
+	if (ret)
+		goto err_kthread;
 
 	return 0;
 
-- 
2.20.1


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, back to index

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-08-22  1:36 [PATCH] x86/sgx: Remove INTEL_SGX_DRIVER Jarkko Sakkinen

Linux-Sgx Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-sgx/0 linux-sgx/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-sgx linux-sgx/ https://lore.kernel.org/linux-sgx \
		linux-sgx@vger.kernel.org linux-sgx@archiver.kernel.org
	public-inbox-index linux-sgx


Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-sgx


AGPL code for this site: git clone https://public-inbox.org/ public-inbox