From: Krzysztof Kozlowski <krzk@kernel.org>
To: "Kukjin Kim" <kgene@kernel.org>,
"Javier Martinez Canillas" <javier@osg.samsung.com>,
"Matt Mackall" <mpm@selenic.com>,
"Herbert Xu" <herbert@gondor.apana.org.au>,
"David S. Miller" <davem@davemloft.net>,
linux-kernel@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
linux-samsung-soc@vger.kernel.org, linux-crypto@vger.kernel.org,
"Bartlomiej Zolnierkiewicz" <b.zolnierkie@samsung.com>,
"Stephan Müller" <smueller@chronox.de>
Cc: Arnd Bergmann <arnd@arndb.de>, Olof Johansson <olof@lixom.net>,
Krzysztof Kozlowski <krzk@kernel.org>
Subject: [PATCH v3 0/3] crypto: hw_random - Add new Exynos RNG driver
Date: Sat, 25 Mar 2017 19:26:51 +0300 [thread overview]
Message-ID: <20170325162654.3827-1-krzk@kernel.org> (raw)
Hi,
This is a follow up of my questions around exynos-rng [1].
Changes since v2:
=================
1. Do not re-use random numbers for re-seed (neither for system resume
nor for periodic re-seed). Instead the driver will just generate new
random numbers (suggested by Stephan Müller).
Suspend path tested with suspend-to-freeze, not real suspend. Testing
on Trats2 would be welcomed.
Changes since v1:
=================
1. Re-work the code for seeding after system resume, following suggestions
and review by Stephan Müller.
2. Re-seed itself from time to time (every 100 ms), suggested by Stephan
Müller.
3. Use a define for retries (Bartlomiej Zolnierkiewicz).
4. Add some docs.
Description:
============
The existing exynos-rng has many issues. The most important one is that
it is a pseudo RNG device but uses hw_random interface which does not allow
proper seeding.
The RNG module on Exynos4 requires seeding. On newer SoCs (like Exynos5420)
it can seed itself from a true RNG. Converting the existing driver
to use TRNG would effectively drop support for Exynos4 and break
compatibility with existing users.
Instead I decided to convert it to crypto API. In the future I hope
to add support for seeding from TRNG module.
Tested with app [2].
Patches are independent. I will take the defconfig changes (2/3 and 3/3)
through samsung-soc tree.
Best regards,
Krzysztof
[1] https://www.spinics.net/lists/arm-kernel/msg569641.html
[2] https://www.spinics.net/lists/arm-kernel/msg571184.html
Krzysztof Kozlowski (3):
crypto: hw_random - Add new Exynos RNG driver
ARM: exynos_defconfig: Enable Exynos RNG and user-space crypto API
ARM: multi_v7_defconfig: Enable Exynos RNG and user-space crypto API
MAINTAINERS | 8 +
arch/arm/configs/exynos_defconfig | 6 +
arch/arm/configs/multi_v7_defconfig | 6 +
drivers/char/hw_random/Kconfig | 14 --
drivers/char/hw_random/Makefile | 1 -
drivers/char/hw_random/exynos-rng.c | 231 ---------------------
drivers/crypto/Kconfig | 15 ++
drivers/crypto/Makefile | 1 +
drivers/crypto/exynos-rng.c | 390 ++++++++++++++++++++++++++++++++++++
9 files changed, 426 insertions(+), 246 deletions(-)
delete mode 100644 drivers/char/hw_random/exynos-rng.c
create mode 100644 drivers/crypto/exynos-rng.c
--
2.9.3
next reply other threads:[~2017-03-25 16:28 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-03-25 16:26 Krzysztof Kozlowski [this message]
2017-03-25 16:26 ` [PATCH v3 1/3] crypto: hw_random - Add new Exynos RNG driver Krzysztof Kozlowski
2017-03-26 15:20 ` PrasannaKumar Muralidharan
2017-03-26 16:01 ` Krzysztof Kozlowski
2017-03-26 16:05 ` Stephan Müller
2017-03-26 16:46 ` PrasannaKumar Muralidharan
2017-03-26 17:05 ` Stephan Müller
2017-03-26 18:09 ` Krzysztof Kozlowski
2017-03-26 17:11 ` Stephan Müller
2017-03-26 18:00 ` Krzysztof Kozlowski
2017-03-26 21:25 ` Stephan Müller
2017-03-27 4:23 ` PrasannaKumar Muralidharan
2017-03-27 13:53 ` Stephan Müller
2017-03-28 16:48 ` Krzysztof Kozlowski
2017-03-28 17:41 ` Stephan Müller
2017-03-28 17:43 ` Krzysztof Kozlowski
2017-03-25 16:26 ` [PATCH v3 2/3] ARM: exynos_defconfig: Enable Exynos RNG and user-space crypto API Krzysztof Kozlowski
2017-03-25 16:26 ` [PATCH v3 3/3] ARM: multi_v7_defconfig: " Krzysztof Kozlowski
2017-03-25 16:32 ` [PATCH v3 0/3] crypto: hw_random - Add new Exynos RNG driver Stephan Müller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170325162654.3827-1-krzk@kernel.org \
--to=krzk@kernel.org \
--cc=arnd@arndb.de \
--cc=b.zolnierkie@samsung.com \
--cc=davem@davemloft.net \
--cc=herbert@gondor.apana.org.au \
--cc=javier@osg.samsung.com \
--cc=kgene@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-crypto@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-samsung-soc@vger.kernel.org \
--cc=mpm@selenic.com \
--cc=olof@lixom.net \
--cc=smueller@chronox.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).