lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20180608070813.27263-1-sahil.malhotra@nxp.com>
Date:   Fri,  8 Jun 2018 12:38:13 +0530
From:   Sahil Malhotra <sahil.malhotra@....com>
To:     linux-kernel@...r.kernel.org
Cc:     Sahil Malhotra <sahil.malhotra@....com>,
        Jens Wiklander <jens.wiklander@...aro.org>
Subject: [PATCH] tee: optee: making OPTEE_SHM_NUM_PRIV_PAGES configurable via Kconfig

This change adds KCONFIG option to set number of pages out of
whole shared memory to be used for OP-TEE driver private data
structures.

Signed-off-by: Sahil Malhotra <sahil.malhotra@....com>
---
 drivers/tee/optee/Kconfig | 8 ++++++++
 drivers/tee/optee/core.c  | 2 +-
 2 files changed, 9 insertions(+), 1 deletion(-)

diff --git a/drivers/tee/optee/Kconfig b/drivers/tee/optee/Kconfig
index 524c7a80fde4..f425c960a5a2 100644
--- a/drivers/tee/optee/Kconfig
+++ b/drivers/tee/optee/Kconfig
@@ -12,3 +12,11 @@ config OPTEE_BENCHMARK
 	help
 	  This enables benchmarking feature in the OP-TEE Trusted
 	  Execution Environment (TEE) driver.
+
+config OPTEE_SHM_NUM_PRIV_PAGES
+	int "Private Shared Memory Pages"
+	default 1
+	depends on OPTEE
+	help
+	  This sets the number of private shared memory pages to be
+	  used by OP-TEE TEE driver.
diff --git a/drivers/tee/optee/core.c b/drivers/tee/optee/core.c
index 4a2c420d4fe4..8d3be6b1bb96 100644
--- a/drivers/tee/optee/core.c
+++ b/drivers/tee/optee/core.c
@@ -33,7 +33,7 @@
 
 #define DRIVER_NAME "optee"
 
-#define OPTEE_SHM_NUM_PRIV_PAGES	1
+#define OPTEE_SHM_NUM_PRIV_PAGES	CONFIG_OPTEE_SHM_NUM_PRIV_PAGES
 
 /**
  * optee_from_msg_param() - convert from OPTEE_MSG parameters to
-- 
2.17.0

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ