linux-crypto.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/3] hwrng: cctrng kconfig updates
@ 2020-04-27  9:49 Hadar Gat
  2020-04-27  9:49 ` [PATCH v2 1/3] hwrng: cctrng - Add dependency on OF Hadar Gat
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Hadar Gat @ 2020-04-27  9:49 UTC (permalink / raw)
  To: Matt Mackall, Herbert Xu, Arnd Bergmann, Greg Kroah-Hartman,
	Hadar Gat, Krzysztof Kozlowski, Stefan Wahren, Zaibo Xu,
	Tomer Maimon, Randy Dunlap
  Cc: linux-crypto, linux-kernel, Gilad Ben-Yossef, Ofir Drang

Some fixes in Kconfig for cctrng:
 + add missing dependency on OF
 + change default to 'n'
 + improve inaccurate help description

v2 changes:
  + remove unneeded depends on HW_RANDOM.
  + remove unneeded line 'default n' in order to follow the convention.
  + in help description changed to: If unsure, say 'N'

Hadar Gat (3):
  hwrng: cctrng - Add dependency on OF
  hwrng: cctrng - change default to n
  hwrng: cctrng - update help description

 drivers/char/hw_random/Kconfig | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

-- 
2.7.4


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH v2 1/3] hwrng: cctrng - Add dependency on OF
  2020-04-27  9:49 [PATCH v2 0/3] hwrng: cctrng kconfig updates Hadar Gat
@ 2020-04-27  9:49 ` Hadar Gat
  2020-04-27 10:28   ` Herbert Xu
  2020-04-27  9:49 ` [PATCH v2 2/3] hwrng: cctrng - change default to n Hadar Gat
  2020-04-27  9:49 ` [PATCH v2 3/3] hwrng: cctrng - update help description Hadar Gat
  2 siblings, 1 reply; 6+ messages in thread
From: Hadar Gat @ 2020-04-27  9:49 UTC (permalink / raw)
  To: Matt Mackall, Herbert Xu, Arnd Bergmann, Greg Kroah-Hartman,
	Hadar Gat, Krzysztof Kozlowski, Stefan Wahren, Zaibo Xu,
	Tomer Maimon, Randy Dunlap
  Cc: linux-crypto, linux-kernel, Gilad Ben-Yossef, Ofir Drang

The cctrng is unusable on non-DT systems so we should depend
on it.

Signed-off-by: Hadar Gat <hadar.gat@arm.com>
---
 drivers/char/hw_random/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/char/hw_random/Kconfig b/drivers/char/hw_random/Kconfig
index 0c99735..df2d001 100644
--- a/drivers/char/hw_random/Kconfig
+++ b/drivers/char/hw_random/Kconfig
@@ -476,7 +476,7 @@ config HW_RANDOM_KEYSTONE
 
 config HW_RANDOM_CCTRNG
 	tristate "Arm CryptoCell True Random Number Generator support"
-	depends on HAS_IOMEM
+	depends on HAS_IOMEM & OF
 	default HW_RANDOM
 	help
 	  This driver provides support for the True Random Number
-- 
2.7.4


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH v2 2/3] hwrng: cctrng - change default to n
  2020-04-27  9:49 [PATCH v2 0/3] hwrng: cctrng kconfig updates Hadar Gat
  2020-04-27  9:49 ` [PATCH v2 1/3] hwrng: cctrng - Add dependency on OF Hadar Gat
@ 2020-04-27  9:49 ` Hadar Gat
  2020-04-27  9:49 ` [PATCH v2 3/3] hwrng: cctrng - update help description Hadar Gat
  2 siblings, 0 replies; 6+ messages in thread
From: Hadar Gat @ 2020-04-27  9:49 UTC (permalink / raw)
  To: Matt Mackall, Herbert Xu, Arnd Bergmann, Greg Kroah-Hartman,
	Hadar Gat, Krzysztof Kozlowski, Stefan Wahren, Zaibo Xu,
	Tomer Maimon, Randy Dunlap
  Cc: linux-crypto, linux-kernel, Gilad Ben-Yossef, Ofir Drang

For many users, the Arm CryptoCell HW is not available, so the
default for HW_RANDOM_CCTRNG should to n.
Remove the line to follow the convention - 'n' is the default anyway
so no need to state it explicitly.

Signed-off-by: Hadar Gat <hadar.gat@arm.com>
---
 drivers/char/hw_random/Kconfig | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/char/hw_random/Kconfig b/drivers/char/hw_random/Kconfig
index df2d001..fc8bb31 100644
--- a/drivers/char/hw_random/Kconfig
+++ b/drivers/char/hw_random/Kconfig
@@ -477,7 +477,6 @@ config HW_RANDOM_KEYSTONE
 config HW_RANDOM_CCTRNG
 	tristate "Arm CryptoCell True Random Number Generator support"
 	depends on HAS_IOMEM & OF
-	default HW_RANDOM
 	help
 	  This driver provides support for the True Random Number
 	  Generator available in Arm TrustZone CryptoCell.
-- 
2.7.4


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH v2 3/3] hwrng: cctrng - update help description
  2020-04-27  9:49 [PATCH v2 0/3] hwrng: cctrng kconfig updates Hadar Gat
  2020-04-27  9:49 ` [PATCH v2 1/3] hwrng: cctrng - Add dependency on OF Hadar Gat
  2020-04-27  9:49 ` [PATCH v2 2/3] hwrng: cctrng - change default to n Hadar Gat
@ 2020-04-27  9:49 ` Hadar Gat
  2 siblings, 0 replies; 6+ messages in thread
From: Hadar Gat @ 2020-04-27  9:49 UTC (permalink / raw)
  To: Matt Mackall, Herbert Xu, Arnd Bergmann, Greg Kroah-Hartman,
	Hadar Gat, Krzysztof Kozlowski, Stefan Wahren, Zaibo Xu,
	Tomer Maimon, Randy Dunlap
  Cc: linux-crypto, linux-kernel, Gilad Ben-Yossef, Ofir Drang

Improved the HW_RANDOM_CCTRNG help description.

Signed-off-by: Hadar Gat <hadar.gat@arm.com>
---
 drivers/char/hw_random/Kconfig | 13 +++++++------
 1 file changed, 7 insertions(+), 6 deletions(-)

diff --git a/drivers/char/hw_random/Kconfig b/drivers/char/hw_random/Kconfig
index fc8bb31..d53470d 100644
--- a/drivers/char/hw_random/Kconfig
+++ b/drivers/char/hw_random/Kconfig
@@ -478,13 +478,14 @@ config HW_RANDOM_CCTRNG
 	tristate "Arm CryptoCell True Random Number Generator support"
 	depends on HAS_IOMEM & OF
 	help
-	  This driver provides support for the True Random Number
-	  Generator available in Arm TrustZone CryptoCell.
-
-	  To compile this driver as a module, choose M here: the module
+	  Say 'Y' to enable the True Random Number Generator driver for the
+	  Arm TrustZone CryptoCell family of processors.
+	  Currently the CryptoCell 713 and 703 are supported.
+	  The driver is supported only in SoC where Trusted Execution
+	  Environment is not used.
+	  Choose 'M' to compile this driver as a module. The module
 	  will be called cctrng.
-
-	  If unsure, say Y.
+	  If unsure, say 'N'.
 
 endif # HW_RANDOM
 
-- 
2.7.4


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH v2 1/3] hwrng: cctrng - Add dependency on OF
  2020-04-27  9:49 ` [PATCH v2 1/3] hwrng: cctrng - Add dependency on OF Hadar Gat
@ 2020-04-27 10:28   ` Herbert Xu
  2020-04-27 11:14     ` Hadar Gat
  0 siblings, 1 reply; 6+ messages in thread
From: Herbert Xu @ 2020-04-27 10:28 UTC (permalink / raw)
  To: Hadar Gat
  Cc: Matt Mackall, Arnd Bergmann, Greg Kroah-Hartman,
	Krzysztof Kozlowski, Stefan Wahren, Zaibo Xu, Tomer Maimon,
	Randy Dunlap, linux-crypto, linux-kernel, Gilad Ben-Yossef,
	Ofir Drang

On Mon, Apr 27, 2020 at 12:49:04PM +0300, Hadar Gat wrote:
> The cctrng is unusable on non-DT systems so we should depend
> on it.
> 
> Signed-off-by: Hadar Gat <hadar.gat@arm.com>
> ---
>  drivers/char/hw_random/Kconfig | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

This breaks compile testing for me so nack.
-- 
Email: Herbert Xu <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

^ permalink raw reply	[flat|nested] 6+ messages in thread

* RE: [PATCH v2 1/3] hwrng: cctrng - Add dependency on OF
  2020-04-27 10:28   ` Herbert Xu
@ 2020-04-27 11:14     ` Hadar Gat
  0 siblings, 0 replies; 6+ messages in thread
From: Hadar Gat @ 2020-04-27 11:14 UTC (permalink / raw)
  To: Herbert Xu
  Cc: Matt Mackall, Arnd Bergmann, Greg Kroah-Hartman,
	Krzysztof Kozlowski, Stefan Wahren, Zaibo Xu, Tomer Maimon,
	Randy Dunlap, linux-crypto, linux-kernel, Gilad Ben-Yossef,
	Ofir Drang, nd


> -----Original Message-----
> From: linux-crypto-owner@vger.kernel.org <linux-crypto-
> owner@vger.kernel.org> On Behalf Of Herbert Xu
> 
> On Mon, Apr 27, 2020 at 12:49:04PM +0300, Hadar Gat wrote:
> > The cctrng is unusable on non-DT systems so we should depend on it.
> >
> > Signed-off-by: Hadar Gat <hadar.gat@arm.com>
> > ---
> >  drivers/char/hw_random/Kconfig | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> This breaks compile testing for me so nack.

Oops.. Fixed this in v3.

Hadar

> --
> Email: Herbert Xu <herbert@gondor.apana.org.au> Home Page:
> http://gondor.apana.org.au/~herbert/
> PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2020-04-27 11:14 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-27  9:49 [PATCH v2 0/3] hwrng: cctrng kconfig updates Hadar Gat
2020-04-27  9:49 ` [PATCH v2 1/3] hwrng: cctrng - Add dependency on OF Hadar Gat
2020-04-27 10:28   ` Herbert Xu
2020-04-27 11:14     ` Hadar Gat
2020-04-27  9:49 ` [PATCH v2 2/3] hwrng: cctrng - change default to n Hadar Gat
2020-04-27  9:49 ` [PATCH v2 3/3] hwrng: cctrng - update help description Hadar Gat

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).