crypto: hw_random - Add new Exynos RNG driver
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v5 Latest2 patches 1 replyIn review
- v42 patches 3 repliesSuperseded
- v33 patches 15 repliesSuperseded
Earlier versions · 2
| Version | Posted | Patches | Replies | Status |
|---|---|---|---|---|
| v2 | 3 patches | 3 replies | Superseded | |
| v1 | 3 patches | 12 replies | Superseded |
Changes in v5 from the cover letter
=================
1. Patch 2/2: Use "stdrng" name, as suggested by Herbert.
2. Patch 2/2: Add Bartlomiej's reviewed-by.
Patches in v5 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/2 | linux/kernel.h: Add ALIGN_DOWN macroarch/ drivers/ include/ +1 more | +3 | 0 replies | |
| 2/2 | crypto: hw_random - Add new Exynos RNG driverMAINTAINERS drivers/ drivers/ +4 more | +413 | 0 replies |
Reviews trailers per patch
1 of 2 patches has a Reviewed-by or Acked-by.
| Patch | Stephan Müller | PrasannaKumar Muralidharan | Bartlomiej Zolnierkiewicz |
|---|---|---|---|
| 1/2 | |||
| 2/2 | R-b | R-b | R-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 3 reviewers.
Cover letter [PATCH v5 0/2] crypto: hw_random - Add new Exynos RNG driver
Hi,
This is a follow up of my questions around exynos-rng [1].
Changes since v4:
=================
1. Patch 2/2: Use "stdrng" name, as suggested by Herbert.
2. Patch 2/2: Add Bartlomiej's reviewed-by.
Changes since v3:
=================
1. New patch: 1/2 for ALIGN_DOWN macro. The change in metag architecture was not compiled. Please test it.
2. Dropped patches touching ARM defconfig as they are not changing and they pollute this submission.
3. Utilize all seed provided by kcapi (suggested by Stephan Müller).
4. Drop dev->ctx (suggested by PrasannaKumar Muralidharan).
5. Remove any printks from set_seed callback as this might be a way for unprivileged user to pollute the log (suggested by Stephan).
6. Minor cleanups: initialize 'read' variable in exynos_rng_reseed() for readability (it is not strictly required).
7. Add review tags from Stephen and PrasannaKumar.
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 (2):
linux/kernel.h: Add ALIGN_DOWN macro
crypto: hw_random - Add new Exynos RNG driver
MAINTAINERS | 8 + arch/metag/kernel/stacktrace.c | 2 - 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 | 389 ++++++++++++++++++++++++++++++++++++ drivers/gpu/drm/udl/udl_fb.c | 2 +- include/linux/kernel.h | 1 + include/video/udlfb.h | 2 +- 11 files changed, 416 insertions(+), 250 deletions(-) delete mode 100644 drivers/char/hw_random/exynos-rng.c create mode 100644 drivers/crypto/exynos-rng.c
Signature · 1 line
2.9.3