[v2,00/34] crypto: ccree - miscellaneous fixes and improvements
mbox series

Message ID 20200211181928.15178-1-geert+renesas@glider.be
Headers show
Series
  • crypto: ccree - miscellaneous fixes and improvements
Related show

Message

Geert Uytterhoeven Feb. 11, 2020, 6:18 p.m. UTC
Hi all,

This series contains several fixes, cleanups, and other improvements for
the ARM TrustZone CryptoCell driver.

The first 3 patches have been sent before:
  - [PATCH 0/2] Fix debugfs register access while suspended[1],
  - [PATCH] [RFC] crypto: ccree - fix retry handling in
    cc_send_sync_request()[2.

This is based on v5.6-rc1, with the following fixes from Gilad applied:
  - [PATCH 0/4] crypto: ccree - fixes[3],
  - [PATCH] crypto: ccree - dec auth tag size from cryptlen map[4].

This has been tested on R-Car H3 ES2.0.
To ease testing, I have pushed this series and its dependencies to the
topic/ccree-misc-v2  branch of my renesas-drivers repository at
git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-drivers.git.

Thanks for your comments!

[1] https://lore.kernel.org/r/20200124132957.15769-1-geert+renesas@glider.be/
[2] https://lore.kernel.org/r/20200128190913.23086-1-geert+renesas@glider.be/
[3] https://lore.kernel.org/r/20200129143757.680-1-gilad@benyossef.com/
[4] https://lore.kernel.org/r/20200202161914.9551-1-gilad@benyossef.com/

Geert Uytterhoeven (34):
  debugfs: regset32: Add Runtime PM support
  crypto: ccree - fix debugfs register access while suspended
  crypto: ccree - fix retry handling in cc_send_sync_request()
  crypto: ccree - remove unneeded casts
  crypto: ccree - swap SHA384 and SHA512 larval hashes at build time
  crypto: ccree - drop duplicated error message on SRAM exhaustion
  crypto: ccree - remove empty cc_sram_mgr_fini()
  crypto: ccree - clean up clock handling
  crypto: ccree - make mlli_params.mlli_virt_addr void *
  crypto: ccree - use existing helpers to split 64-bit addresses
  crypto: ccree - defer larval_digest_addr init until needed
  crypto: ccree - remove bogus paragraph about freeing SRAM
  crypto: ccree - use u32 for SRAM addresses
  crypto: ccree - simplify Runtime PM handling
  crypto: ccree - use of_device_get_match_data()
  crypto: ccree - remove cc_pm_is_dev_suspended() wrapper
  crypto: ccree - make cc_pm_{suspend,resume}() static
  crypto: ccree - remove struct cc_sram_ctx
  crypto: ccree - remove struct cc_debugfs_ctx
  crypto: ccree - remove struct buff_mgr_handle
  crypto: ccree - remove struct cc_cipher_handle
  crypto: ccree - extract cc_init_copy_sram()
  crypto: ccree - remove bogus kerneldoc markers
  crypto: ccree - improve kerneldoc in cc_hw_queue_defs.h
  crypto: ccree - improve kerneldoc in cc_buffer_mgr.c
  crypto: ccree - improve kerneldoc in cc_hash.[ch]
  crypto: ccree - improve kerneldoc in cc_request_mgr.[ch]
  crypto: ccree - improve kerneldoc in cc_sram_mgr.[ch]
  crypto: ccree - spelling s/Crytpcell/Cryptocell/
  crypto: ccree - grammar s/not room/no room/
  crypto: ccree - use existing dev helper in init_cc_resources()
  crypto: ccree - use devm_k[mz]alloc() for AEAD data
  crypto: ccree - use devm_k[mz]alloc() for cipher data
  crypto: ccree - use devm_kzalloc() for hash data

 drivers/crypto/ccree/cc_aead.c          |  61 +++---
 drivers/crypto/ccree/cc_buffer_mgr.c    |  66 +++---
 drivers/crypto/ccree/cc_buffer_mgr.h    |   4 +-
 drivers/crypto/ccree/cc_cipher.c        |  61 ++----
 drivers/crypto/ccree/cc_debugfs.c       |  29 +--
 drivers/crypto/ccree/cc_driver.c        | 127 +++++-------
 drivers/crypto/ccree/cc_driver.h        |  13 +-
 drivers/crypto/ccree/cc_hash.c          | 225 +++++++++------------
 drivers/crypto/ccree/cc_hash.h          |  31 ++-
 drivers/crypto/ccree/cc_hw_queue_defs.h | 255 ++++++++++++------------
 drivers/crypto/ccree/cc_pm.c            |  60 +-----
 drivers/crypto/ccree/cc_pm.h            |  21 --
 drivers/crypto/ccree/cc_request_mgr.c   |  47 +++--
 drivers/crypto/ccree/cc_request_mgr.h   |  19 +-
 drivers/crypto/ccree/cc_sram_mgr.c      |  78 +++-----
 drivers/crypto/ccree/cc_sram_mgr.h      |  45 ++---
 fs/debugfs/file.c                       |   8 +
 include/linux/debugfs.h                 |   1 +
 18 files changed, 456 insertions(+), 695 deletions(-)

Comments

Geert Uytterhoeven Feb. 13, 2020, 7:47 a.m. UTC | #1
Hi Gilad,

On Thu, Feb 13, 2020 at 7:46 AM Gilad Ben-Yossef <gilad@benyossef.com> wrote:
> On Tuesday, February 11, 2020, Geert Uytterhoeven <geert+renesas@glider.be> wrote:
>> This series contains several fixes, cleanups, and other improvements for
>> the ARM TrustZone CryptoCell driver.
>
>  Thank you so much for doing this Geert.
>
> The whole series looks wonderful. It does not only makes the driver better, it has made me a better programmer - I'm not ashamed to say I've learned some new things about the kernel API  from this series...
>
> I am currently out of the office until mid next week and away from my testing lab.
>
> I'd like to delay formal ACK until I return and run a regression test suite using some of the newer revisions of the hardware which the driver also support, just in case, although I don't forsee any issues. I hope that is ok.

Should be OK, we're only at rc1.
I'm looking forward to the test results on newer hardware revision/
Thanks!

Gr{oetje,eeting}s,

                        Geert
Gilad Ben-Yossef Feb. 19, 2020, 3:41 p.m. UTC | #2
On Thu, Feb 13, 2020 at 9:47 AM Geert Uytterhoeven <geert@linux-m68k.org> wrote:
>
> Hi Gilad,
>
> On Thu, Feb 13, 2020 at 7:46 AM Gilad Ben-Yossef <gilad@benyossef.com> wrote:
> > On Tuesday, February 11, 2020, Geert Uytterhoeven <geert+renesas@glider.be> wrote:
> >> This series contains several fixes, cleanups, and other improvements for
> >> the ARM TrustZone CryptoCell driver.
> >
> >  Thank you so much for doing this Geert.
> >
> > The whole series looks wonderful. It does not only makes the driver better, it has made me a better programmer - I'm not ashamed to say I've learned some new things about the kernel API  from this series...
> >
> > I am currently out of the office until mid next week and away from my testing lab.
> >
> > I'd like to delay formal ACK until I return and run a regression test suite using some of the newer revisions of the hardware which the driver also support, just in case, although I don't forsee any issues. I hope that is ok.
>
> Should be OK, we're only at rc1.
> I'm looking forward to the test results on newer hardware revision/


The smoke test on the most recent HW looks OK, I've submitted the
changes to a longer  regression test suite on multiple HW and it is
running.
I hope to have a final result and an ACK by tomorrow.

Thanks,
Gilad
Gilad Ben-Yossef Feb. 20, 2020, 12:29 p.m. UTC | #3
On Tue, Feb 11, 2020 at 8:19 PM Geert Uytterhoeven
<geert+renesas@glider.be> wrote:
>
>         Hi all,
>
> This series contains several fixes, cleanups, and other improvements for
> the ARM TrustZone CryptoCell driver.
>
> The first 3 patches have been sent before:
>   - [PATCH 0/2] Fix debugfs register access while suspended[1],
>   - [PATCH] [RFC] crypto: ccree - fix retry handling in
>     cc_send_sync_request()[2.
>
> This is based on v5.6-rc1, with the following fixes from Gilad applied:
>   - [PATCH 0/4] crypto: ccree - fixes[3],
>   - [PATCH] crypto: ccree - dec auth tag size from cryptlen map[4].
>
> This has been tested on R-Car H3 ES2.0.
> To ease testing, I have pushed this series and its dependencies to the
> topic/ccree-misc-v2  branch of my renesas-drivers repository at
> git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-drivers.git.
>
> Thanks for your comments!
>
> [1] https://lore.kernel.org/r/20200124132957.15769-1-geert+renesas@glider.be/
> [2] https://lore.kernel.org/r/20200128190913.23086-1-geert+renesas@glider.be/
> [3] https://lore.kernel.org/r/20200129143757.680-1-gilad@benyossef.com/
> [4] https://lore.kernel.org/r/20200202161914.9551-1-gilad@benyossef.com/
>

OK, looks fine and all relevant tests pass on the newer hardware on
all platforms.

Acked-by: Gilad Ben-Yossef <gilad@benyossef.com>

Thanks,
Gilad

> Geert Uytterhoeven (34):
>   debugfs: regset32: Add Runtime PM support
>   crypto: ccree - fix debugfs register access while suspended
>   crypto: ccree - fix retry handling in cc_send_sync_request()
>   crypto: ccree - remove unneeded casts
>   crypto: ccree - swap SHA384 and SHA512 larval hashes at build time
>   crypto: ccree - drop duplicated error message on SRAM exhaustion
>   crypto: ccree - remove empty cc_sram_mgr_fini()
>   crypto: ccree - clean up clock handling
>   crypto: ccree - make mlli_params.mlli_virt_addr void *
>   crypto: ccree - use existing helpers to split 64-bit addresses
>   crypto: ccree - defer larval_digest_addr init until needed
>   crypto: ccree - remove bogus paragraph about freeing SRAM
>   crypto: ccree - use u32 for SRAM addresses
>   crypto: ccree - simplify Runtime PM handling
>   crypto: ccree - use of_device_get_match_data()
>   crypto: ccree - remove cc_pm_is_dev_suspended() wrapper
>   crypto: ccree - make cc_pm_{suspend,resume}() static
>   crypto: ccree - remove struct cc_sram_ctx
>   crypto: ccree - remove struct cc_debugfs_ctx
>   crypto: ccree - remove struct buff_mgr_handle
>   crypto: ccree - remove struct cc_cipher_handle
>   crypto: ccree - extract cc_init_copy_sram()
>   crypto: ccree - remove bogus kerneldoc markers
>   crypto: ccree - improve kerneldoc in cc_hw_queue_defs.h
>   crypto: ccree - improve kerneldoc in cc_buffer_mgr.c
>   crypto: ccree - improve kerneldoc in cc_hash.[ch]
>   crypto: ccree - improve kerneldoc in cc_request_mgr.[ch]
>   crypto: ccree - improve kerneldoc in cc_sram_mgr.[ch]
>   crypto: ccree - spelling s/Crytpcell/Cryptocell/
>   crypto: ccree - grammar s/not room/no room/
>   crypto: ccree - use existing dev helper in init_cc_resources()
>   crypto: ccree - use devm_k[mz]alloc() for AEAD data
>   crypto: ccree - use devm_k[mz]alloc() for cipher data
>   crypto: ccree - use devm_kzalloc() for hash data
>
>  drivers/crypto/ccree/cc_aead.c          |  61 +++---
>  drivers/crypto/ccree/cc_buffer_mgr.c    |  66 +++---
>  drivers/crypto/ccree/cc_buffer_mgr.h    |   4 +-
>  drivers/crypto/ccree/cc_cipher.c        |  61 ++----
>  drivers/crypto/ccree/cc_debugfs.c       |  29 +--
>  drivers/crypto/ccree/cc_driver.c        | 127 +++++-------
>  drivers/crypto/ccree/cc_driver.h        |  13 +-
>  drivers/crypto/ccree/cc_hash.c          | 225 +++++++++------------
>  drivers/crypto/ccree/cc_hash.h          |  31 ++-
>  drivers/crypto/ccree/cc_hw_queue_defs.h | 255 ++++++++++++------------
>  drivers/crypto/ccree/cc_pm.c            |  60 +-----
>  drivers/crypto/ccree/cc_pm.h            |  21 --
>  drivers/crypto/ccree/cc_request_mgr.c   |  47 +++--
>  drivers/crypto/ccree/cc_request_mgr.h   |  19 +-
>  drivers/crypto/ccree/cc_sram_mgr.c      |  78 +++-----
>  drivers/crypto/ccree/cc_sram_mgr.h      |  45 ++---
>  fs/debugfs/file.c                       |   8 +
>  include/linux/debugfs.h                 |   1 +
>  18 files changed, 456 insertions(+), 695 deletions(-)
>
> --
> 2.17.1
>
> Gr{oetje,eeting}s,
>
>                                                 Geert
>
> --
> Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
>
> In personal conversations with technical people, I call myself a hacker. But
> when I'm talking to journalists I just say "programmer" or something like that.
>                                                             -- Linus Torvalds
Herbert Xu Feb. 22, 2020, 1:42 a.m. UTC | #4
On Tue, Feb 11, 2020 at 07:18:54PM +0100, Geert Uytterhoeven wrote:
> 	Hi all,
> 
> This series contains several fixes, cleanups, and other improvements for
> the ARM TrustZone CryptoCell driver.
> 
> The first 3 patches have been sent before:
>   - [PATCH 0/2] Fix debugfs register access while suspended[1],
>   - [PATCH] [RFC] crypto: ccree - fix retry handling in
>     cc_send_sync_request()[2.
> 
> This is based on v5.6-rc1, with the following fixes from Gilad applied:
>   - [PATCH 0/4] crypto: ccree - fixes[3],
>   - [PATCH] crypto: ccree - dec auth tag size from cryptlen map[4].
> 
> This has been tested on R-Car H3 ES2.0.
> To ease testing, I have pushed this series and its dependencies to the
> topic/ccree-misc-v2  branch of my renesas-drivers repository at
> git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-drivers.git.
> 
> Thanks for your comments!
> 
> [1] https://lore.kernel.org/r/20200124132957.15769-1-geert+renesas@glider.be/
> [2] https://lore.kernel.org/r/20200128190913.23086-1-geert+renesas@glider.be/
> [3] https://lore.kernel.org/r/20200129143757.680-1-gilad@benyossef.com/
> [4] https://lore.kernel.org/r/20200202161914.9551-1-gilad@benyossef.com/
> 
> Geert Uytterhoeven (34):
>   debugfs: regset32: Add Runtime PM support
>   crypto: ccree - fix debugfs register access while suspended
>   crypto: ccree - fix retry handling in cc_send_sync_request()
>   crypto: ccree - remove unneeded casts
>   crypto: ccree - swap SHA384 and SHA512 larval hashes at build time
>   crypto: ccree - drop duplicated error message on SRAM exhaustion
>   crypto: ccree - remove empty cc_sram_mgr_fini()
>   crypto: ccree - clean up clock handling
>   crypto: ccree - make mlli_params.mlli_virt_addr void *
>   crypto: ccree - use existing helpers to split 64-bit addresses
>   crypto: ccree - defer larval_digest_addr init until needed
>   crypto: ccree - remove bogus paragraph about freeing SRAM
>   crypto: ccree - use u32 for SRAM addresses
>   crypto: ccree - simplify Runtime PM handling
>   crypto: ccree - use of_device_get_match_data()
>   crypto: ccree - remove cc_pm_is_dev_suspended() wrapper
>   crypto: ccree - make cc_pm_{suspend,resume}() static
>   crypto: ccree - remove struct cc_sram_ctx
>   crypto: ccree - remove struct cc_debugfs_ctx
>   crypto: ccree - remove struct buff_mgr_handle
>   crypto: ccree - remove struct cc_cipher_handle
>   crypto: ccree - extract cc_init_copy_sram()
>   crypto: ccree - remove bogus kerneldoc markers
>   crypto: ccree - improve kerneldoc in cc_hw_queue_defs.h
>   crypto: ccree - improve kerneldoc in cc_buffer_mgr.c
>   crypto: ccree - improve kerneldoc in cc_hash.[ch]
>   crypto: ccree - improve kerneldoc in cc_request_mgr.[ch]
>   crypto: ccree - improve kerneldoc in cc_sram_mgr.[ch]
>   crypto: ccree - spelling s/Crytpcell/Cryptocell/
>   crypto: ccree - grammar s/not room/no room/
>   crypto: ccree - use existing dev helper in init_cc_resources()
>   crypto: ccree - use devm_k[mz]alloc() for AEAD data
>   crypto: ccree - use devm_k[mz]alloc() for cipher data
>   crypto: ccree - use devm_kzalloc() for hash data
> 
>  drivers/crypto/ccree/cc_aead.c          |  61 +++---
>  drivers/crypto/ccree/cc_buffer_mgr.c    |  66 +++---
>  drivers/crypto/ccree/cc_buffer_mgr.h    |   4 +-
>  drivers/crypto/ccree/cc_cipher.c        |  61 ++----
>  drivers/crypto/ccree/cc_debugfs.c       |  29 +--
>  drivers/crypto/ccree/cc_driver.c        | 127 +++++-------
>  drivers/crypto/ccree/cc_driver.h        |  13 +-
>  drivers/crypto/ccree/cc_hash.c          | 225 +++++++++------------
>  drivers/crypto/ccree/cc_hash.h          |  31 ++-
>  drivers/crypto/ccree/cc_hw_queue_defs.h | 255 ++++++++++++------------
>  drivers/crypto/ccree/cc_pm.c            |  60 +-----
>  drivers/crypto/ccree/cc_pm.h            |  21 --
>  drivers/crypto/ccree/cc_request_mgr.c   |  47 +++--
>  drivers/crypto/ccree/cc_request_mgr.h   |  19 +-
>  drivers/crypto/ccree/cc_sram_mgr.c      |  78 +++-----
>  drivers/crypto/ccree/cc_sram_mgr.h      |  45 ++---
>  fs/debugfs/file.c                       |   8 +
>  include/linux/debugfs.h                 |   1 +
>  18 files changed, 456 insertions(+), 695 deletions(-)

All applied.  Thanks.