Re: [PATCH] crypto: sm3 - use the more precise type u32 instead of unsigned int

2021-03-26 Thread Gilad Ben-Yossef
+123,8 @@ static void sm3_compress(u32 *w, u32 *wt, u32 *m) > > static void sm3_transform(struct sm3_state *sst, u8 const *src) > { > - unsigned int w[68]; > - unsigned int wt[64]; > + u32 w[68]; > + u32 wt[64]; > > sm3_expand((u32 *)src, w, wt); > sm3_compress(w, wt, sst->state); > -- > 2.19.1.3.ge56e4f7 > -- Gilad Ben-Yossef Chief Coffee Drinker values of β will give rise to dom!

Re: [PATCH v3 0/4] crypto: switch to crypto API for EBOIV generation

2020-12-02 Thread Gilad Ben-Yossef
Hi, On Thu, Oct 29, 2020 at 12:05 PM Gilad Ben-Yossef wrote: > > > This series creates an EBOIV template that produces a skcipher > transform which passes through all operations to the skcipher, while > using the same skcipher and key to encrypt the input IV, which is > assu

Re: [PATCH 075/141] crypto: ccree - Fix fall-through warnings for Clang

2020-11-21 Thread Gilad Ben-Yossef
LOCK_SIZE)) > return 0; > + break; > default: > break; > } > + break; > default: > break; > } > -- > 2.27.0 > Acked-by: Gilad Ben-Yossef Thanks, Gilad -- Gilad Ben-Yossef Chief Coffee Drinker values of β will give rise to dom!

[PATCH v3] crypto: ccree - rework cache parameters handling

2020-11-21 Thread Gilad Ben-Yossef
Rework the setting of DMA cache parameters, program more appropriate values and explicitly set sharability domain. Signed-off-by: Gilad Ben-Yossef --- Changes from previous versions: - After discussion with Rob H., drop notion of setting the parameters from device tree and just use good

Re: [PATCH 1/2] dt-bindings: crypto: update ccree optional params

2020-11-19 Thread Gilad Ben-Yossef
Hi, On Tue, Nov 17, 2020 at 4:07 PM Robin Murphy wrote: > > On 2020-11-16 18:54, Rob Herring wrote: > > On Thu, Oct 22, 2020 at 1:18 AM Gilad Ben-Yossef > > wrote: > >> ... > > IMO if this is like PL330 where you just stick some raw AXI attributes > in

Re: [PATCH 1/2] dt-bindings: crypto: update ccree optional params

2020-11-19 Thread Gilad Ben-Yossef
ree source (which makes sense of course) but also the driver > > supporting their platform. > > It now looks like we've come a full circle to me :-) > > As I said, if the h/w is 'exactly the same' (hint: it rarely is), then > use a fallback compatible. Then the new SoC specific compatible is > there just in case. > > Think of compatible just as a VID/PID in PCI and USB land (though the > closest thing to a fallback there is class codes). They are the only > way we can uniquely identify h/w. Thanks Rob, this makes sense. Gilad -- Gilad Ben-Yossef Chief Coffee Drinker values of β will give rise to dom!

Re: [PATCH 1/2] dt-bindings: crypto: update ccree optional params

2020-11-16 Thread Gilad Ben-Yossef
On Mon, Nov 16, 2020 at 8:54 PM Rob Herring wrote: > > On Thu, Oct 22, 2020 at 1:18 AM Gilad Ben-Yossef wrote: > > > > > > Hi again, > > > > Any opinion on the suggested below? > > Sorry, lost in the pile... No problem at all. I know how it is... &

[PATCH v2 1/2] dt-bindings: crypto: update ccree optional params

2020-11-11 Thread Gilad Ben-Yossef
Document ccree driver supporting new optional parameters allowing to override cache parameters. Signed-off-by: Gilad Ben-Yossef Cc: Rob Herring --- Documentation/devicetree/bindings/crypto/arm-cryptocell.txt | 4 1 file changed, 4 insertions(+) diff --git a/Documentation/devicetree

[PATCH v2 0/2] add optional cache params override from DT

2020-11-11 Thread Gilad Ben-Yossef
of the setting clearer. Gilad Ben-Yossef (2): dt-bindings: crypto: update ccree optional params crypto: ccree - add custom cache params from DT file .../bindings/crypto/arm-cryptocell.txt| 4 + drivers/crypto/ccree/cc_driver.c | 100 +++--- drivers/crypto/ccree

[PATCH v2 2/2] crypto: ccree - add custom cache params from DT file

2020-11-11 Thread Gilad Ben-Yossef
Add optinal ability to override cache parameters and set new defaults. Signed-off-by: Gilad Ben-Yossef Cc: Rob Herring --- drivers/crypto/ccree/cc_driver.c | 100 ++- drivers/crypto/ccree/cc_driver.h | 4 +- drivers/crypto/ccree/cc_pm.c | 2 +- 3 files

Re: [PATCH v3 1/4] crypto: add eboiv as a crypto API template

2020-10-30 Thread Gilad Ben-Yossef
Hi, On Fri, Oct 30, 2020 at 12:33 PM Milan Broz wrote: > > On 29/10/2020 11:05, Gilad Ben-Yossef wrote: > > > > +config CRYPTO_EBOIV > > + tristate "EBOIV support for block encryption" > > + default DM_CRYPT > > + select CRYPTO_CBC &g

[PATCH v3 3/4] dm crypt: switch to EBOIV crypto API template

2020-10-29 Thread Gilad Ben-Yossef
Replace the explicit EBOIV handling in the dm-crypt driver with calls into the crypto API, which now possesses the capability to perform this processing within the crypto subsystem. Signed-off-by: Gilad Ben-Yossef --- drivers/md/dm-crypt.c | 61 ++- 1

[PATCH v3 2/4] crypto: add eboiv(cbc(aes)) test vectors

2020-10-29 Thread Gilad Ben-Yossef
Add test vectors for the use of the EBOIV template with cbc(aes) modes as it is being used by dm-crypt for BitLocker support. Vectors taken from dm-crypt test suite images. Signed-off-by: Gilad Ben-Yossef --- crypto/tcrypt.c | 9 ++ crypto/testmgr.c | 6 + crypto/testmgr.h | 279

[PATCH v3 4/4] crypto: ccree: re-introduce ccree eboiv support

2020-10-29 Thread Gilad Ben-Yossef
BitLocker eboiv support, which was removed in commit 1d8b41ff6991 ("crypto: ccree - remove bitlocker cipher") is reintroduced based on the crypto API new support for eboiv. Signed-off-by: Gilad Ben-Yossef Fixes: 1d8b41ff6991 ("crypto: ccree - remove bitlocker cipher") ---

[PATCH v3 1/4] crypto: add eboiv as a crypto API template

2020-10-29 Thread Gilad Ben-Yossef
in 5.6. This patch re-implements eboiv as a generic crypto API template, thus allowing use of a alternative architecture specific optimzied implementations (as well as saving a memory allocation along the way). Signed-off-by: Gilad Ben-Yossef Cc: Eric Biggers --- crypto/Kconfig | 23 + crypto

[PATCH v3 0/4] crypto: switch to crypto API for EBOIV generation

2020-10-29 Thread Gilad Ben-Yossef
-crypt test suite and on an arm 32 bit board with the CryptoCell hardware. Since no offical source for eboiv test vectors is known, the test vectors supplied as patch #2 are derived from sectors which are part of the dm-crypt test suite. Signed-off-by: Gilad Ben-Yossef Cc: Eric Biggers Cc: Milan Broz

[PATCH v2 4/4] crypto: ccree: re-introduce ccree eboiv support

2020-10-28 Thread Gilad Ben-Yossef
BitLocker eboiv support, which was removed in commit 1d8b41ff6991 ("crypto: ccree - remove bitlocker cipher") is reintroduced based on the crypto API new support for eboiv. Signed-off-by: Gilad Ben-Yossef Fixes: 1d8b41ff6991 ("crypto: ccree - remove bitlocker cipher") ---

[PATCH v2 0/4] crypto: switch to crypto API for EBOIV generation

2020-10-28 Thread Gilad Ben-Yossef
test suite and on an arm 32 bit board with the CryptoCell hardware. Since no offical source for eboiv test vectors is known, the test vectors supplied as patch #2 are derived from sectors which are part of the dm-crypt test suite. Signed-off-by: Gilad Ben-Yossef Cc: Eric Biggers Cc: Milan Broz

Re: [PATCH 3/4] dm crypt: switch to EBOIV crypto API template

2020-10-28 Thread Gilad Ben-Yossef
ems that setting CONFIG_EBOIV default to dm-crypto Kconfig option value does solves the problem, or have I missed something? Thanks, Gilad -- Gilad Ben-Yossef Chief Coffee Drinker values of β will give rise to dom!

[PATCH v2 2/4] crypto: add eboiv(cbc(aes)) test vectors

2020-10-28 Thread Gilad Ben-Yossef
Add test vectors for the use of the EBOIV template with cbc(aes) modes as it is being used by dm-crypt for BitLocker support. Vectors taken from dm-crypt test suite images. Signed-off-by: Gilad Ben-Yossef --- crypto/tcrypt.c | 9 ++ crypto/testmgr.c | 6 + crypto/testmgr.h | 279

[PATCH v2 3/4] dm crypt: switch to EBOIV crypto API template

2020-10-28 Thread Gilad Ben-Yossef
Replace the explicit EBOIV handling in the dm-crypt driver with calls into the crypto API, which now possesses the capability to perform this processing within the crypto subsystem. Signed-off-by: Gilad Ben-Yossef --- drivers/md/dm-crypt.c | 61 ++- 1

[PATCH v2 1/4] crypto: add eboiv as a crypto API template

2020-10-28 Thread Gilad Ben-Yossef
in 5.6. This patch re-implements eboiv as a generic crypto API template, thus allowing use of a alternative architecture specific optimzied implementations (as well as saving a memory allocation along the way). Signed-off-by: Gilad Ben-Yossef Cc: Eric Biggers --- crypto/Kconfig | 23 crypto

Re: [PATCH 3/4] dm crypt: switch to EBOIV crypto API template

2020-10-27 Thread Gilad Ben-Yossef
On Mon, Oct 26, 2020 at 9:04 PM Milan Broz wrote: > > > > On 26/10/2020 19:39, Eric Biggers wrote: > > On Mon, Oct 26, 2020 at 07:29:57PM +0100, Milan Broz wrote: > >> On 26/10/2020 18:52, Eric Biggers wrote: > >>> On Mon, Oct 26, 2020 at 03:04:46PM +0200,

Re: [PATCH 1/4] crypto: add eboiv as a crypto API template

2020-10-27 Thread Gilad Ben-Yossef
iv_instance_ctx *ictx; > struct skcipher_alg *alg; > u32 mask; > int err; ... Thank you very much for the review and assistance. I will send out a revised version. Thanks, Gilad -- Gilad Ben-Yossef Chief Coffee Drinker values of β will give rise to dom!

[PATCH 2/4] crypto: add eboiv(cbc(aes)) test vectors

2020-10-26 Thread Gilad Ben-Yossef
Add test vectors for the use of the EBOIV template with cbc(aes) modes as it is being used by dm-crypt for BitLocker support. Vectors taken from dm-crypt test suite images. Signed-off-by: Gilad Ben-Yossef --- crypto/tcrypt.c | 9 ++ crypto/testmgr.c | 6 + crypto/testmgr.h | 279

[PATCH 4/4] crypto: ccree: re-introduce ccree eboiv support

2020-10-26 Thread Gilad Ben-Yossef
BitLocker eboiv support, which was removed in commit 1d8b41ff6991 ("crypto: ccree - remove bitlocker cipher") is reintroduced based on the crypto API new support for eboiv. Signed-off-by: Gilad Ben-Yossef Fixes: 1d8b41ff6991 ("crypto: ccree - remove bitlocker cipher") ---

[PATCH 1/4] crypto: add eboiv as a crypto API template

2020-10-26 Thread Gilad Ben-Yossef
in 5.6. This patch re-implements eboiv as a generic crypto API template, thus allowing use of a alternative architecture specific optimzied implementations (as well as saving a memory allocation along the way). Signed-off-by: Gilad Ben-Yossef --- crypto/Kconfig | 21 crypto/Makefile | 1

[PATCH 0/4] crypto: switch to crypto API for EBOIV generation

2020-10-26 Thread Gilad Ben-Yossef
test suite and on an arm 32 bit board with the CryptoCell hardware. Since no offical source for eboiv test vectors is known, the test vectors supplied as patch #2 are derived from sectors which are part of the dm-crypt test suite. Gilad Ben-Yossef (4): crypto: add eboiv as a crypto API template

[PATCH 3/4] dm crypt: switch to EBOIV crypto API template

2020-10-26 Thread Gilad Ben-Yossef
Replace the explicit EBOIV handling in the dm-crypt driver with calls into the crypto API, which now possesses the capability to perform this processing within the crypto subsystem. Signed-off-by: Gilad Ben-Yossef --- drivers/md/Kconfig| 1 + drivers/md/dm-crypt.c | 61

Re: [PATCH 1/2] dt-bindings: crypto: update ccree optional params

2020-09-29 Thread Gilad Ben-Yossef
Hןת On Wed, Sep 23, 2020 at 4:57 AM Rob Herring wrote: > > On Wed, Sep 16, 2020 at 10:19:49AM +0300, Gilad Ben-Yossef wrote: > > Document ccree driver supporting new optional parameters allowing to > > customize the DMA transactions cache parameters and ACE bus sharabil

Re: [PATCH 2/2] crypto: ccree - add custom cache params from DT file

2020-09-21 Thread Gilad Ben-Yossef
Hi, On Fri, Sep 18, 2020 at 10:39 PM Nick Desaulniers wrote: > > On Thu, Sep 17, 2020 at 12:20 AM Gilad Ben-Yossef wrote: > > ... > > > > I am unable to understand this warning. It looks like it is > > complaining about a FIELD_GET sanity check that is always fals

Re: [PATCH 2/2] crypto: ccree - add custom cache params from DT file

2020-09-17 Thread Gilad Ben-Yossef
hmm... On Wed, Sep 16, 2020 at 4:48 PM kernel test robot wrote: > > url: > https://github.com/0day-ci/linux/commits/Gilad-Ben-Yossef/add-optional-cache-params-from-DT/20200916-152151 > base: > https://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git &g

Re: [PATCH v6 7/8] X.509: support OSCCA sm2-with-sm3 certificate verification

2020-09-16 Thread Gilad Ben-Yossef
On Mon, Sep 14, 2020 at 9:34 AM Tianjia Zhang wrote: > > Hi Gilad, > > On 9/13/20 3:12 PM, Gilad Ben-Yossef wrote: > > Hi, > > > > > > On Thu, Sep 3, 2020 at 4:13 PM Tianjia Zhang > > wrote: > >> > >> The digital certificate format

[PATCH 0/2] add optional cache params from DT

2020-09-16 Thread Gilad Ben-Yossef
Rework the setting of AXI bus cache parameters, including optionally allowing setting them from device tree Gilad Ben-Yossef (2): dt-bindings: crypto: update ccree optional params crypto: ccree - add custom cache params from DT file .../bindings/crypto/arm-cryptocell.txt| 4

[PATCH 2/2] crypto: ccree - add custom cache params from DT file

2020-09-16 Thread Gilad Ben-Yossef
Add optinal ability to customize DMA transactions cache parameters and ACE bus sharability properties and set new defaults. Signed-off-by: Gilad Ben-Yossef --- drivers/crypto/ccree/cc_driver.c | 89 ++-- drivers/crypto/ccree/cc_driver.h | 4 +- drivers/crypto/ccree

[PATCH 1/2] dt-bindings: crypto: update ccree optional params

2020-09-16 Thread Gilad Ben-Yossef
Document ccree driver supporting new optional parameters allowing to customize the DMA transactions cache parameters and ACE bus sharability properties. Signed-off-by: Gilad Ben-Yossef --- Documentation/devicetree/bindings/crypto/arm-cryptocell.txt | 4 1 file changed, 4 insertions

Re: [PATCH v6 7/8] X.509: support OSCCA sm2-with-sm3 certificate verification

2020-09-13 Thread Gilad Ben-Yossef
a, sig->data_size, > sig->digest); It looks like you are doing a separate init, update, finup every time - I would consider using crypto_shash_digest() in one go. In fact, considering the fact that you are allocating a tfm just for this use and then releasing it, I would consider switching to crypto_shash_tfm_digest() and dropping the kzalloc all together. This should simplify the code a bit. Other than that I don't have anything smart to say :-) Gilad -- Gilad Ben-Yossef Chief Coffee Drinker values of β will give rise to dom!

Re: [PATCH 16/22] crypto: ccree - add check for xts input length equal to zero

2020-08-08 Thread Gilad Ben-Yossef
xts(aes) but also for cts(cbc(aes)) > and cts(cbc(paes)). > > Cc: Gilad Ben-Yossef > Signed-off-by: Andrei Botila > --- > drivers/crypto/ccree/cc_cipher.c | 11 ++- > 1 file changed, 6 insertions(+), 5 deletions(-) > > diff --git a/drivers/crypto/ccree/cc_cipher.c

[PATCH 0/2] Remove none supported ciphers

2020-08-05 Thread Gilad Ben-Yossef
the CryptoCell HW has support for ciphers and modes not supported and used at this time by Linux. Remove the code supporting this in the ccree ddriver until such time support is added in the kernel. Gilad Ben-Yossef (2): crypto: ccree: remove data unit size support crypto: ccree: remove

[PATCH 2/2] crypto: ccree: remove bitlocker cipher

2020-08-05 Thread Gilad Ben-Yossef
Remove the bitlocker cipher which is not supported by the kernel. Signed-off-by: Gilad Ben-Yossef --- drivers/crypto/ccree/cc_cipher.c | 49 ++-- drivers/crypto/ccree/cc_crypto_ctx.h | 1 - 2 files changed, 3 insertions(+), 47 deletions(-) diff --git a/drivers

[PATCH 1/2] crypto: ccree: remove data unit size support

2020-08-05 Thread Gilad Ben-Yossef
Remove the implementaion of automatic advancement of sector size in IV for storage ciphers as its use is not supproted by the kernel. Signed-off-by: Gilad Ben-Yossef --- drivers/crypto/ccree/cc_cipher.c | 233 +-- drivers/crypto/ccree/cc_driver.h | 1 - 2 files

Re: [PATCH v2 1/3] crypto: ccree: fix resource leak on error path

2020-06-21 Thread Gilad Ben-Yossef
x/kernel/git/torvalds/linux.git/tree/Documentation/process/submitting-patches.rst?id=6469e8962c20b580b471790fe42367750599#n785 > Indeed and I did but for some reason I cannot fathom the cover letter did not make it to the list. I will try to resend it now. Gilad -- Gilad Ben-Yossef Chie

[PATCH v2 0/3] fixes and update to essiv support

2020-06-21 Thread Gilad Ben-Yossef
Small fixes and adapt essiv support to the new template format --- Changes from v1: - Incorporate coding style fixes suggested by Markus Elfring. Gilad Ben-Yossef (3): crypto: ccree: fix resource leak on error path crypto: ccree: adapt ccree essiv support to kcapi crypto: ccree: remove

[PATCH v2 3/3] crypto: ccree: remove unused field

2020-06-21 Thread Gilad Ben-Yossef
Remove yet another unused field left over from times gone by. Signed-off-by: Gilad Ben-Yossef --- drivers/crypto/ccree/cc_cipher.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/crypto/ccree/cc_cipher.c b/drivers/crypto/ccree/cc_cipher.c index 162871464438..442965b4cd9b 100644

[PATCH v2 2/3] crypto: ccree: adapt ccree essiv support to kcapi

2020-06-21 Thread Gilad Ben-Yossef
. Signed-off-by: Gilad Ben-Yossef Cc: Ard Biesheuvel Cc: Libo Wang Cc: Markus Elfring --- drivers/crypto/ccree/cc_cipher.c | 124 +++ 1 file changed, 93 insertions(+), 31 deletions(-) diff --git a/drivers/crypto/ccree/cc_cipher.c b/drivers/crypto/ccree/cc_cipher.c

[PATCH v2 0/3] fixes and update to essiv support

2020-06-21 Thread Gilad Ben-Yossef
Small fixes and adapt essiv support to the new template format --- Changes from v1: - Incorporate coding style fixes suggested by Markus Elfring. Gilad Ben-Yossef (3): crypto: ccree: fix resource leak on error path crypto: ccree: adapt ccree essiv support to kcapi crypto: ccree: remove

[PATCH v2 1/3] crypto: ccree: fix resource leak on error path

2020-06-21 Thread Gilad Ben-Yossef
Fix a small resource leak on the error path of cipher processing. Signed-off-by: Gilad Ben-Yossef Fixes: 63ee04c8b491e ("crypto: ccree - add skcipher support") Cc: Markus Elfring --- drivers/crypto/ccree/cc_cipher.c | 30 ++ 1 file changed, 18 inserti

Re: [PATCH 2/3] crypto: ccree: adapt ccree essiv support to kcapi

2020-06-21 Thread Gilad Ben-Yossef
your suggestions into consideration and will include them in the next revision of the patch set. Thanks again, Gilad -- Gilad Ben-Yossef Chief Coffee Drinker values of β will give rise to dom!

[PATCH 3/3] crypto: ccree: remove unused field

2020-06-21 Thread Gilad Ben-Yossef
Remove yet another unused field left over from times gone by. Signed-off-by: Gilad Ben-Yossef --- drivers/crypto/ccree/cc_cipher.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/crypto/ccree/cc_cipher.c b/drivers/crypto/ccree/cc_cipher.c index 6575e216262b..79cfb47c759c 100644

[PATCH 2/3] crypto: ccree: adapt ccree essiv supprot to kcapi

2020-06-21 Thread Gilad Ben-Yossef
key size. Signed-off-by: Gilad Ben-Yossef Cc: Ard Biesheuvel Cc: Libo Wang --- drivers/crypto/ccree/cc_cipher.c | 124 +++ 1 file changed, 93 insertions(+), 31 deletions(-) diff --git a/drivers/crypto/ccree/cc_cipher.c b/drivers/crypto/ccree/cc_cipher.c index

[PATCH 0/3] fixes and update to essiv support

2020-06-21 Thread Gilad Ben-Yossef
Small fixes and adapt essiv support to the new template format Gilad Ben-Yossef (3): crypto: ccree: fix resource leak on error path crypto: ccree: adapt ccree essiv supprot to kcapi crypto: ccree: remove unused field drivers/crypto/ccree/cc_cipher.c | 149

[PATCH 1/3] crypto: ccree: fix resource leak on error path

2020-06-21 Thread Gilad Ben-Yossef
Fix a small resource leak on the error path of cipher processing. Signed-off-by: Gilad Ben-Yossef --- drivers/crypto/ccree/cc_cipher.c | 30 ++ 1 file changed, 18 insertions(+), 12 deletions(-) diff --git a/drivers/crypto/ccree/cc_cipher.c b/drivers/crypto/ccree

Re: [PATCH 5/9] crypto: ccree - Rename arrays to avoid conflict with crypto/sha256.h

2019-09-03 Thread Gilad Ben-Yossef
naming. Signed-off-by: Gilad Ben-Yossef Thanks, Gilad

[PATCH v2] checkpatch: add *_NOTIFIER_HEAD as var definition

2019-08-19 Thread Gilad Ben-Yossef
Add *_NOTIFIER_HEAD as variable definition to avoid code like this: ATOMIC_NOTIFIER_HEAD(foo); EXPORT_SYMBOL_GPL(foo); >From triggering the the following warning: WARNING: EXPORT_SYMBOL(foo); should immediately follow its function/variable Signed-off-by: Gilad Ben-Yossef Cc: John Hubb

[PATCH v2] checkpatch: add *_NOTIFIER_HEAD as var definition

2019-07-04 Thread Gilad Ben-Yossef
Add *_NOTIFIER_HEAD as variable definition to avoid code like this: ATOMIC_NOTIFIER_HEAD(foo); EXPORT_SYMBOL_GPL(foo); >From triggering the the following warning: WARNING: EXPORT_SYMBOL(foo); should immediately follow its function/variable Signed-off-by: Gilad Ben-Yossef --- Changes from

[PATCH] checkpatch: add *_NOTIFIER_HEAD as var definition

2019-07-02 Thread Gilad Ben-Yossef
Add *_NOTIFIER_HEAD as variable definition to avoid code like this: ATOMIC_NOTIFIER_HEAD(foo); EXPORT_SYMBOL_GPL(foo); >From triggering the the following warning: WARNING: EXPORT_SYMBOL(foo); should immediately follow its function/variable Signed-off-by: Gilad Ben-Yossef --- scri

[PATCH 0/4] crypto: ccree: cleanups, fixes and TEE FIPS support

2019-07-02 Thread Gilad Ben-Yossef
Clean up unused ivgen support code and add support for notifiying Trusted Execution Enviornment of FIPS tests failures in FIPS mode. Gilad Ben-Yossef (4): crypto: ccree: drop legacy ivgen support crypto: ccree: account for TEE not ready to report crypto: fips: add FIPS test failure

[PATCH 2/4] crypto: ccree: account for TEE not ready to report

2019-07-02 Thread Gilad Ben-Yossef
-by: Gilad Ben-Yossef Fixes: ab8ec9658f5a ("crypto: ccree - add FIPS support") CC: sta...@vger.kernel.org # v4.17+ --- drivers/crypto/ccree/cc_fips.c | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/drivers/crypto/ccree/cc_fips.c b/drivers/crypto/ccree/cc_fi

[PATCH 3/4] crypto: fips: add FIPS test failure notification chain

2019-07-02 Thread Gilad Ben-Yossef
-off-by: Gilad Ben-Yossef --- crypto/fips.c| 11 +++ crypto/testmgr.c | 4 +++- include/linux/fips.h | 7 +++ 3 files changed, 21 insertions(+), 1 deletion(-) diff --git a/crypto/fips.c b/crypto/fips.c index 9dfed122d6da..b30a67b6c441 100644 --- a/crypto/fips.c +++ b

Re: [PATCH] crypto: ccree: fix spelling mistake "protedcted" -> "protected"

2019-04-28 Thread Gilad Ben-Yossef
On Fri, Apr 26, 2019 at 4:18 PM Colin King wrote: > > From: Colin Ian King > > There is a spelling mistake in a dev_dbg message, fix it. > > Signed-off-by: Colin Ian King Acked-By: Gilad Ben-Yossef Thanks! Gilad -- Gilad Ben-Yossef Chief Coffee Drinker values of β will give rise to dom!

[PATCH 02/35] crypto: ccree: move key load desc. before flow desc.

2019-04-18 Thread Gilad Ben-Yossef
Refactor the descriptor setup code in order to move the key loading descriptor to one before last position. This has no effect on current functionality but is needed for later support of Content Protection Policy keys. Signed-off-by: Gilad Ben-Yossef --- drivers/crypto/ccree/cc_cipher.c | 107

[PATCH 00/35] crypto: ccree: features and bug fixes for 5.2

2019-04-18 Thread Gilad Ben-Yossef
A set of new features, mostly support for CryptoCell 713 features including protected keys, security disable mode and new HW revision indetification interface alongside many bug fixes. Gilad Ben-Yossef (30): crypto: testmgr: add missing self test entries for protected keys crypto: ccree

Re: [PATCH] crypto: ccree: add missing inline qualifier

2019-02-18 Thread Gilad Ben-Yossef
Hi, On Mon, Feb 18, 2019 at 10:48 AM Geert Uytterhoeven wrote: > > On Mon, Feb 11, 2019 at 3:29 PM Gilad Ben-Yossef wrote: > > Commit 1358c13a48c4 ("crypto: ccree - fix resume race condition on init") > > was missing a "inline" qualifier for stub funct

[PATCH] crypto: ccree: add missing inline qualifier

2019-02-11 Thread Gilad Ben-Yossef
@kernel.org # v4.20 Signed-off-by: Gilad Ben-Yossef --- drivers/crypto/ccree/cc_pm.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/crypto/ccree/cc_pm.h b/drivers/crypto/ccree/cc_pm.h index f62624357020..907a6db4d6c0 100644 --- a/drivers/crypto/ccree/cc_pm.h +++

[PATCH] MAINTAINERS: crypto: ccree: remove co-maintainer

2019-02-07 Thread Gilad Ben-Yossef
The best-laid plans of mice and men often go awry. Remove Yael C. as co-maintainer as she moved on to other endeavours. Signed-off-by: Gilad Ben-Yossef --- MAINTAINERS | 1 - 1 file changed, 1 deletion(-) diff --git a/MAINTAINERS b/MAINTAINERS index 8c68de3cfd80..45ea92863a05 100644

[BUGFIX PATCH] crypto: ccree: fix resume race condition on init

2019-02-07 Thread Gilad Ben-Yossef
the race, until commit 8234f6734c5d ("PM-runtime: Switch autosuspend over to using hrtimers") changed that :-) Fix this by seperating the PM setup and enablement and doing the latter only at the end of the init sequence. Signed-off-by: Gilad Ben-Yossef Cc: Vincent Guittot Cc: sta...@

Re: Regression due to "PM-runtime: Switch autosuspend over to using hrtimers"

2019-02-07 Thread Gilad Ben-Yossef
On Thu, Feb 7, 2019 at 10:25 AM Gilad Ben-Yossef wrote: > > > > On Wed, 6 Feb 2019 at 17:40, Gilad Ben-Yossef wrote: > > > > > > Hi all, > > > > > > A regression was spotted in the ccree driver running on Arm 32 bit > > > causing a

Re: Regression due to "PM-runtime: Switch autosuspend over to using hrtimers"

2019-02-07 Thread Gilad Ben-Yossef
Hi, Thank for the quick response. On Wed, Feb 6, 2019 at 6:59 PM Vincent Guittot wrote: > > Hi Gilad, > > On Wed, 6 Feb 2019 at 17:40, Gilad Ben-Yossef wrote: > > > > Hi all, > > > > A regression was spotted in the ccree driver running on Arm 32 bit > >

Regression due to "PM-runtime: Switch autosuspend over to using hrtimers"

2019-02-06 Thread Gilad Ben-Yossef
: e24ddf6b e1a05000 e5941000 e28d6f6a (e1ca80d0) [ 11.508053] ---[ end trace 19720bed5fe13807 ]--- -- Gilad Ben-Yossef Chief Coffee Drinker values of β will give rise to dom!

Re: [PATCH 2/7] crypto: ccrree: no need to check return value of debugfs_create functions

2019-01-23 Thread Gilad Ben-Yossef
On Wed, Jan 23, 2019 at 3:37 PM Greg Kroah-Hartman wrote: > > On Wed, Jan 23, 2019 at 02:58:22PM +0200, Gilad Ben-Yossef wrote: > > Hi, > > > > On Tue, Jan 22, 2019 at 5:14 PM Greg Kroah-Hartman > > wrote: > > > > > > When calling d

Re: [PATCH 2/7] crypto: ccrree: no need to check return value of debugfs_create functions

2019-01-23 Thread Gilad Ben-Yossef
ng to create the files if the directory is not available? Thanks, Gilad > > Cc: Yael Chemla > Cc: Gilad Ben-Yossef > Cc: Herbert Xu > Cc: "David S. Miller" > Cc: linux-cry...@vger.kernel.org > Signed-off-by: Greg Kroah-Hartman > --- > drivers/crypto/ccree/cc

[PATCH 0/7] crypto: ccree: bug fixes and cleanups

2019-01-15 Thread Gilad Ben-Yossef
Assorted bug fixes and cleanups Gilad Ben-Yossef (3): crypto: ccree: unmap buffer before copying IV crypto: ccree: shared irq lines are not a bug crypto: ccree: don't copy zero size ciphertext Hadar Gat (4): crypto: ccree: improve error handling crypto: ccree: add error message

[PATCH 2/7] crypto: ccree: add error message

2019-01-15 Thread Gilad Ben-Yossef
From: Hadar Gat Add error message in case of too many mlli entries. Signed-off-by: Hadar Gat Signed-off-by: Gilad Ben-Yossef --- drivers/crypto/ccree/cc_buffer_mgr.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/crypto/ccree/cc_buffer_mgr.c b/drivers/crypto

[PATCH 5/7] crypto: ccree: unmap buffer before copying IV

2019-01-15 Thread Gilad Ben-Yossef
the copy. Signed-off-by: Gilad Ben-Yossef Fixes: 00904aa0cd59 ("crypto: ccree - fix iv handling") Cc: --- drivers/crypto/ccree/cc_cipher.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/crypto/ccree/cc_cipher.c b/drivers/crypto/ccree/cc_cipher.c index cc

[PATCH 3/7] crypto: ccree: fix free of unallocated mlli buffer

2019-01-15 Thread Gilad Ben-Yossef
Signed-off-by: Gilad Ben-Yossef --- drivers/crypto/ccree/cc_buffer_mgr.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/crypto/ccree/cc_buffer_mgr.c b/drivers/crypto/ccree/cc_buffer_mgr.c index 237a87a57830..0ee1c52da0a4 100644 --- a/drivers/crypto/ccree

[PATCH 4/7] crypto: ccree: remove legacy leftover

2019-01-15 Thread Gilad Ben-Yossef
From: Hadar Gat Remove legacy code no longer in use. Signed-off-by: Hadar Gat Signed-off-by: Gilad Ben-Yossef --- drivers/crypto/ccree/cc_driver.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/crypto/ccree/cc_driver.h b/drivers/crypto/ccree/cc_driver.h index 5be7fd431b05

[PATCH 7/7] crypto: ccree: don't copy zero size ciphertext

2019-01-15 Thread Gilad Ben-Yossef
For decryption in CBC mode we need to save the last ciphertext block for use as the next IV. However, we were trying to do this also with zero sized ciphertext resulting in a panic. Fix this by only doing the copy if the ciphertext length is at least of IV size. Signed-off-by: Gilad Ben-Yossef

[PATCH 6/7] crypto: ccree: shared irq lines are not a bug

2019-01-15 Thread Gilad Ben-Yossef
The ccree driver was logging an error if it got an interrupt but HW indicated nothing to do as might happen if sharing an irq line. Remove the error as this is normal and we already have a debug print for the IRR register value. Signed-off-by: Gilad Ben-Yossef --- drivers/crypto/ccree

[PATCH 0/7] bug fixes and cleanups

2019-01-15 Thread Gilad Ben-Yossef
Assorted bug fixes and cleanups Gilad Ben-Yossef (3): crypto: ccree: unmap buffer before copying IV crypto: ccree: shared irq lines are not a bug crypto: ccree: don't copy zero size ciphertext Hadar Gat (4): crypto: ccree: improve error handling crypto: ccree: add error message

[PATCH 1/7] crypto: ccree: improve error handling

2019-01-15 Thread Gilad Ben-Yossef
From: Hadar Gat pass the returned error code to the higher level functions Signed-off-by: Hadar Gat Signed-off-by: Gilad Ben-Yossef --- drivers/crypto/ccree/cc_buffer_mgr.c | 74 +--- 1 file changed, 35 insertions(+), 39 deletions(-) diff --git a/drivers/crypto/ccree

Re: [PATCH] crypto: ccree - avoid implicit enum conversion

2018-10-11 Thread Gilad Ben-Yossef
this "overloading". Given this overloading of meaning an "int" type is indeed a better suited type here. Thanks, Gilad -- Gilad Ben-Yossef Chief Coffee Drinker values of β will give rise to dom!

Re: [PATCH] crypto: ccree - avoid implicit enum conversion

2018-10-11 Thread Gilad Ben-Yossef
this "overloading". Given this overloading of meaning an "int" type is indeed a better suited type here. Thanks, Gilad -- Gilad Ben-Yossef Chief Coffee Drinker values of β will give rise to dom!

Re: [PATCH] crypto: ccree - avoid implicit enum conversion

2018-10-11 Thread Gilad Ben-Yossef
Thank you. We actually had a patch fixing this in the pipeline but your fix is simpler. :-) Acked-by: Gilad Ben-Yossef Gilad -- Gilad Ben-Yossef Chief Coffee Drinker values of β will give rise to dom!

Re: [PATCH] crypto: ccree - avoid implicit enum conversion

2018-10-11 Thread Gilad Ben-Yossef
Thank you. We actually had a patch fixing this in the pipeline but your fix is simpler. :-) Acked-by: Gilad Ben-Yossef Gilad -- Gilad Ben-Yossef Chief Coffee Drinker values of β will give rise to dom!

[PATCH v2 5/5] arm64: dts: renesas: r8a7795: add ccree binding

2018-05-24 Thread Gilad Ben-Yossef
Add bindings for CryptoCell instance in the SoC. Signed-off-by: Gilad Ben-Yossef <gi...@benyossef.com> --- arch/arm64/boot/dts/renesas/r8a7795.dtsi | 9 + 1 file changed, 9 insertions(+) diff --git a/arch/arm64/boot/dts/renesas/r8a7795.dtsi b/arch/arm64/boot/dts/renesas/r8a779

[PATCH v2 5/5] arm64: dts: renesas: r8a7795: add ccree binding

2018-05-24 Thread Gilad Ben-Yossef
Add bindings for CryptoCell instance in the SoC. Signed-off-by: Gilad Ben-Yossef --- arch/arm64/boot/dts/renesas/r8a7795.dtsi | 9 + 1 file changed, 9 insertions(+) diff --git a/arch/arm64/boot/dts/renesas/r8a7795.dtsi b/arch/arm64/boot/dts/renesas/r8a7795.dtsi index d842940..3ac75db

[PATCH v2 3/5] crypto: ccree: silence debug prints

2018-05-24 Thread Gilad Ben-Yossef
The cache parameter register configuration was being too verbose. Use dev_dbg() to only provide the information if needed. Signed-off-by: Gilad Ben-Yossef <gi...@benyossef.com> --- drivers/crypto/ccree/cc_driver.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/d

[PATCH v2 2/5] crypto: ccree: better clock handling

2018-05-24 Thread Gilad Ben-Yossef
Use managed clock handling, differentiate between no clock (possibly OK) and clock init failure (never OK) and correctly handle clock detection being deferred. Suggested-by: Geert Uytterhoeven <ge...@linux-m68k.org> Signed-off-by: Gilad Ben-Yossef <gi...@benyossef.com> --- drivers/

[PATCH v2 4/5] clk: renesas: r8a7795: add ccree clock bindings

2018-05-24 Thread Gilad Ben-Yossef
This patch adds the clock used by the CryptoCell 630p instance in the SoC. Signed-off-by: Gilad Ben-Yossef <gi...@benyossef.com> --- This patch depends upon the "clk: renesas: r8a7795: Add CR clock" patch from Geert Uytterhoeven. drivers/clk/renesas/r8a7795-cpg-mssr.c | 1 + 1

[PATCH v2 3/5] crypto: ccree: silence debug prints

2018-05-24 Thread Gilad Ben-Yossef
The cache parameter register configuration was being too verbose. Use dev_dbg() to only provide the information if needed. Signed-off-by: Gilad Ben-Yossef --- drivers/crypto/ccree/cc_driver.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/crypto/ccree

[PATCH v2 2/5] crypto: ccree: better clock handling

2018-05-24 Thread Gilad Ben-Yossef
Use managed clock handling, differentiate between no clock (possibly OK) and clock init failure (never OK) and correctly handle clock detection being deferred. Suggested-by: Geert Uytterhoeven Signed-off-by: Gilad Ben-Yossef --- drivers/crypto/ccree/cc_driver.c | 20 +++- 1

[PATCH v2 4/5] clk: renesas: r8a7795: add ccree clock bindings

2018-05-24 Thread Gilad Ben-Yossef
This patch adds the clock used by the CryptoCell 630p instance in the SoC. Signed-off-by: Gilad Ben-Yossef --- This patch depends upon the "clk: renesas: r8a7795: Add CR clock" patch from Geert Uytterhoeven. drivers/clk/renesas/r8a7795-cpg-mssr.c | 1 + 1 file changed, 1 insertio

[PATCH v2 0/5] crypto: ccree: cleanup, fixes and R-Car enabling

2018-05-24 Thread Gilad Ben-Yossef
fields as indicated by Geert Uytterhoeven. - Better clock enabling as suggested by Geert Uytterhoeven. Note! the last two patches in the set depend on the "clk: renesas: r8a7795: Add CR clock" patch from Geert Uytterhoeven. Gilad Ben-Yossef (5): crypto: ccree: correct host regs offse

[PATCH v2 1/5] crypto: ccree: correct host regs offset

2018-05-24 Thread Gilad Ben-Yossef
;) Cc: sta...@vger.kernel.org Signed-off-by: Gilad Ben-Yossef <gi...@benyossef.com> --- drivers/crypto/ccree/cc_debugfs.c | 7 +-- drivers/crypto/ccree/cc_driver.c| 8 ++-- drivers/crypto/ccree/cc_driver.h| 2 ++ drivers/crypto/ccree/cc_host_regs.h | 6 -- 4 files changed, 17

[PATCH v2 0/5] crypto: ccree: cleanup, fixes and R-Car enabling

2018-05-24 Thread Gilad Ben-Yossef
fields as indicated by Geert Uytterhoeven. - Better clock enabling as suggested by Geert Uytterhoeven. Note! the last two patches in the set depend on the "clk: renesas: r8a7795: Add CR clock" patch from Geert Uytterhoeven. Gilad Ben-Yossef (5): crypto: ccree: correct host regs offse

[PATCH v2 1/5] crypto: ccree: correct host regs offset

2018-05-24 Thread Gilad Ben-Yossef
;) Cc: sta...@vger.kernel.org Signed-off-by: Gilad Ben-Yossef --- drivers/crypto/ccree/cc_debugfs.c | 7 +-- drivers/crypto/ccree/cc_driver.c| 8 ++-- drivers/crypto/ccree/cc_driver.h| 2 ++ drivers/crypto/ccree/cc_host_regs.h | 6 -- 4 files changed, 17 insertions(+), 6 deletion

Re: [PATCH 3/3] arm64: dts: renesas: r8a7795: add ccree binding

2018-05-24 Thread Gilad Ben-Yossef
On Tue, May 22, 2018 at 10:48 AM, Geert Uytterhoeven <ge...@linux-m68k.org> wrote: > Hi Gilad, > > On Mon, May 21, 2018 at 3:43 PM, Gilad Ben-Yossef <gi...@benyossef.com> wrote: >> On Thu, May 17, 2018 at 1:16 PM, Geert Uytterhoeven >> <ge...@linux-m68k.org>

Re: [PATCH 3/3] arm64: dts: renesas: r8a7795: add ccree binding

2018-05-24 Thread Gilad Ben-Yossef
On Tue, May 22, 2018 at 10:48 AM, Geert Uytterhoeven wrote: > Hi Gilad, > > On Mon, May 21, 2018 at 3:43 PM, Gilad Ben-Yossef wrote: >> On Thu, May 17, 2018 at 1:16 PM, Geert Uytterhoeven >> wrote: >>> Indeed. From a quick glance, it looks like drivers/cry

Re: [PATCH 3/3] arm64: dts: renesas: r8a7795: add ccree binding

2018-05-21 Thread Gilad Ben-Yossef
abort). > I was trying to do as you suggested but I didn't quite get what is the dev_id (2nd) parameter to devm_clk_get parameter is supposed to be. I see what of_clk_get() is doing, so can replicate that but it seems an over kill. Any ideas? Thanks, Gilad -- Gilad Ben-Yossef Chief Coffee Drink

Re: [PATCH 3/3] arm64: dts: renesas: r8a7795: add ccree binding

2018-05-21 Thread Gilad Ben-Yossef
you suggested but I didn't quite get what is the dev_id (2nd) parameter to devm_clk_get parameter is supposed to be. I see what of_clk_get() is doing, so can replicate that but it seems an over kill. Any ideas? Thanks, Gilad -- Gilad Ben-Yossef Chief Coffee Drinker "If you take a class i

  1   2   3   4   5   6   7   8   9   10   >