On Thu, Mar 8, 2018 at 9:14 AM, Greg Kroah-Hartman
<gre...@linuxfoundation.org> wrote:
> On Thu, Mar 08, 2018 at 08:44:38AM +0000, Gilad Ben-Yossef wrote:
>> Now when the ccree driver has been accepted into the cryptodev tree
>> we can remove the staging tree copy
e.
Gilad
--
Gilad Ben-Yossef
Chief Coffee Drinker
"If you take a class in large-scale robotics, can you end up in a
situation where the homework eats your dog?"
-- Jean-Baptiste Queru
___
devel mailing list
de...@linuxdri
is trivial.
Signed-off-by: Gilad Ben-Yossef <gi...@benyossef.com>
---
drivers/staging/Kconfig |2 -
drivers/staging/Makefile |1 -
drivers/staging/ccree/Kconfig| 27 -
drivers/staging/ccree/Makefile |7 -
drivers/staging/ccre
Add CryptoCell AEAD support
Signed-off-by: Gilad Ben-Yossef <gi...@benyossef.com>
---
drivers/crypto/ccree/Makefile|2 +-
drivers/crypto/ccree/cc_aead.c | 2702 ++
drivers/crypto/ccree/cc_aead.h | 109 ++
drivers/crypto
Add CryptoCell async. hash and HMAC support.
Signed-off-by: Gilad Ben-Yossef <gi...@benyossef.com>
---
drivers/crypto/ccree/Makefile|2 +-
drivers/crypto/ccree/cc_buffer_mgr.c | 261 +++-
drivers/crypto/ccree/cc_driver.c | 13 +
drivers/crypto/ccree/cc_driver.h
Add FIPS mode support to CryptoCell driver
Signed-off-by: Gilad Ben-Yossef <gi...@benyossef.com>
---
drivers/crypto/ccree/Makefile| 1 +
drivers/crypto/ccree/cc_driver.c | 29 +-
drivers/crypto/ccree/cc_driver.h | 1 +
drivers/crypto/ccree/cc_fips.c
Add CryptoCell skcipher support
Signed-off-by: Gilad Ben-Yossef <gi...@benyossef.com>
---
drivers/crypto/ccree/Makefile|2 +-
drivers/crypto/ccree/cc_buffer_mgr.c | 125
drivers/crypto/ccree/cc_buffer_mgr.h |8 +
drivers/crypto/ccree/cc_cipher.c
Introduce basic low level Arm TrustZone CryptoCell HW support.
This first patch doesn't actually register any Crypto API
transformations, these will follow up in the next patch.
This first revision supports the CC 712 REE component.
Signed-off-by: Gilad Ben-Yossef <gi...@benyossef.
Update Arm TrustZone CryptoCell driver entry move into drivers/crypto/
Signed-off-by: Gilad Ben-Yossef <gi...@benyossef.com>
---
MAINTAINERS | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/MAINTAINERS b/MAINTAINERS
index 1082846..560e068 100644
--- a/MAINTAINERS
functionality (ivgen and secure HW keys),
which will be added later.
Signed-off-by: Gilad Ben-Yossef <gi...@benyossef.com>
Changes from v1:
- Use KConfig directive to stop staging tree version to not
collide during link time as opposed to deleting it as indicated
by Greg KH.
- Switche
Rename the Kconfig var of the staging tree version of the driver
in preparation of introducing the final version of the driver
into the cryptodev tree to avoid link time symbol collisions.
Signed-off-by: Gilad Ben-Yossef <gi...@benyossef.com>
---
drivers/staging/ccree/Kconfig | 4 ++--
d
l_meta_dma,
> @@ -196,8 +198,6 @@ int cc_ivgen_init(struct cc_drvdata *drvdata)
> goto out;
> }
>
> - drvdata->ivgen_handle = ivgen_ctx;
> -
> return cc_init_iv_sram(drvdata);
>
> out:
> --
> 2.15.1
>
Good catch!
Acked
On Thu, Jan 11, 2018 at 12:03 PM, Stephan Mueller <smuel...@chronox.de> wrote:
> Am Donnerstag, 11. Januar 2018, 10:17:10 CET schrieb Gilad Ben-Yossef:
>
> Hi Gilad,
>
>> + // verify weak keys
>> + if (ctx_p->flow_mode == S_DIN_to_DES) {
>&g
Hi Corentin,
On Thu, Jan 11, 2018 at 12:01 PM, Corentin Labbe
<clabbe.montj...@gmail.com> wrote:
> On Thu, Jan 11, 2018 at 09:17:10AM +0000, Gilad Ben-Yossef wrote:
>> Add CryptoCell ablkcipher support
>>
>
> Hello
>
> I have some minor comments:
>
> ablkc
t;user.key_dma_addr,
>370 max_key_buf_size, DMA_TO_DEVICE);
>371 ctx_p->keylen = keylen;
>372
>373 dev_dbg(dev, "return safely");
> ^
> One extra space.
>
>374 retu
dev_dbg(dev, "Got MEM resource (%s): %pR\n", req_mem_cc_regs->name,
> req_mem_cc_regs);
>
Yeah, that makes sense.
Acked-by: Gilad Ben-Yossef <gi...@benyossef.com>
Thanks,
Gilad
--
Gilad Ben-Yossef
Chief Coffee Drinke
Update Arm TrustZone CryptoCell driver entry move into drivers/crypto/
Signed-off-by: Gilad Ben-Yossef <gi...@benyossef.com>
---
MAINTAINERS | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/MAINTAINERS b/MAINTAINERS
index 1082846..560e068 100644
--- a/MAINTAINERS
Add CryptoCell AEAD support
Signed-off-by: Gilad Ben-Yossef <gi...@benyossef.com>
---
drivers/crypto/ccree/Makefile|2 +-
drivers/crypto/ccree/cc_aead.c | 2702 ++
drivers/crypto/ccree/cc_aead.h | 109 ++
drivers/crypto
Add FIPS mode support to CryptoCell driver
Signed-off-by: Gilad Ben-Yossef <gi...@benyossef.com>
---
drivers/crypto/ccree/Makefile| 1 +
drivers/crypto/ccree/cc_driver.c | 29 +-
drivers/crypto/ccree/cc_driver.h | 1 +
drivers/crypto/ccree/cc_fips.c
Introduce basic low level Arm TrustZone CryptoCell HW support.
This first patch doesn't actually register any Crypto API
transformations, these will follow up in the next patch.
This first revision supports the CC 712 REE component.
Signed-off-by: Gilad Ben-Yossef <gi...@benyossef.
Add CryptoCell async. hash and HMAC support.
Signed-off-by: Gilad Ben-Yossef <gi...@benyossef.com>
---
drivers/crypto/ccree/Makefile|2 +-
drivers/crypto/ccree/cc_buffer_mgr.c | 257
drivers/crypto/ccree/cc_driver.c | 13 +
drivers/crypto/ccree/cc_driver.h
Add CryptoCell ablkcipher support
Signed-off-by: Gilad Ben-Yossef <gi...@benyossef.com>
---
drivers/crypto/ccree/Makefile|2 +-
drivers/crypto/ccree/cc_buffer_mgr.c | 125
drivers/crypto/ccree/cc_buffer_mgr.h | 10 +
drivers/crypto/ccree/cc_cipher.c
Remove the ccree driver from the staging tree in preparation to
introducing it in the crypto tree.
Signed-off-by: Gilad Ben-Yossef <gi...@benyossef.com>
---
drivers/staging/Kconfig|2 -
drivers/staging/Makefile |1 -
.../devi
and secure HW keys).
Signed-off-by: Gilad Ben-Yossef <gi...@benyossef.com>
Gilad Ben-Yossef (7):
staging: ccree: remove ccree from staging tree
crypto: ccree: introduce CryptoCell driver
crypto: ccree: add ablkcipher support
crypto: ccree: add ahash support
crypto: ccree: ad
On Wed, Jan 10, 2018 at 6:39 PM, Greg Kroah-Hartman
<gre...@linuxfoundation.org> wrote:
> On Wed, Jan 10, 2018 at 08:54:55AM +0200, Gilad Ben-Yossef wrote:
>> Hi folks,
>>
>> With the enormous help of people in the to and CCed lists I've gotten
>> the ccree driver
d to
> unsigned integer types.
>
> Signed-off-by: Jeremy Sowden <jer...@azazel.net>
> ---
Please run scripts/checkpatch.pl on patches before submission.
They have multiple coding style errors.
You should probably also read Documentation/process/submitting-patches.rst
Thanks,
Gilad
On Wed, Jan 10, 2018 at 3:08 PM, Jeremy Sowden <jer...@azazel.net> wrote:
> On 2018-01-10, at 15:03:01 +0200, Gilad Ben-Yossef wrote:
>> On Wed, Jan 10, 2018 at 1:53 PM, Jeremy Sowden wrote:
>> > The driver uses a mixture of signed and unsigned integer variables
>>
ther that that it looks good to me.
Thanks!
Gilad
--
Gilad Ben-Yossef
Chief Coffee Drinker
"If you take a class in large-scale robotics, can you end up in a
situation where the homework eats your dog?"
-- Jean-Baptiste Queru
___
of tcrypt tests.
- It works :-)
There are obviously more things todo, but I believe they are out of
scope for staging.
So, if you see something that still needs work, kindly let me know.
Alternatively, will you accept a patch moving it to drivers/crypto/?
Many thanks,
Gilad
--
Gilad Ben-Yossef
The dma mask var was defined as dma_addr_t but should be
u64. This showed as a sparse warning when building for 32 bit.
Fix it by changing type to u64 and drop the cast.
Signed-off-by: Gilad Ben-Yossef <gi...@benyossef.com>
---
drivers/staging/ccree/cc_driver.c | 4 ++--
1 file chan
The debugfs interface defines stub function if debugfs is not
enabled, which were missing the 'static inline' qualifiers causing
sparse warnings.
Signed-off-by: Gilad Ben-Yossef <gi...@benyossef.com>
---
drivers/staging/ccree/cc_debugfs.h | 8
1 file changed, 4 insertions
The ccree driver source files were using an inconsistent
naming convention stemming from what the company was called
when they were added.
Move to a single consistent naming convention for better
code readability.
Signed-off-by: Gilad Ben-Yossef <gi...@benyossef.com>
---
drivers/staging
Add the missing include of include file with function declarations.
Signed-off-by: Gilad Ben-Yossef <gi...@benyossef.com>
---
drivers/staging/ccree/cc_debugfs.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/staging/ccree/cc_debugfs.c
b/drivers/staging/ccree/cc_debugfs.c
File name consistency renames, include files diet and address
some sparse warnings.
Gilad Ben-Yossef (5):
staging: ccree: use a consistent file naming convention
staging: ccree: remove unneeded includes
staging: ccree: add missing include
staging: ccree: make stub function static inline
Remove include files not needed for compilation.
Signed-off-by: Gilad Ben-Yossef <gi...@benyossef.com>
---
drivers/staging/ccree/cc_aead.c| 7 ---
drivers/staging/ccree/cc_buffer_mgr.c | 6 --
drivers/staging/ccree/cc_cipher.c | 4
drivers/staging/ccree/cc_dr
On Mon, Jan 8, 2018 at 5:28 PM, Greg Kroah-Hartman
<gre...@linuxfoundation.org> wrote:
> On Sun, Jan 07, 2018 at 12:14:35PM +0000, Gilad Ben-Yossef wrote:
>> The ccree driver source files were using an inconsistent
>> naming convention stemming from what the company was cal
Add the missing include of include file with function declarations.
Signed-off-by: Gilad Ben-Yossef <gi...@benyossef.com>
---
drivers/staging/ccree/cc_debugfs.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/staging/ccree/cc_debugfs.c
b/drivers/staging/ccree/cc_debugfs.c
Update TODO to reflect work done
Signed-off-by: Gilad Ben-Yossef <gi...@benyossef.com>
---
drivers/staging/ccree/TODO | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/staging/ccree/TODO b/drivers/staging/ccree/TODO
index 6d8702b..b8e163d 100644
--- a/drivers/s
Put pointer next to var name as per coding style.
Signed-off-by: Gilad Ben-Yossef <gi...@benyossef.com>
---
drivers/staging/ccree/ssi_request_mgr.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/staging/ccree/ssi_request_mgr.c
b/drivers/staging
Remove include files not needed for compilation.
Signed-off-by: Gilad Ben-Yossef <gi...@benyossef.com>
---
drivers/staging/ccree/cc_aead.c| 7 ---
drivers/staging/ccree/cc_buffer_mgr.c | 6 --
drivers/staging/ccree/cc_cipher.c | 4
drivers/staging/ccree/cc_dr
Fix indentation of some function params in hash code for
better readability.
Signed-off-by: Gilad Ben-Yossef <gi...@benyossef.com>
---
drivers/staging/ccree/ssi_hash.c | 46 +---
1 file changed, 20 insertions(+), 26 deletions(-)
diff --git a/drivers/s
Fold common code in hash call into service functions.
Signed-off-by: Gilad Ben-Yossef <gi...@benyossef.com>
---
drivers/staging/ccree/ssi_hash.c | 339 ++-
1 file changed, 116 insertions(+), 223 deletions(-)
diff --git a/drivers/staging/ccree/ssi_ha
We were allocating buffers using sizeof(*struct->field) where field was
type void. Fix it by having a local variable with the real type.
Cc: sta...@vger.kernel.org
Signed-off-by: Gilad Ben-Yossef <gi...@benyossef.com>
---
drivers/staging/ccree/ssi_ivgen.c| 9 -
drivers/stag
The ccree hash code is using a double buffer to hold data
for processing but manages the buffers and their associated
data count in two separate fields and uses a predicate to
chose which to use.
Move to using a proper 2 members array for a much cleaner code.
Signed-off-by: Gilad Ben-Yossef <
Move to allocating the buffers needed for requests as part of
the request structure instead of malloc'ing each one on it's
own, making for simpler (and more efficient) code.
Signed-off-by: Gilad Ben-Yossef <gi...@benyossef.com>
---
drivers/staging/ccree/ssi_hash.
API op.
This also properly deals with hash_import() not knowing if
hash_init was called or not as it now no longer matters.
Signed-off-by: Gilad Ben-Yossef <gi...@benyossef.com>
---
drivers/staging/ccree/ssi_hash.c | 192 +--
1 file changed, 103 insertions(
Remove unused struct field.
Signed-off-by: Gilad Ben-Yossef <gi...@benyossef.com>
---
drivers/staging/ccree/ssi_hash.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/staging/ccree/ssi_hash.c b/drivers/staging/ccree/ssi_hash.c
index ee7370c..efea792 100644
--- a/drivers/staging
If we are asked for number of entries of an offset bigger than the
sg list we should not crash.
Cc: sta...@vger.kernel.org
Signed-off-by: Gilad Ben-Yossef <gi...@benyossef.com>
---
drivers/staging/ccree/ssi_buffer_mgr.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/d
Replace ugly ifdefs with some inline macros and Makefile magic
for optionally including power management related code for
better readability.
Signed-off-by: Gilad Ben-Yossef <gi...@benyossef.com>
---
drivers/staging/ccree/Makefile | 3 ++-
drivers/staging/ccree/ssi_pm.c
If we ran out of DMA pool buffers, we get into the unmap
code path with a NULL before. Deal with this by checking
the virtual mapping is not NULL.
Cc: sta...@vger.kernel.org
Signed-off-by: Gilad Ben-Yossef <gi...@benyossef.com>
---
drivers/staging/ccree/ssi_buffer_mgr.c | 3 ++-
1 file c
me at the time.
Cc: sta...@vger.kernel.org
Signed-off-by: Gilad Ben-Yossef <gi...@benyossef.com>
---
drivers/staging/ccree/ssi_hash.c | 11 ---
1 file changed, 4 insertions(+), 7 deletions(-)
diff --git a/drivers/staging/ccree/ssi_hash.c b/drivers/staging/ccree/ssi_hash.c
ind
PM suspend returning a none zero value is not an error. It simply
indicates a suspend is not advised right now so don't treat it as
an error.
Signed-off-by: Gilad Ben-Yossef <gi...@benyossef.com>
---
drivers/staging/ccree/ssi_request_mgr.c | 8 +---
1 file changed, 1 insertion
Crypto API tfm providers are required to provide a backlog
service, if so indicated, that queues up requests in the case
of the provider being busy and processing them later.
The ccree driver did not provide this facility. Add it now.
Signed-off-by: Gilad Ben-Yossef <gi...@benyossef.
The ccree driver was using a DMA operation to copy larval digest
from the ccree SRAM to RAM. Replace it with a simple memcpy.
Signed-off-by: Gilad Ben-Yossef <gi...@benyossef.com>
---
drivers/staging/ccree/ssi_driver.c | 2 +
drivers/staging/ccree/ssi_hash.c
a common internal
service function and return error instead of sleeping
for the asynchronous case.
The next patch will complete the fix by implementing
proper backlog handling.
Fixes: abefd6741d ("staging: ccree: introduce CryptoCell HW driver").
Signed-off-by: Gilad Ben-Yossef <gi...@
The debugfs global init and exit functions were missing
__init and __exit tags, potentially wasting memory.
Fix it by properly tagging them.
Signed-off-by: Gilad Ben-Yossef <gi...@benyossef.com>
---
drivers/staging/ccree/cc_debugfs.c | 4 ++--
1 file changed, 2 insertions(+), 2 del
Remove the unused monitor_desc field.
Signed-off-by: Gilad Ben-Yossef <gi...@benyossef.com>
---
drivers/staging/ccree/ssi_request_mgr.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/staging/ccree/ssi_request_mgr.c
b/drivers/staging/ccree/ssi_request_mgr.c
index 7686e14..e
Remove bogus GFP_DMA flag from memory allocations. ccree driver
does not operate over an ISA or similar limited bus.
Signed-off-by: Gilad Ben-Yossef <gi...@benyossef.com>
---
drivers/staging/ccree/ssi_cipher.c | 2 +-
drivers/staging/ccree/ssi_hash.c | 15 ++-
2 files chan
Fold the 2 macro defined in dx_reg_common.h into the file they
are used in and delete the file.
Signed-off-by: Gilad Ben-Yossef <gi...@benyossef.com>
---
drivers/staging/ccree/cc_crypto_ctx.h | 4 ++--
drivers/staging/ccree/dx_reg_common.h | 13 -
drivers/staging/ccree/ssi_dr
The ccree driver was allocating memory using GFP_KERNEL flag
always, ignoring the flags set in the crypto request. Fix it
by choosing gfp flags based on crypto request flags.
Signed-off-by: Gilad Ben-Yossef <gi...@benyossef.com>
---
drivers/staging/ccree/ssi_buffer_mgr.
Replace verbatim GPL v2 copy with SPDX tag.
Signed-off-by: Gilad Ben-Yossef <gi...@benyossef.com>
---
drivers/staging/ccree/Kconfig| 2 ++
drivers/staging/ccree/Makefile | 2 ++
drivers/staging/ccree/cc_crypto_ctx.h| 17 ++---
drivers/staging
Fold the two remaining enum in hash defs into the queue defs
that are using them and delete the hash defs include file.
Signed-off-by: Gilad Ben-Yossef <gi...@benyossef.com>
---
drivers/staging/ccree/cc_hw_queue_defs.h | 13 +
drivers/staging/ccree/hash_defs.h
about
that keeps it from moving out of staging to the best of my understanding
and would like to ask for a review before moving out of staging.
Signed-off-by: Gilad Ben-Yossef <gi...@benyossef.com>
Changes from v2:
- Revert to SPDX-2.0 license tags as the kernel tools are not
ready yet f
Hi George,
On Sat, Jan 6, 2018 at 5:47 PM, George Edward Bulmer
wrote:
> This fixes five instances of checkpatch warning:
> WARNING: line over 80 characters
>
Thank you for the patch.
> Signed-off-by: George Edward Bulmer
> ---
>
On Wed, Jan 3, 2018 at 5:01 PM, Philippe Ombredanne
<pombreda...@nexb.com> wrote:
> Gilad,
>
> On Wed, Jan 3, 2018 at 2:35 PM, Gilad Ben-Yossef <gi...@benyossef.com> wrote:
>> Replace verbatim GPL v2 copy with SPDX tag.
>>
>> Signed-off-by
Add the missing include of include file with function declarations.
Signed-off-by: Gilad Ben-Yossef <gi...@benyossef.com>
---
drivers/staging/ccree/cc_debugfs.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/staging/ccree/cc_debugfs.c
b/drivers/staging/ccree/cc_debugfs.c
Update TODO to reflect work done
Signed-off-by: Gilad Ben-Yossef <gi...@benyossef.com>
---
drivers/staging/ccree/TODO | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/staging/ccree/TODO b/drivers/staging/ccree/TODO
index 6d8702b..b8e163d 100644
--- a/drivers/s
Remove include files not needed for compilation.
Signed-off-by: Gilad Ben-Yossef <gi...@benyossef.com>
---
drivers/staging/ccree/cc_aead.c| 7 ---
drivers/staging/ccree/cc_buffer_mgr.c | 6 --
drivers/staging/ccree/cc_cipher.c | 4
drivers/staging/ccree/cc_dr
We were allocating buffers using sizeof(*struct->field) where field was
type void. Fix it by having a local variable with the real type.
Cc: sta...@vger.kernel.org
Signed-off-by: Gilad Ben-Yossef <gi...@benyossef.com>
---
drivers/staging/ccree/ssi_ivgen.c| 9 -
drivers/stag
Put pointer next to var name as per coding style.
Signed-off-by: Gilad Ben-Yossef <gi...@benyossef.com>
---
drivers/staging/ccree/ssi_request_mgr.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/staging/ccree/ssi_request_mgr.c
b/drivers/staging
Fold common code in hash call into service functions.
Signed-off-by: Gilad Ben-Yossef <gi...@benyossef.com>
---
drivers/staging/ccree/ssi_hash.c | 339 ++-
1 file changed, 116 insertions(+), 223 deletions(-)
diff --git a/drivers/staging/ccree/ssi_ha
Fix indentation of some function params in hash code for
better readability.
Signed-off-by: Gilad Ben-Yossef <gi...@benyossef.com>
---
drivers/staging/ccree/ssi_hash.c | 46 +---
1 file changed, 20 insertions(+), 26 deletions(-)
diff --git a/drivers/s
API op.
This also properly deals with hash_import() not knowing if
hash_init was called or not as it now no longer matters.
Signed-off-by: Gilad Ben-Yossef <gi...@benyossef.com>
---
drivers/staging/ccree/ssi_hash.c | 192 +--
1 file changed, 103 insertions(
Move to allocating the buffers needed for requests as part of
the request structure instead of malloc'ing each one on it's
own, making for simpler (and more efficient) code.
Signed-off-by: Gilad Ben-Yossef <gi...@benyossef.com>
---
drivers/staging/ccree/ssi_hash.
The ccree hash code is using a double buffer to hold data
for processing but manages the buffers and their associated
data count in two separate fields and uses a predicate to
chose which to use.
Move to using a proper 2 members array for a much cleaner code.
Signed-off-by: Gilad Ben-Yossef <
Remove unused struct field.
Signed-off-by: Gilad Ben-Yossef <gi...@benyossef.com>
---
drivers/staging/ccree/ssi_hash.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/staging/ccree/ssi_hash.c b/drivers/staging/ccree/ssi_hash.c
index e05c87d..4e11b5d 100644
--- a/drivers/staging
Replace ugly ifdefs with some inline macros and Makefile magic
for optionally including power management related code for
better readability.
Signed-off-by: Gilad Ben-Yossef <gi...@benyossef.com>
---
drivers/staging/ccree/Makefile | 3 ++-
drivers/staging/ccree/ssi_pm.c
me at the time.
Cc: sta...@vger.kernel.org
Signed-off-by: Gilad Ben-Yossef <gi...@benyossef.com>
---
drivers/staging/ccree/ssi_hash.c | 11 ---
1 file changed, 4 insertions(+), 7 deletions(-)
diff --git a/drivers/staging/ccree/ssi_hash.c b/drivers/staging/ccree/ssi_hash.c
ind
If we ran out of DMA pool buffers, we get into the unmap
code path with a NULL before. Deal with this by checking
the virtual mapping is not NULL.
Cc: sta...@vger.kernel.org
Signed-off-by: Gilad Ben-Yossef <gi...@benyossef.com>
---
drivers/staging/ccree/ssi_buffer_mgr.c | 3 ++-
1 file c
If we are asked for number of entries of an offset bigger than the
sg list we should not crash.
Cc: sta...@vger.kernel.org
Signed-off-by: Gilad Ben-Yossef <gi...@benyossef.com>
---
drivers/staging/ccree/ssi_buffer_mgr.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/d
Crypto API tfm providers are required to provide a backlog
service, if so indicated, that queues up requests in the case
of the provider being busy and processing them later.
The ccree driver did not provide this facility. Add it now.
Signed-off-by: Gilad Ben-Yossef <gi...@benyossef.
PM suspend returning a none zero value is not an error. It simply
indicates a suspend is not advised right now so don't treat it as
an error.
Signed-off-by: Gilad Ben-Yossef <gi...@benyossef.com>
---
drivers/staging/ccree/ssi_request_mgr.c | 8 +---
1 file changed, 1 insertion
a common internal
service function and return error instead of sleeping
for the asynchronous case.
The next patch will complete the fix by implementing
proper backlog handling.
Fixes: abefd6741d ("staging: ccree: introduce CryptoCell HW driver").
Signed-off-by: Gilad Ben-Yossef <gi...@
The debugfs global init and exit functions were missing
__init and __exit tags, potentially wasting memory.
Fix it by properly tagging them.
Signed-off-by: Gilad Ben-Yossef <gi...@benyossef.com>
---
drivers/staging/ccree/cc_debugfs.c | 4 ++--
1 file changed, 2 insertions(+), 2 del
Remove the unused monitor_desc field.
Signed-off-by: Gilad Ben-Yossef <gi...@benyossef.com>
---
drivers/staging/ccree/ssi_request_mgr.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/staging/ccree/ssi_request_mgr.c
b/drivers/staging/ccree/ssi_request_mgr.c
index ac6846f..1
The ccree driver was using a DMA operation to copy larval digest
from the ccree SRAM to RAM. Replace it with a simple memcpy.
Signed-off-by: Gilad Ben-Yossef <gi...@benyossef.com>
---
drivers/staging/ccree/ssi_driver.c | 2 +
drivers/staging/ccree/ssi_hash.c
Remove bogus GFP_DMA flag from memory allocations. ccree driver
does not operate over an ISA or similar limited bus.
Signed-off-by: Gilad Ben-Yossef <gi...@benyossef.com>
---
drivers/staging/ccree/ssi_cipher.c | 2 +-
drivers/staging/ccree/ssi_hash.c | 15 ++-
2 files chan
The ccree driver was allocating memory using GFP_KERNEL flag
always, ignoring the flags set in the crypto request. Fix it
by choosing gfp flags based on crypto request flags.
Signed-off-by: Gilad Ben-Yossef <gi...@benyossef.com>
---
drivers/staging/ccree/ssi_buffer_mgr.
Fold the two remaining enum in hash defs into the queue defs
that are using them and delete the hash defs include file.
Signed-off-by: Gilad Ben-Yossef <gi...@benyossef.com>
---
drivers/staging/ccree/cc_hw_queue_defs.h | 13 +
drivers/staging/ccree/hash_defs.h
Fold the 2 macro defined in dx_reg_common.h into the file they
are used in and delete the file.
Signed-off-by: Gilad Ben-Yossef <gi...@benyossef.com>
---
drivers/staging/ccree/cc_crypto_ctx.h | 4 ++--
drivers/staging/ccree/dx_reg_common.h | 13 -
drivers/staging/ccree/ssi_dr
Replace verbatim GPL v2 copy with SPDX tag.
Signed-off-by: Gilad Ben-Yossef <gi...@benyossef.com>
---
drivers/staging/ccree/Kconfig| 2 ++
drivers/staging/ccree/Makefile | 2 ++
drivers/staging/ccree/cc_crypto_ctx.h| 17 ++---
drivers/staging
about
that keeps it from moving out of staging to the best of my understanding
and would like to ask for a review before moving out of staging.
Thanks and happy new year ;-)
Signed-off-by: Gilad Ben-Yossef <gi...@benyossef.com>
Changes from v1:
- Fixed wrong use of CPP style comments in SPDX i
debugfs_reg32 debug_regs[] = {
> +static struct debugfs_reg32 debug_regs[] = {
> CC_DEBUG_REG(HOST_SIGNATURE),
> CC_DEBUG_REG(HOST_IRR),
> CC_DEBUG_REG(HOST_POWER_DOWN_EN),
> --
> 2.9.0
>
Thank you Arnd.
I ran into this issue myself via a sparse check (I di
On Mon, Jan 1, 2018 at 3:53 PM, Philippe Ombredanne
<pombreda...@nexb.com> wrote:
> Gilad,
>
> On Mon, Jan 1, 2018 at 1:06 PM, Gilad Ben-Yossef <gi...@benyossef.com> wrote:
>> Replace verbatim GPL v2 copy with SPDX tag.
>>
>> Signed-off-by
Update TODO to reflect work done
Signed-off-by: Gilad Ben-Yossef <gi...@benyossef.com>
---
drivers/staging/ccree/TODO | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/staging/ccree/TODO b/drivers/staging/ccree/TODO
index 6d8702b..b8e163d 100644
--- a/drivers/s
Remove include files not needed for compilation.
Signed-off-by: Gilad Ben-Yossef <gi...@benyossef.com>
---
drivers/staging/ccree/cc_aead.c| 7 ---
drivers/staging/ccree/cc_buffer_mgr.c | 6 --
drivers/staging/ccree/cc_cipher.c | 4
drivers/staging/ccree/cc_dr
Put pointer next to var name as per coding style.
Signed-off-by: Gilad Ben-Yossef <gi...@benyossef.com>
---
drivers/staging/ccree/ssi_request_mgr.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/staging/ccree/ssi_request_mgr.c
b/drivers/staging
We were allocating buffers using sizeof(*struct->field) where field was
type void. Fix it by having a local variable with the real type.
Cc: sta...@vger.kernel.org
Signed-off-by: Gilad Ben-Yossef <gi...@benyossef.com>
---
drivers/staging/ccree/cc_debugfs.c | 3 ++-
drivers/stag
Fold common code in hash call into service functions.
Signed-off-by: Gilad Ben-Yossef <gi...@benyossef.com>
---
drivers/staging/ccree/ssi_hash.c | 339 ++-
1 file changed, 116 insertions(+), 223 deletions(-)
diff --git a/drivers/staging/ccree/ssi_ha
Move to allocating the buffers needed for requests as part of
the request structure instead of malloc'ing each one on it's
own, making for simpler (and more efficient) code.
Signed-off-by: Gilad Ben-Yossef <gi...@benyossef.com>
---
drivers/staging/ccree/ssi_hash.
1 - 100 of 519 matches
Mail list logo