Re: [PATCH] crypto: inside-secure: Minor typo fix in the file safexcel.c

2021-03-17 Thread Antoine Tenart
Quoting Bhaskar Chowdhury (2021-03-17 10:14:45) > > s/procesing/processing/ > > Signed-off-by: Bhaskar Chowdhury Acked-by: Antoine Tenart Thanks, Antoine > --- > drivers/crypto/inside-secure/safexcel.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > >

Re: [PATCH] crypto: inside-secure - fix platform_get_irq.cocci warnings

2020-12-22 Thread Antoine Tenart
m_get_irq.cocci > > Signed-off-by: Tian Tao Acked-by: Antoine Tenart Thanks! Antoine > --- > drivers/crypto/inside-secure/safexcel.c | 5 + > 1 file changed, 1 insertion(+), 4 deletions(-) > > diff --git a/drivers/crypto/inside-secure/safexcel.c > b/drivers/crypto/i

Re: [PATCH] crypto: inside-secure: Fix sizeof() mismatch

2020-10-11 Thread Antoine Tenart
causing any > issues. > > Addresses-Coverity: ("Sizeof not portable (SIZEOF_MISMATCH)") > Fixes: 9744fec95f06 ("crypto: inside-secure - remove request list to improve > performance") > Signed-off-by: Colin Ian King Acked-by: Antoine Tenart Thanks! Antoine &

Re: [PATCH] crypto: inside-secure - Add support for EIP197 with output classifier

2020-09-16 Thread Antoine Tenart
r the simple operations supported by this driver, we just bypass it > completely for now (using what is formally a debug feature). > > Signed-off-by: Pascal van Leeuwen Acked-by: Antoine Tenart Thanks! Antoine > --- > drivers/crypto/inside-secure/safexcel.c | 44 > ++

Re: [PATCH] crypto: inside-secure - Prevent missing of processing errors

2020-09-16 Thread Antoine Tenart
l error bits initialised to zero = no error. > Since this is potential a security risk, we want to prevent it from being > a possibility at all. So initialize all error bits to error state, so > that reading stale status information will always result in errors. > > Signed-off-by: Pascal van

Re: [PATCH v2 1/4] crypto: inside-secure - use kfree_sensitive()

2020-09-02 Thread Antoine Tenart
Hello Denis, Quoting Denis Efremov (2020-08-27 08:43:59) > Use kfree_sensitive() instead of open-coding it. > > Signed-off-by: Denis Efremov Acked-by: Antoine Tenart Thanks! Antoine > --- > drivers/crypto/inside-secure/safexcel_hash.c | 3 +-- > 1 file changed, 1 inserti

Re: [PATCH v2] net: phy: mscc: avoid skcipher API for single block AES encryption

2020-06-25 Thread Antoine Tenart
the most straight-forward approach to fixing this. > > Cc: Antoine Tenart > Cc: Andrew Lunn > Cc: Florian Fainelli > Cc: Heiner Kallweit > Cc: "David S. Miller" > Cc: Jakub Kicinski > Cc: > Fixes: 28c5107aa904e ("net: phy: mscc: macsec support&quo

Re: [PATCH 05/15] crypto: inside-secure - use PCI_IRQ_MSI_TYPES where appropriate

2020-06-02 Thread Antoine Tenart
o Reviewed-by: Antoine Tenart Thanks, Antoine > --- > drivers/crypto/inside-secure/safexcel.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/crypto/inside-secure/safexcel.c > b/drivers/crypto/inside-secure/safexcel.c > index 2cb53fbae841.

Re: [PATCH -next] crypto: Use PTR_ERR_OR_ZERO in safexcel_xcbcmac_cra_init()

2019-10-09 Thread Antoine Tenart
On Wed, Oct 09, 2019 at 12:06:21PM +, YueHaibing wrote: > Use PTR_ERR_OR_ZERO rather than if(IS_ERR(...)) + PTR_ERR > > Signed-off-by: YueHaibing Acked-by: Antoine Tenart Thanks, Antoine > --- > drivers/crypto/inside-secure/safexcel_hash.c | 5 + > 1 file changed,

Re: [PATCH 1/3] crypto: inside-secure - Added support for basic SM3 ahash

2019-09-11 Thread Antoine Tenart
On Wed, Sep 11, 2019 at 03:47:21PM +, Pascal Van Leeuwen wrote: > > On Wed, Sep 11, 2019 at 09:41:09AM +0200, Pascal van Leeuwen wrote: > > > static int safexcel_register_algorithms(struct safexcel_crypto_priv > > > *priv) > > > diff --git a/drivers/crypto/inside-secure/safexcel.h > > > b/dr

Re: [PATCH 2/2] crypto: inside-secure - Add support for the Chacha20-Poly1305 AEAD

2019-09-11 Thread Antoine Tenart
On Wed, Sep 11, 2019 at 03:37:25PM +, Pascal Van Leeuwen wrote: > > On Tue, Sep 10, 2019 at 04:38:13PM +0200, Pascal van Leeuwen wrote: > > > @@ -43,8 +44,8 @@ struct safexcel_cipher_ctx { > > > > > > u32 mode; > > > enum safexcel_cipher_alg alg; > > > - bool aead; > > > - int xcm; /* 0=au

Re: [PATCH 2/3] crypto: inside-secure - Added support for HMAC-SM3 ahash

2019-09-11 Thread Antoine Tenart
On Wed, Sep 11, 2019 at 09:41:10AM +0200, Pascal van Leeuwen wrote: > Added support for the hmac(sm3) ahash authentication algorithm > > Signed-off-by: Pascal van Leeuwen Acked-by: Antoine Tenart Thanks! Antoine > --- > drivers/crypto/inside-secure/safexcel.c | 1 + &g

Re: [PATCH 1/3] crypto: inside-secure - Added support for basic SM3 ahash

2019-09-11 Thread Antoine Tenart
_XCBC256 (0x3 << 23) > #define CONTEXT_CONTROL_CRYPTO_ALG_POLY1305 (0xf << 23) > +#define CONTEXT_CONTROL_CRYPTO_ALG_SM3 (0x7 << 23) Please order the definitions (0x7 before 0xf). Otherwise the patch looks good, and with that you can add: Acked-by: Antoine Tenart Thanks! Antoi

Re: [PATCH 2/2] crypto: inside-secure - Add support for the Chacha20-Poly1305 AEAD

2019-09-11 Thread Antoine Tenart
Hello Pascal, On Tue, Sep 10, 2019 at 04:38:13PM +0200, Pascal van Leeuwen wrote: > @@ -43,8 +44,8 @@ struct safexcel_cipher_ctx { > > u32 mode; > enum safexcel_cipher_alg alg; > - bool aead; > - int xcm; /* 0=authenc, 1=GCM, 2 reserved for CCM */ > + char aead; /* !=0=A

Re: [PATCH 1/2] crypto: inside-secure - Added support for the CHACHA20 skcipher

2019-09-11 Thread Antoine Tenart
Hello Pascal, On Tue, Sep 10, 2019 at 06:58:18PM +, Pascal Van Leeuwen wrote: > > On Tue, Sep 10, 2019 at 04:38:12PM +0200, Pascal van Leeuwen wrote: > > > @@ -112,7 +123,7 @@ static void safexcel_cipher_token(struct > > > safexcel_cipher_ctx *ctx, u8 > > *iv, > > > block_sz

Re: [PATCH 1/2] crypto: inside-secure - Added support for the CHACHA20 skcipher

2019-09-10 Thread Antoine Tenart
Hi Pascal, On Tue, Sep 10, 2019 at 04:38:12PM +0200, Pascal van Leeuwen wrote: > > @@ -112,7 +123,7 @@ static void safexcel_cipher_token(struct > safexcel_cipher_ctx *ctx, u8 *iv, > block_sz = DES3_EDE_BLOCK_SIZE; > cdesc->control_data.options |= > E

Re: [PATCHv4 3/4] crypto: inside-secure - add support for PCI based FPGA development board

2019-08-06 Thread Antoine Tenart
s nor has access to actual > silicon, this is required functionality to allow us to contribute. > > Signed-off-by: Pascal van Leeuwen Acked-by: Antoine Tenart Thanks! Antoine > --- > drivers/crypto/inside-secure/safexcel.c | 543 > +++ >

Re: [PATCHv3 4/4] crypto: inside-secure - add support for using the EIP197 without vendor firmware

2019-08-05 Thread Antoine Tenart
On Mon, Aug 05, 2019 at 01:02:08PM +, Pascal Van Leeuwen wrote: > > From: Antoine Tenart > > > > Using this function that is designed to sleep with a delay of 0 and > > designed to timeout with a value of 1 does not seem to follow what the > > function is desig

Re: [PATCHv3 4/4] crypto: inside-secure - add support for using the EIP197 without vendor firmware

2019-08-05 Thread Antoine Tenart
On Mon, Aug 05, 2019 at 10:12:07AM +, Pascal Van Leeuwen wrote: > > From: Antoine Tenart > > On Mon, Aug 05, 2019 at 09:48:13AM +, Pascal Van Leeuwen wrote: > > > > On Wed, Jul 31, 2019 at 05:29:19PM +0200, Pascal van Leeuwen wrote: > > > > > >

Re: [PATCHv3 4/4] crypto: inside-secure - add support for using the EIP197 without vendor firmware

2019-08-05 Thread Antoine Tenart
On Mon, Aug 05, 2019 at 09:48:13AM +, Pascal Van Leeuwen wrote: > > On Wed, Jul 31, 2019 at 05:29:19PM +0200, Pascal van Leeuwen wrote: > > > > > > - /* Release engine from reset */ > > > - val = readl(EIP197_PE(priv) + ctrl); > > > - val &= ~EIP197_PE_ICE_x_CTRL_SW_RESET; > > > - writel(val, E

Re: [PATCHv3 3/4] crypto: inside-secure - add support for PCI based FPGA development board

2019-08-05 Thread Antoine Tenart
Hi Pascal, On Mon, Aug 05, 2019 at 08:47:42AM +, Pascal Van Leeuwen wrote: > > Thanks for the review and I agree with all of your comments below. > So I'm willing to fix those but I'm a bit unclear of the procedure now, > since you acked part of the patch set already. > > Should I resend jus

Re: [PATCHv3 4/4] crypto: inside-secure - add support for using the EIP197 without vendor firmware

2019-08-05 Thread Antoine Tenart
Hi Pascal, Just a small comment below, On Wed, Jul 31, 2019 at 05:29:19PM +0200, Pascal van Leeuwen wrote: > > - /* Release engine from reset */ > - val = readl(EIP197_PE(priv) + ctrl); > - val &= ~EIP197_PE_ICE_x_CTRL_SW_RESET; > - writel(val, EIP197_PE(priv) + ctrl); > + fo

Re: [PATCHv3 3/4] crypto: inside-secure - add support for PCI based FPGA development board

2019-08-05 Thread Antoine Tenart
Hello Pascal, The patch looks mostly good, just a few comments below. On Wed, Jul 31, 2019 at 05:29:18PM +0200, Pascal van Leeuwen wrote: > @@ -381,10 +383,11 @@ static int safexcel_hw_init(struct safexcel_crypto_priv > *priv) > EIP197_HIA_DxE_CFG_MAX_DATA_SIZE(8); >

Re: [PATCHv3 1/4] crypto: inside-secure - make driver selectable for non-Marvell hardware

2019-08-05 Thread Antoine Tenart
y both Inside Secure and its IP custo- > mers. > > Signed-off-by: Pascal van Leeuwen Acked-by: Antoine Tenart Thanks! Antoine > --- > drivers/crypto/Kconfig | 12 ++-- > 1 file changed, 6 insertions(+), 6 deletions(-) > > diff --git a/drivers/crypto/Kconfig b

Re: [PATCHv3 2/4] crypto: inside-secure - Remove redundant algo to engine mapping code

2019-08-05 Thread Antoine Tenart
; Signed-off-by: Pascal van Leeuwen Acked-by: Antoine Tenart Thanks! Antoine > --- > drivers/crypto/inside-secure/safexcel.c| 9 - > drivers/crypto/inside-secure/safexcel.h| 1 - > drivers/crypto/inside-secure/safexcel_cipher.c | 11 --- > drivers/c

Re: [PATCH -next 05/12] crypto: inside-secure - use devm_platform_ioremap_resource() to simplify code

2019-08-02 Thread Antoine Tenart
Hello, On Fri, Aug 02, 2019 at 09:28:02PM +0800, YueHaibing wrote: > Use devm_platform_ioremap_resource() to simplify the code a bit. > This is detected by coccinelle. > > Reported-by: Hulk Robot > Signed-off-by: YueHaibing Acked-by: Antoine Tenart Thanks, Antoine > ---

Re: [PATCHv2 3/3] crypto: inside-secure - add support for using the EIP197 without vendor firmware

2019-07-31 Thread Antoine Tenart
On Wed, Jul 31, 2019 at 02:23:27PM +, Pascal Van Leeuwen wrote: > > From: Antoine Tenart > > > What happens if i < 2 ? > > > Ok, I did not consider that as it can't happen for any kind of legal FW. But > it > wouldn't be pretty (neither would

Re: [PATCH] crypto: inside-secure: Remove redundant DES ECB & CBC keysize check

2019-07-31 Thread Antoine Tenart
Hi Pascal, On Wed, Jul 31, 2019 at 08:10:54AM +0200, Pascal van Leeuwen wrote: > This patch removes a DES key size check that is redundant as it is already > performed by the crypto API itself due to min_keysize = max_keysize. > > Signed-off-by: Pascal van Leeuwen Acked-by: An

Re: [PATCHv2 3/3] crypto: inside-secure - add support for using the EIP197 without vendor firmware

2019-07-31 Thread Antoine Tenart
Hi Pascal, Thanks for reworking this not to include the firmware blob, the patch looks good and I only have minor comments. On Fri, Jul 26, 2019 at 02:43:25PM +0200, Pascal van Leeuwen wrote: > + > +static int eip197_write_firmware(struct safexcel_crypto_priv *priv, > +

Re: [PATCHv2 2/3] crypto: inside-secure - add support for PCI based FPGA development board

2019-07-31 Thread Antoine Tenart
Hi Pascal, On Tue, Jul 30, 2019 at 04:17:54PM +, Pascal Van Leeuwen wrote: > > From: Antoine Tenart > > On Tue, Jul 30, 2019 at 10:20:43AM +, Pascal Van Leeuwen wrote: > > > > On Fri, Jul 26, 2019 at 02:43:24PM +0200, Pascal van Leeuwen wrote: > > >

Re: [PATCH 2/2] crypto: inside-secure: This fixes a mistake in a comment for XTS

2019-07-30 Thread Antoine Tenart
Hi Pascal, On Tue, Jul 30, 2019 at 03:27:12PM +0200, Pascal van Leeuwen wrote: > This fixes a copy-paste (and forgot to edit) mistake in a comment > for XTS regarding the key length specification. > > Signed-off-by: Pascal van Leeuwen Acked-by: Antoine Tenart Tha

Re: [PATCH 1/2] crypto: inside-secure - Use defines instead of some constants (cosmetic)

2019-07-30 Thread Antoine Tenart
Hi Pascal, On Tue, Jul 30, 2019 at 03:27:11PM +0200, Pascal van Leeuwen wrote: > This patch replaces some hard constants regarding key, IV and nonce sizes > with appropriate defines from the crypto header files. > > Signed-off-by: Pascal van Leeuwen Acked-by: Antoine Tenart Tha

Re: [PATCH 1/3] crypto: inside-secure - add support for authenc(hmac(sha1),cbc(des3_ede))

2019-07-30 Thread Antoine Tenart
On Tue, Jul 30, 2019 at 02:01:46PM +, Pascal Van Leeuwen wrote: > > From: linux-crypto-ow...@vger.kernel.org > > On Behalf Of > > Pascal Van Leeuwen > > Sent: Friday, July 26, 2019 2:57 PM > > To: Antoine Tenart ; Pascal van Leeuwen > > > &

Re: [PATCHv2 2/3] crypto: inside-secure - add support for PCI based FPGA development board

2019-07-30 Thread Antoine Tenart
Hi Pascal, On Tue, Jul 30, 2019 at 10:20:43AM +, Pascal Van Leeuwen wrote: > > On Fri, Jul 26, 2019 at 02:43:24PM +0200, Pascal van Leeuwen wrote: > > > Is there a reason to have this one linked to Marvell? Aren't there other > > EIP197 (or EIP97) engines not on Marvell SoCs? (I'm pretty sure

Re: [PATCHv2 2/3] crypto: inside-secure - add support for PCI based FPGA development board

2019-07-30 Thread Antoine Tenart
Hi Pascal, On Fri, Jul 26, 2019 at 02:43:24PM +0200, Pascal van Leeuwen wrote: > + if (priv->version == EIP197D_MRVL) { I see you renamed EIP197D to EIP197D_MRVL in the v2. Such a rename should not be part of this patch, as it has nothing to do with the engine you're adding support for. Is t

Re: [PATCH 2/3] crypto: inside-secure - added support for rfc3686(ctr(aes))

2019-07-30 Thread Antoine Tenart
On Fri, Jul 26, 2019 at 02:29:48PM +, Pascal Van Leeuwen wrote: > > From: linux-crypto-ow...@vger.kernel.org > > On Behalf Of Antoine Tenart > > On Fri, Jul 26, 2019 at 01:28:13PM +, Pascal Van Leeuwen wrote: > > > > On Fri, Jul 05, 2019 at 08:49:23AM +

Re: [PATCH] crypto: inside-secure - Fix null ptr derefence on rmmod for macchiatobin

2019-07-30 Thread Antoine Tenart
Hi Pascal, On Fri, Jul 26, 2019 at 05:31:09PM +0200, Pascal van Leeuwen wrote: > This small patch fixes a null pointer derefence panic that occurred when > unloading the driver (using rmmod) on macchiatobin due to not setting > the platform driver data properly in the probe routine. > > Signed-of

Re: [PATCH 2/3] crypto: inside-secure - added support for rfc3686(ctr(aes))

2019-07-26 Thread Antoine Tenart
Hi Pascal, On Fri, Jul 26, 2019 at 01:28:13PM +, Pascal Van Leeuwen wrote: > > On Fri, Jul 05, 2019 at 08:49:23AM +0200, Pascal van Leeuwen wrote: > > > > - /* H/W capabilities selection */ > > > - val = EIP197_FUNCTION_RSVD; > > > - val |= EIP197_PROTOCOL_ENCRYPT_ONLY

Re: [PATCH 1/3] crypto: inside-secure - add support for authenc(hmac(sha1),cbc(des3_ede))

2019-07-26 Thread Antoine Tenart
Hi Pascal, On Fri, Jul 26, 2019 at 12:57:21PM +, Pascal Van Leeuwen wrote: > > On Fri, Jul 05, 2019 at 08:49:22AM +0200, Pascal van Leeuwen wrote: > > > Signed-off-by: Pascal van Leeuwen > > > > Could you provide a commit message, explaining briefly what the patch is > > doing? > > > I init

Re: [PATCH 2/3] crypto: inside-secure - added support for rfc3686(ctr(aes))

2019-07-26 Thread Antoine Tenart
Hi Pascal, On Fri, Jul 05, 2019 at 08:49:23AM +0200, Pascal van Leeuwen wrote: > Signed-off-by: Pascal van Leeuwen Could you add a commit message? > - /* H/W capabilities selection */ > - val = EIP197_FUNCTION_RSVD; > - val |= EIP197_PROTOCOL_ENCRYPT_ONLY | E

Re: [PATCH 1/3] crypto: inside-secure - add support for authenc(hmac(sha1),cbc(des3_ede))

2019-07-26 Thread Antoine Tenart
Hi Pascal, On Fri, Jul 05, 2019 at 08:49:22AM +0200, Pascal van Leeuwen wrote: > Signed-off-by: Pascal van Leeuwen Could you provide a commit message, explaining briefly what the patch is doing? > @@ -199,6 +201,15 @@ static int safexcel_aead_aes_setkey(struct crypto_aead > *ctfm, const u8 *ke

Re: [PATCH] crypto: inside-secure - remove unused struct entry

2019-07-05 Thread Antoine Tenart
Hi Pascal, On Fri, Jul 05, 2019 at 02:54:25PM +, Pascal Van Leeuwen wrote: > > From: Antoine Tenart > > On Fri, Jul 05, 2019 at 02:32:46PM +, Pascal Van Leeuwen wrote: > > > > From: Antoine Tenart > > > > > > > > You should wait fo

Re: [PATCH 2/9] crypto: inside-secure - silently return -EINVAL for input error cases

2019-07-05 Thread Antoine Tenart
On Fri, Jul 05, 2019 at 02:43:16PM +, Pascal Van Leeuwen wrote: > > From: Antoine Tenart > > On Tue, Jul 02, 2019 at 04:39:53PM +0200, Pascal van Leeuwen wrote: > > > From: Pascal van Leeuwen > > > > > + if (rdesc->descriptor_overflow) > > > +

Re: [PATCH 1/9] crypto: inside-secure - keep ivsize for DES ECB modes at 0

2019-07-05 Thread Antoine Tenart
; > Signed-off-by: Pascal van Leeuwen Acked-by: Antoine Tenart Thanks! Antoine > --- > drivers/crypto/inside-secure/safexcel_cipher.c | 2 -- > 1 file changed, 2 deletions(-) > > diff --git a/drivers/crypto/inside-secure/safexcel_cipher.c > b/drivers/crypto/inside-secure/saf

Re: [PATCH] crypto: inside-secure - remove unused struct entry

2019-07-05 Thread Antoine Tenart
On Fri, Jul 05, 2019 at 02:32:46PM +, Pascal Van Leeuwen wrote: > > From: Antoine Tenart > > > > You should wait for either those patches to be merged (or directly > > integrate this change in a newer version of those patches), or send this > > patch in t

Re: [PATCH 2/9] crypto: inside-secure - silently return -EINVAL for input error cases

2019-07-05 Thread Antoine Tenart
Hi Pascal, On Tue, Jul 02, 2019 at 04:39:53PM +0200, Pascal van Leeuwen wrote: > From: Pascal van Leeuwen > > diff --git a/drivers/crypto/inside-secure/safexcel.c > b/drivers/crypto/inside-secure/safexcel.c > index 503fef0..8e8c01d 100644 > --- a/drivers/crypto/inside-secure/safexcel.c > +++ b/

Re: [PATCH] crypto: inside-secure - remove unused struct entry

2019-07-05 Thread Antoine Tenart
Hello Pascal, On Fri, Jul 05, 2019 at 10:17:25AM +0200, Pascal van Leeuwen wrote: > This patch removes 'engines' from struct safexcel_alg_template, as it is > no longer used. > > Signed-off-by: Pascal van Leeuwen > --- > drivers/crypto/inside-secure/safexcel.h | 1 - > 1 file changed, 1 deletio

Re: [PATCH 3/3] crypto: inside-secure - add support for using the EIP197 without firmware images

2019-06-20 Thread Antoine Tenart
Hi Pascal, On Thu, Jun 20, 2019 at 02:59:20PM +, Pascal Van Leeuwen wrote: > > From: Antoine Tenart > > On Wed, Jun 19, 2019 at 02:37:44PM +, Pascal Van Leeuwen wrote: > > > > From: Antoine Tenart > > > > On Tue, Jun 18, 2019 at 07:56:

Re: [PATCH 2/3] crypto: inside-secure - add support for PCI based FPGA development board

2019-06-20 Thread Antoine Tenart
Hi Pascal, On Thu, Jun 20, 2019 at 02:47:30PM +, Pascal Van Leeuwen wrote: > > From: Antoine Tenart > > On Wed, Jun 19, 2019 at 02:22:19PM +, Pascal Van Leeuwen wrote: > > > > From: Antoine Tenart > > > > On Tue, Jun 18, 2019 at 07:56:

Re: [PATCH 3/3] crypto: inside-secure - add support for using the EIP197 without firmware images

2019-06-20 Thread Antoine Tenart
Hi Pascal, On Wed, Jun 19, 2019 at 02:37:44PM +, Pascal Van Leeuwen wrote: > > From: Antoine Tenart > > On Tue, Jun 18, 2019 at 07:56:24AM +0200, Pascal van Leeuwen wrote: > > > In addition to this, the direction the kernel has taken was to *remove* > > binary fir

Re: [PATCH 2/3] crypto: inside-secure - add support for PCI based FPGA development board

2019-06-20 Thread Antoine Tenart
Hi Pascal, On Wed, Jun 19, 2019 at 02:22:19PM +, Pascal Van Leeuwen wrote: > > From: Antoine Tenart > > On Tue, Jun 18, 2019 at 07:56:23AM +0200, Pascal van Leeuwen wrote: > > > > > > /* Fallback to the old firmware location for the > &

Re: [PATCH 2/3] crypto: inside-secure - add support for PCI based FPGA development board

2019-06-19 Thread Antoine Tenart
Hi Pascal, On Wed, Jun 19, 2019 at 02:15:02PM +0200, Antoine Tenart wrote: > On Tue, Jun 18, 2019 at 07:56:23AM +0200, Pascal van Leeuwen wrote: > > More generally, you should protect all the PCI specific functions and > definitions between #ifdef. And I think there are compilati

Re: [PATCH 1/3] crypto: inside-secure - make driver selectable for non-Marvell hardware

2019-06-19 Thread Antoine Tenart
Hi Pascal, On Tue, Jun 18, 2019 at 07:56:22AM +0200, Pascal van Leeuwen wrote: > While being a generic EIP97/EIP197 driver, the driver was only selectable > for Marvell Armada hardware. This fix makes the driver selectable for any > Device Tree supporting kernel configuration, allowing it to be us

Re: [PATCH 3/3] crypto: inside-secure - add support for using the EIP197 without firmware images

2019-06-19 Thread Antoine Tenart
Hi Pascal, On Tue, Jun 18, 2019 at 07:56:24AM +0200, Pascal van Leeuwen wrote: > > static int eip197_load_firmwares(struct safexcel_crypto_priv *priv) > { > + /* > + * The embedded one-size-fits-all MiniFW is just for handling TR > + * prefetch & invalidate. It does not support a

Re: [PATCH 2/3] crypto: inside-secure - add support for PCI based FPGA development board

2019-06-19 Thread Antoine Tenart
Hi Pascal, Thanks for the patch :) On Tue, Jun 18, 2019 at 07:56:23AM +0200, Pascal van Leeuwen wrote: > > /* Fallback to the old firmware location for the > @@ -294,6 +291,9 @@ static int safexcel_hw_init(struct safexcel_crypto_priv > *priv) > > + dev_info(priv->de

[PATCH 04/14] crypto: inside-secure - remove useless check

2019-05-27 Thread Antoine Tenart
When sending an ahash request, the code checks for the extra variable not to be 0. This check is useless as the extra variable can't be 0 at this point (it is checked on the line just before). This patch does not modify the driver behaviour in any way. Signed-off-by: Antoine Tenart --- dr

[PATCH 12/14] crypto: inside-secure - add support for HMAC updates

2019-05-27 Thread Antoine Tenart
This patch adds support for HMAC updates in the Inside Secure SafeXcel crypto engine driver. Updates were supported for hash algorithms, but were never enabled for HMAC ones. This fixes boot time test issues. Signed-off-by: Antoine Tenart --- drivers/crypto/inside-secure/safexcel.h | 2

[PATCH 08/14] crypto: inside-secure - unify cache reset

2019-05-27 Thread Antoine Tenart
This patch unify the way the cache related data is zeroed when the cache buffer is DMA unmapped. It should not change the driver behaviour, but improves the code safety and readability. Signed-off-by: Antoine Tenart --- drivers/crypto/inside-secure/safexcel_hash.c | 2 ++ 1 file changed, 2

[PATCH 14/14] crypto: inside-secure - do not rely on the hardware last bit for result descriptors

2019-05-27 Thread Antoine Tenart
f descriptors to use *per* transformation). This patch fixes it by attaching the number of given result descriptors to the requests, and by using this number instead of the 'last' bit found on the descriptors to process them. Signed-off-by: Antoine Tenart --- .../crypto/insi

[PATCH 01/14] crypto: inside-secure - remove empty line

2019-05-27 Thread Antoine Tenart
Cosmetic patch removing an empty line in the skcipher token creation routine. Signed-off-by: Antoine Tenart --- drivers/crypto/inside-secure/safexcel_cipher.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/crypto/inside-secure/safexcel_cipher.c b/drivers/crypto/inside-secure

[PATCH 05/14] crypto: inside-secure - improve the result error format when displayed

2019-05-27 Thread Antoine Tenart
: Antoine Tenart --- drivers/crypto/inside-secure/safexcel.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/crypto/inside-secure/safexcel.c b/drivers/crypto/inside-secure/safexcel.c index 263bd4ce73c5..d5392893973c 100644 --- a/drivers/crypto/inside-secure/safexcel.c +++ b

[PATCH 09/14] crypto: inside-secure - fix zeroing of the request in ahash_exit_inv

2019-05-27 Thread Antoine Tenart
(hmac(sha256), cbc(aes)) support") Signed-off-by: Antoine Tenart --- drivers/crypto/inside-secure/safexcel_hash.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/crypto/inside-secure/safexcel_hash.c b/drivers/crypto/inside-secure/safexcel_hash.c index a7

[PATCH 03/14] crypto: inside-secure - fix coding style for a condition

2019-05-27 Thread Antoine Tenart
This cosmetic patch fixes a cosmetic issue with if brackets. Signed-off-by: Antoine Tenart --- drivers/crypto/inside-secure/safexcel.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/crypto/inside-secure/safexcel.c b/drivers/crypto/inside-secure/safexcel.c index

[PATCH 07/14] crypto: inside-secure - enable context reuse

2019-05-27 Thread Antoine Tenart
The context given to the crypto engine can be reused over time. While the driver was designed to allow this, the feature wasn't enabled in the hardware engine. This patch enables it. Signed-off-by: Antoine Tenart --- drivers/crypto/inside-secure/safexcel.c | 6 ++ drivers/crypto/i

[PATCH 02/14] crypto: inside-secure - move comment

2019-05-27 Thread Antoine Tenart
This cosmetic patch moves a comment before the condition it is related to. The patch does not change the driver behaviour in any way. Signed-off-by: Antoine Tenart --- drivers/crypto/inside-secure/safexcel_hash.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/drivers

[PATCH 10/14] crypto: inside-secure - fix queued len computation

2019-05-27 Thread Antoine Tenart
This patch fixes the queued len computation, which could theoretically be wrong if req->len[1] - req->processed[1] > 1. Be future-proof here, and fix it. Fixes: b460edb6230a ("crypto: inside-secure - sha512 support") Signed-off-by: Antoine Tenart --- drivers/crypto/inside-sec

[PATCH 13/14] crypto: inside-secure - fix use of the SG list

2019-05-27 Thread Antoine Tenart
input data and the result would be wrong). Signed-off-by: Antoine Tenart --- .../crypto/inside-secure/safexcel_cipher.c| 39 ++- drivers/crypto/inside-secure/safexcel_hash.c | 3 +- 2 files changed, 12 insertions(+), 30 deletions(-) diff --git a/drivers/crypto/ins

[PATCH 00/14] crypto: inside-secure - self-test fixes

2019-05-27 Thread Antoine Tenart
orted. - We spotted issues with the use of the SG lists. - There was an issue with the use of result buffers. The series fixes all those issues, and includes other small changes found while doing this work. Thanks! Antoine Antoine Tenart (14): crypto: inside-secure - remove empty line crypto: i

[PATCH 06/14] crypto: inside-secure - change returned error when a descriptor reports an error

2019-05-27 Thread Antoine Tenart
This patch changes the error reported by the Inside Secure SafeXcel driver when a result descriptor reports an error, from -EIO to -EINVAL, as this is what the crypto framework expects. This was found while running the crypto extra tests. Signed-off-by: Antoine Tenart --- drivers/crypto/inside

[PATCH 11/14] crypto: inside-secure - implement IV retrieval

2019-05-27 Thread Antoine Tenart
pport checking skcipher output IV"). Signed-off-by: Antoine Tenart --- drivers/crypto/inside-secure/safexcel.h | 8 +++ .../crypto/inside-secure/safexcel_cipher.c| 52 --- 2 files changed, 53 insertions(+), 7 deletions(-) diff --git a/drivers/crypto/inside-secure/

Re: [PATCH] crypto: inside-secure - remove useless setting of type flags

2018-11-14 Thread Antoine Tenart
here else, but a few more instances made > it into the tree at about the same time. Squash them before they get > copy+pasted around again. > > This patch shouldn't change any actual behavior. > > Signed-off-by: Eric Biggers Acked-by: Antoine Tenart Thanks! Antoine > --

Re: [PATCH] crypto: inside-secure: safexcel - fix memory allocation

2018-10-17 Thread Antoine Tenart
Hi, On Wed, Oct 17, 2018 at 02:17:41PM +0800, Herbert Xu wrote: > On Tue, Oct 16, 2018 at 09:44:02PM +0200, Gustavo A. R. Silva wrote: > > On 10/9/18 12:20 AM, Kees Cook wrote: > > > On Mon, Oct 8, 2018 at 12:17 PM, Gustavo A. R. Silva > > > wrote: > > >> The original intention is to allocate spa

Re: [PATCH] crypto: inside-secure: safexcel - fix memory allocation

2018-10-10 Thread Antoine Tenart
-Coverity-ID: 1473962 ("Sizeof not portable") > Fixes: 9744fec95f06 ("crypto: inside-secure - remove request list to improve > performance") > Signed-off-by: Gustavo A. R. Silva Acked-by: Antoine Tenart Good catch, thanks! Antoine > --- > drivers/crypto/inside

Re: [PATCH 13/14] arm64: dts: marvell: armada-cp110: update the crypto engine compatible

2018-07-23 Thread Antoine Tenart
Hi Olof, On Sat, Jul 21, 2018 at 02:35:01PM -0700, Olof Johansson wrote: > On Thu, Jun 28, 2018 at 8:15 AM, Antoine Tenart > wrote: > > New compatibles are now supported by the Inside Secure SafeXcel driver. > > As they are more specific than the old ones, they should be

[PATCH] crypto: inside-secure - initialize first_rdesc to make GCC happy

2018-07-13 Thread Antoine Tenart
In the cipher safexcel_send_req function, GCC warns that first_rdesc may be used uninitialized. While this should never happen, this patch removes the warning by initializing this variable to NULL to make GCC happy. This was reported by the kbuild test robot. Signed-off-by: Antoine Tenart

[PATCH] crypto: inside-secure - switch to SPDX identifiers

2018-07-13 Thread Antoine Tenart
Use the appropriate SPDX license identifiers and drop the license text. This patch is only cosmetic. Signed-off-by: Antoine Tenart --- drivers/crypto/inside-secure/safexcel.c| 5 + drivers/crypto/inside-secure/safexcel.h| 5 + drivers/crypto/inside-secure

[PATCH 03/14] Documentation/bindings: crypto: inside-secure: update the compatibles

2018-06-28 Thread Antoine Tenart
The compatibles were updated in the Inside Secure SafeXcel cryptographic driver, as the ones previously used were not specific enough. The old compatibles are still supported by the driver for backward compatibility. This patch updates the documentation accordingly. Signed-off-by: Antoine Tenart

[PATCH 04/14] crypto: inside-secure - filter out the algorithms by engine

2018-06-28 Thread Antoine Tenart
registered when using a compatible cryptographic engine. Signed-off-by: Antoine Tenart --- drivers/crypto/inside-secure/safexcel.c| 9 + drivers/crypto/inside-secure/safexcel.h| 5 +++-- drivers/crypto/inside-secure/safexcel_cipher.c | 7 +++ drivers/crypt

[PATCH 01/14] crypto: inside-secure - move the firmware to a better location

2018-06-28 Thread Antoine Tenart
p the compatibility of what was done, the old path is still supported as a fallback for the EIP197b (currently the only one supported by the driver that loads a firmware). Signed-off-by: Antoine Tenart --- drivers/crypto/inside-secure/safexcel.c | 18 -- 1 file changed, 12 insertions(

[PATCH 02/14] crypto: inside-secure - use precise compatibles

2018-06-28 Thread Antoine Tenart
we'll need to differentiate them. This patch fixes the compatibles used in the driver, to now use precise ones. The two historical compatibles are kept for backward compatibility. Signed-off-by: Antoine Tenart --- drivers/crypto/inside-secure/safexcel.c | 24 +-- driv

[PATCH 06/14] crypto: inside-secure - dynamic ring configuration allocation

2018-06-28 Thread Antoine Tenart
-by: Antoine Tenart --- drivers/crypto/inside-secure/safexcel.c | 7 ++ drivers/crypto/inside-secure/safexcel.h | 68 ++-- drivers/crypto/inside-secure/safexcel_ring.c | 10 +-- 3 files changed, 47 insertions(+), 38 deletions(-) diff --git a/drivers/crypto/inside-secure

[PATCH 08/14] crypto: inside-secure - eip197d support

2018-06-28 Thread Antoine Tenart
This patch adds support for the eip197d engine to the Inside Secure SafeXcel cryptographic driver. This new engine is similar to the eip197b and reuse most of its code. Signed-off-by: Antoine Tenart --- drivers/crypto/inside-secure/safexcel.c | 46 +++ drivers/crypto

[PATCH 2/5] crypto: inside-secure - hmac(md5) support

2018-06-28 Thread Antoine Tenart
From: Ofer Heifetz This patch adds support for the hmac(md5) algorithm in the Inside Secure SafeXcel cryptographic engine driver. Signed-off-by: Ofer Heifetz Signed-off-by: Antoine Tenart --- drivers/crypto/inside-secure/safexcel.c | 3 +- drivers/crypto/inside-secure/safexcel.h

[PATCH 4/5] crypto: inside-secure - ecb(des3_ede) and cbc(des3_ede) support

2018-06-28 Thread Antoine Tenart
From: Ofer Heifetz This patch adds support for two new algorithms in the Inside Secure SafeXcel cryptographic engine driver: ecb(des3_ede) and cbc(des3_ede). Signed-off-by: Ofer Heifetz Signed-off-by: Antoine Tenart --- drivers/crypto/inside-secure/safexcel.c | 3 + drivers/crypto

[PATCH 5/5] crypto: inside-secure - remove request list to improve performance

2018-06-28 Thread Antoine Tenart
RDR shadow. Signed-off-by: Ofer Heifetz Signed-off-by: Antoine Tenart --- drivers/crypto/inside-secure/safexcel.c | 91 +-- drivers/crypto/inside-secure/safexcel.h | 31 --- .../crypto/inside-secure/safexcel_cipher.c| 39 +++- drivers/crypto/inside-secure

[PATCH 3/5] crypto: inside-secure - ecb(des) and cbc(des) support

2018-06-28 Thread Antoine Tenart
From: Ofer Heifetz This patch adds support for two algorithms in the Inside Secure SafeXcel cryptographic engine driver: ecb(des) and cbc(des). Signed-off-by: Ofer Heifetz Signed-off-by: Antoine Tenart --- drivers/crypto/Kconfig| 1 + drivers/crypto/inside-secure

[PATCH 1/5] crypto: inside-secure - md5 support

2018-06-28 Thread Antoine Tenart
From: Ofer Heifetz This patch adds the MD5 algorithm support to the Inside Secure SafeXcel cryptographic engine driver. Signed-off-by: Ofer Heifetz Signed-off-by: Antoine Tenart --- drivers/crypto/Kconfig | 1 + drivers/crypto/inside-secure/safexcel.c | 2

[PATCH 0/5] crypto: inside-secure - support more algorithms

2018-06-28 Thread Antoine Tenart
Hi all, This series adds support for more algorithms in the Inside Secure SafeXcel cryptographic engine driver. Those new algorithms are: - MD5 (and its hmac). - DES (ECB and CBC). - 3DES (ECB and CBC). The last patch was made on top of the algorithm additions, to enhance the driver's performance

[PATCH 13/14] arm64: dts: marvell: armada-cp110: update the crypto engine compatible

2018-06-28 Thread Antoine Tenart
New compatibles are now supported by the Inside Secure SafeXcel driver. As they are more specific than the old ones, they should be used whenever possible. This patch updates the Marvell cp110 device tree accordingly. Signed-off-by: Antoine Tenart --- arch/arm64/boot/dts/marvell/armada-cp110

[PATCH 07/14] crypto: inside-secure - add multiple processing engine support

2018-06-28 Thread Antoine Tenart
ne PE. Signed-off-by: Ofer Heifetz [Antoine: some reworks and commit message.] Signed-off-by: Antoine Tenart --- drivers/crypto/inside-secure/safexcel.c | 224 +--- drivers/crypto/inside-secure/safexcel.h | 44 +++-- 2 files changed, 150 insertions(+), 118 deletions(-)

[PATCH 14/14] arm64: dts: marvell: armada-37xx: update the crypto engine compatible

2018-06-28 Thread Antoine Tenart
New compatibles are now supported by the Inside Secure SafeXcel driver. As they are more specific than the old ones, they should be used whenever possible. This patch updates the Marvell Armada 37xx device tree accordingly. Signed-off-by: Antoine Tenart --- arch/arm64/boot/dts/marvell/armada

[PATCH 12/14] crypto: inside-secure - set tx_max_cmd_queue to 32

2018-06-28 Thread Antoine Tenart
configured to 5 (or less). Signed-off-by: Ofer Heifetz Signed-off-by: Antoine Tenart --- drivers/crypto/inside-secure/safexcel.c | 4 drivers/crypto/inside-secure/safexcel.h | 1 + 2 files changed, 5 insertions(+) diff --git a/drivers/crypto/inside-secure/safexcel.c b/drivers/crypto

[PATCH 11/14] crypto: inside-secure - reset CDR and RDR rings on module removal

2018-06-28 Thread Antoine Tenart
From: Ofer Heifetz This patch adds extra steps in the module removal path, to reset the command and result rings. The corresponding interrupts are cleared, and the ring address configuration is reset. Signed-off-by: Ofer Heifetz [Antoine: small reworks, commit message] Signed-off-by: Antoine

[PATCH 09/14] Documentation/bindings: crypto: inside-secure: eip197d support

2018-06-28 Thread Antoine Tenart
This patch documents the new compatible used for the eip197d engine, as this new engine is now supported by the Inside Secure SafeXcel cryptographic driver. Signed-off-by: Antoine Tenart --- .../devicetree/bindings/crypto/inside-secure-safexcel.txt | 3 ++- 1 file changed, 2 insertions

[PATCH 10/14] crypto: inside-secure - adjust the TRC configuration for EIP197D

2018-06-28 Thread Antoine Tenart
From: Ofer Heifetz This patch updates the TRC configuration so that the version of the EIP197 engine being used is taken into account, as the configuration differs between the EIP197B and the EIP197D. Signed-off-by: Ofer Heifetz [Antoine: commit message] Signed-off-by: Antoine Tenart

[PATCH 05/14] crypto: inside-secure - add an invalidation flag

2018-06-28 Thread Antoine Tenart
Signed-off-by: Antoine Tenart --- drivers/crypto/inside-secure/safexcel.c| 3 +++ drivers/crypto/inside-secure/safexcel.h| 5 + drivers/crypto/inside-secure/safexcel_cipher.c | 16 drivers/crypto/inside-secure/safexcel_hash.c | 8 4 files changed

[PATCH 00/14] crypto: inside-secure - EIP197d support

2018-06-28 Thread Antoine Tenart
capabilities of this new EIP197d engine, and to improve the existing support. Please note the DT patches (13/14 and 14/14) should go through the mvebu tree. Thanks! Antoine Antoine Tenart (9): crypto: inside-secure - move the firmware to a better location crypto: inside-secure - use precise

[PATCH] crypto: inside-secure - increase minimum transfer size

2018-05-28 Thread Antoine Tenart
From: Ofer Heifetz The token size was increased for AEAD support. Occasional authentication fails arise since the result descriptor overflows. This is because the token size and the engine minimal thresholds must be in sync. Signed-off-by: Ofer Heifetz Signed-off-by: Antoine Tenart --- Hi

[PATCH] crypto: inside-secure - do not use memset on MMIO

2018-05-17 Thread Antoine Tenart
Fixes: 1b44c5a60c13 ("crypto: inside-secure - add SafeXcel EIP197 crypto engine driver") Reported-by: Ofer Heifetz Signed-off-by: Antoine Tenart --- drivers/crypto/inside-secure/safexcel.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/crypto/inside-secur

[PATCH v2 06/10] crypto: inside-secure - fix the hash then encrypt/decrypt types

2018-05-14 Thread Antoine Tenart
these two defines weren't used back then. Signed-off-by: Antoine Tenart --- drivers/crypto/inside-secure/safexcel.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/crypto/inside-secure/safexcel.h b/drivers/crypto/inside-secure/safexcel.h index afdd099

  1   2   3   4   >