mbox series

[PATCHv4,0/4] crypto: inside-secure - broaden driver scope

Message ID 1565077586-27814-1-git-send-email-pvanleeuwen@verimatrix.com (mailing list archive)
Headers show
Series crypto: inside-secure - broaden driver scope | expand

Message

Pascal van Leeuwen Aug. 6, 2019, 7:46 a.m. UTC
This is a first baby step towards making the inside-secure crypto driver
more broadly useful. The current driver only works for Marvell Armada HW
and requires proprietary firmware, only available under NDA from Marvell,
to be installed. This patch set allows the driver to be used with other
hardware and removes the dependence on that proprietary firmware.

changes since v1:
- changed dev_info's into dev_dbg to reduce normal verbosity
- terminate all message strings with \n
- use priv->version field strictly to enumerate device context
- fixed some code & comment style issues
- removed EIP97/197 references from messages
- use #if(IS_ENABLED(CONFIG_PCI)) to remove all PCI related code
- use #if(IS_ENABLED(CONFIG_OF)) to remove all device tree related code
- do not inline the minifw but read it from /lib/firmware instead

changes since v2:
- split off removal of alg to engine mapping code into separate patch
- replaced some constants with nice defines
- added missing \n to some error messages
- removed some redundant parenthesis
- aligned some #if's properly
- added some comments to clarify code
- report error on FW load for unknown HW instead of loading EIP197B FW
- use readl_relaxed() instead of readl() + cpu_relax() in polling loop
- merged patch "fix null ptr dereference on rmmod for macchiatobin" here
- merged patch "removed unused struct entry"

changes since v3:
- reverted comment style from generic back to network
- changed prefix "crypto_is_" to "safexcel_" for consistency

Pascal van Leeuwen (4):
  crypto: inside-secure - make driver selectable for non-Marvell
    hardware
  crypto: inside-secure - Remove redundant algo to engine mapping code
  crypto: inside-secure - add support for PCI based FPGA development
    board
  crypto: inside-secure - add support for using the EIP197 without
    vendor firmware

 drivers/crypto/Kconfig                         |  12 +-
 drivers/crypto/inside-secure/safexcel.c        | 744 +++++++++++++++++--------
 drivers/crypto/inside-secure/safexcel.h        |  43 +-
 drivers/crypto/inside-secure/safexcel_cipher.c |  11 -
 drivers/crypto/inside-secure/safexcel_hash.c   |  12 -
 drivers/crypto/inside-secure/safexcel_ring.c   |   3 +-
 6 files changed, 573 insertions(+), 252 deletions(-)

--
1.8.3.1

Comments

Herbert Xu Aug. 15, 2019, 11:51 a.m. UTC | #1
On Tue, Aug 06, 2019 at 09:46:22AM +0200, Pascal van Leeuwen wrote:
> This is a first baby step towards making the inside-secure crypto driver
> more broadly useful. The current driver only works for Marvell Armada HW
> and requires proprietary firmware, only available under NDA from Marvell,
> to be installed. This patch set allows the driver to be used with other
> hardware and removes the dependence on that proprietary firmware.
> 
> changes since v1:
> - changed dev_info's into dev_dbg to reduce normal verbosity
> - terminate all message strings with \n
> - use priv->version field strictly to enumerate device context
> - fixed some code & comment style issues
> - removed EIP97/197 references from messages
> - use #if(IS_ENABLED(CONFIG_PCI)) to remove all PCI related code
> - use #if(IS_ENABLED(CONFIG_OF)) to remove all device tree related code
> - do not inline the minifw but read it from /lib/firmware instead
> 
> changes since v2:
> - split off removal of alg to engine mapping code into separate patch
> - replaced some constants with nice defines
> - added missing \n to some error messages
> - removed some redundant parenthesis
> - aligned some #if's properly
> - added some comments to clarify code
> - report error on FW load for unknown HW instead of loading EIP197B FW
> - use readl_relaxed() instead of readl() + cpu_relax() in polling loop
> - merged patch "fix null ptr dereference on rmmod for macchiatobin" here
> - merged patch "removed unused struct entry"
> 
> changes since v3:
> - reverted comment style from generic back to network
> - changed prefix "crypto_is_" to "safexcel_" for consistency
> 
> Pascal van Leeuwen (4):
>   crypto: inside-secure - make driver selectable for non-Marvell
>     hardware
>   crypto: inside-secure - Remove redundant algo to engine mapping code
>   crypto: inside-secure - add support for PCI based FPGA development
>     board
>   crypto: inside-secure - add support for using the EIP197 without
>     vendor firmware
> 
>  drivers/crypto/Kconfig                         |  12 +-
>  drivers/crypto/inside-secure/safexcel.c        | 744 +++++++++++++++++--------
>  drivers/crypto/inside-secure/safexcel.h        |  43 +-
>  drivers/crypto/inside-secure/safexcel_cipher.c |  11 -
>  drivers/crypto/inside-secure/safexcel_hash.c   |  12 -
>  drivers/crypto/inside-secure/safexcel_ring.c   |   3 +-
>  6 files changed, 573 insertions(+), 252 deletions(-)

This patch series fails to apply on the current cryptodev tree.

Please rebase.

Thanks,
Pascal Van Leeuwen Aug. 19, 2019, 2:52 p.m. UTC | #2
> -----Original Message-----
> From: linux-crypto-owner@vger.kernel.org <linux-crypto-owner@vger.kernel.org> On Behalf Of
> Herbert Xu
> Sent: Thursday, August 15, 2019 1:51 PM
> To: Pascal van Leeuwen <pascalvanl@gmail.com>
> Cc: linux-crypto@vger.kernel.org; antoine.tenart@bootlin.com; davem@davemloft.net; Pascal
> Van Leeuwen <pvanleeuwen@verimatrix.com>
> Subject: Re: [PATCHv4 0/4] crypto: inside-secure - broaden driver scope
> 
> On Tue, Aug 06, 2019 at 09:46:22AM +0200, Pascal van Leeuwen wrote:
> > This is a first baby step towards making the inside-secure crypto driver
> > more broadly useful. The current driver only works for Marvell Armada HW
> > and requires proprietary firmware, only available under NDA from Marvell,
> > to be installed. This patch set allows the driver to be used with other
> > hardware and removes the dependence on that proprietary firmware.
> >
> > changes since v1:
> > - changed dev_info's into dev_dbg to reduce normal verbosity
> > - terminate all message strings with \n
> > - use priv->version field strictly to enumerate device context
> > - fixed some code & comment style issues
> > - removed EIP97/197 references from messages
> > - use #if(IS_ENABLED(CONFIG_PCI)) to remove all PCI related code
> > - use #if(IS_ENABLED(CONFIG_OF)) to remove all device tree related code
> > - do not inline the minifw but read it from /lib/firmware instead
> >
> > changes since v2:
> > - split off removal of alg to engine mapping code into separate patch
> > - replaced some constants with nice defines
> > - added missing \n to some error messages
> > - removed some redundant parenthesis
> > - aligned some #if's properly
> > - added some comments to clarify code
> > - report error on FW load for unknown HW instead of loading EIP197B FW
> > - use readl_relaxed() instead of readl() + cpu_relax() in polling loop
> > - merged patch "fix null ptr dereference on rmmod for macchiatobin" here
> > - merged patch "removed unused struct entry"
> >
> > changes since v3:
> > - reverted comment style from generic back to network
> > - changed prefix "crypto_is_" to "safexcel_" for consistency
> >
> > Pascal van Leeuwen (4):
> >   crypto: inside-secure - make driver selectable for non-Marvell
> >     hardware
> >   crypto: inside-secure - Remove redundant algo to engine mapping code
> >   crypto: inside-secure - add support for PCI based FPGA development
> >     board
> >   crypto: inside-secure - add support for using the EIP197 without
> >     vendor firmware
> >
> >  drivers/crypto/Kconfig                         |  12 +-
> >  drivers/crypto/inside-secure/safexcel.c        | 744 +++++++++++++++++--------
> >  drivers/crypto/inside-secure/safexcel.h        |  43 +-
> >  drivers/crypto/inside-secure/safexcel_cipher.c |  11 -
> >  drivers/crypto/inside-secure/safexcel_hash.c   |  12 -
> >  drivers/crypto/inside-secure/safexcel_ring.c   |   3 +-
> >  6 files changed, 573 insertions(+), 252 deletions(-)
> 
> This patch series fails to apply on the current cryptodev tree.
> 
> Please rebase.
> 
Ugh ... yeah. Looks like some very minor changes have been made to the cryptodev
tree since I prepared those that are causing me a major headache now.
Will rebase and send a v3 shortly.


> Thanks,
> --
> 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


Regards,
Pascal van Leeuwen
Silicon IP Architect, Multi-Protocol Engines @ Verimatrix
www.insidesecure.com