On Thu, Mar 8, 2018 at 9:14 AM, Greg Kroah-Hartman
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.
>
> Yeah! Nice job.
>
>>
&
ext meet :-)
It's worth mentioning I'll be giving a presentation next week at
Embedded Linux Conference US about some of the surprising benefits we
got from the process -
https://elciotna18.sched.com/event/d47bcefac0cd7dd456ad35d0f6ec9159
Come say hi if you're there.
Gilad
--
Gila
trivial.
Signed-off-by: Gilad Ben-Yossef
---
drivers/staging/Kconfig |2 -
drivers/staging/Makefile |1 -
drivers/staging/ccree/Kconfig| 27 -
drivers/staging/ccree/Makefile |7 -
drivers/staging/ccree/TODO | 10
Add CryptoCell AEAD support
Signed-off-by: Gilad Ben-Yossef
---
drivers/crypto/ccree/Makefile|2 +-
drivers/crypto/ccree/cc_aead.c | 2702 ++
drivers/crypto/ccree/cc_aead.h | 109 ++
drivers/crypto/ccree/cc_buffer_mgr.c | 882
Add CryptoCell async. hash and HMAC support.
Signed-off-by: Gilad Ben-Yossef
---
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 |1 +
drivers/crypto/ccree
Add FIPS mode support to CryptoCell driver
Signed-off-by: Gilad Ben-Yossef
---
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 | 111
Add CryptoCell skcipher support
Signed-off-by: Gilad Ben-Yossef
---
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 | 1130
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
---
drivers/crypto/Kc
Update Arm TrustZone CryptoCell driver entry move into drivers/crypto/
Signed-off-by: Gilad Ben-Yossef
---
MAINTAINERS | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/MAINTAINERS b/MAINTAINERS
index 1082846..560e068 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -3273,12
functionality (ivgen and secure HW keys),
which will be added later.
Signed-off-by: Gilad Ben-Yossef
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.
- Switched from legacy ablkcipher to
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
---
drivers/staging/ccree/Kconfig | 4 ++--
drivers/staging/ccree
rvdata *drvdata)
> goto out;
> }
>
> - drvdata->ivgen_handle = ivgen_ctx;
> -
> return cc_init_iv_sram(drvdata);
>
> out:
> --
> 2.15.1
>
Good catch!
Acked-by: Gilad Ben-Yossef
Thanks,
On Thu, Jan 11, 2018 at 12:03 PM, Stephan Mueller 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) {
>> +
Hi Corentin,
On Thu, Jan 11, 2018 at 12:01 PM, Corentin Labbe
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:
>
> ablkcipher is deprecated, so you need t
ctx_p->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 ret
_drvdata->cc_base)) {
> - dev_err(dev, "Failed to ioremap registers");
> + if (IS_ERR(new_drvdata->cc_base))
> return PTR_ERR(new_drvdata->cc_base);
> - }
>
> dev_dbg(dev, "Got MEM resource (%s): %pR\n", req
On Sat, Jan 13, 2018 at 3:21 PM, Greg Kroah-Hartman
wrote:
> On Thu, Jan 11, 2018 at 09:17:08AM +0000, Gilad Ben-Yossef wrote:
>> Remove the ccree driver from the staging tree in preparation to
>> introducing it in the crypto tree.
>>
>> Signed-off-by: Gilad Ben-Yosse
Update Arm TrustZone CryptoCell driver entry move into drivers/crypto/
Signed-off-by: Gilad Ben-Yossef
---
MAINTAINERS | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/MAINTAINERS b/MAINTAINERS
index 1082846..560e068 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -3273,12
Add CryptoCell AEAD support
Signed-off-by: Gilad Ben-Yossef
---
drivers/crypto/ccree/Makefile|2 +-
drivers/crypto/ccree/cc_aead.c | 2702 ++
drivers/crypto/ccree/cc_aead.h | 109 ++
drivers/crypto/ccree/cc_buffer_mgr.c | 882
Add FIPS mode support to CryptoCell driver
Signed-off-by: Gilad Ben-Yossef
---
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 | 112
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
---
drivers/crypto/Kc
Add CryptoCell async. hash and HMAC support.
Signed-off-by: Gilad Ben-Yossef
---
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 |1 +
drivers/crypto/ccree
Add CryptoCell ablkcipher support
Signed-off-by: Gilad Ben-Yossef
---
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 | 1167
Remove the ccree driver from the staging tree in preparation to
introducing it in the crypto tree.
Signed-off-by: Gilad Ben-Yossef
---
drivers/staging/Kconfig|2 -
drivers/staging/Makefile |1 -
.../devicetree/bindings/crypto/arm
ity (ivgen and secure HW keys).
Signed-off-by: Gilad Ben-Yossef
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: add AEAD support
cry
On Wed, Jan 10, 2018 at 6:39 PM, Greg Kroah-Hartman
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 to a point I believe it is
pes.
>
> Signed-off-by: Jeremy Sowden
> ---
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
--
Gilad Ben-Yossef
Chief Coffee Drinker
"
On Wed, Jan 10, 2018 at 3:08 PM, Jeremy Sowden 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
>> > for holding arrays
number of index and length variables from
> signed to unsigned integer types.
>
> * changed the return-types of a couple of functions that return length
> values which are assigned to one of these variables from signed to
> unsigned integer types.
>
Other that th
esult 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-Y
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
---
drivers/staging/ccree/cc_driver.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions
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
---
drivers/staging/ccree/cc_debugfs.h | 8
1 file changed, 4 insertions(+), 4 deletions(-)
di
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
---
drivers/staging/ccree/Makefile
Add the missing include of include file with function declarations.
Signed-off-by: Gilad Ben-Yossef
---
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
index f927a73..08f8db4 100644
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
---
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_driver.c | 31
On Mon, Jan 8, 2018 at 5:28 PM, Greg Kroah-Hartman
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 called
>> when they were added.
&
Add the missing include of include file with function declarations.
Signed-off-by: Gilad Ben-Yossef
---
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
index f927a73..08f8db4 100644
Update TODO to reflect work done
Signed-off-by: Gilad Ben-Yossef
---
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/staging/ccree/TODO
+++ b
Put pointer next to var name as per coding style.
Signed-off-by: Gilad Ben-Yossef
---
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/ccree/ssi_request_mgr.c
index 78f25e5
Remove include files not needed for compilation.
Signed-off-by: Gilad Ben-Yossef
---
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_driver.c | 31
Fix indentation of some function params in hash code for
better readability.
Signed-off-by: Gilad Ben-Yossef
---
drivers/staging/ccree/ssi_hash.c | 46 +---
1 file changed, 20 insertions(+), 26 deletions(-)
diff --git a/drivers/staging/ccree/ssi_hash.c b
Fold common code in hash call into service functions.
Signed-off-by: Gilad Ben-Yossef
---
drivers/staging/ccree/ssi_hash.c | 339 ++-
1 file changed, 116 insertions(+), 223 deletions(-)
diff --git a/drivers/staging/ccree/ssi_hash.c b/drivers/staging/ccree
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
---
drivers/staging/ccree/ssi_ivgen.c| 9 -
drivers/staging/ccree/ssi_sram_mgr.c
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
---
drivers/staging/ccree/ssi_h
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
---
drivers/staging/ccree/ssi_hash.c | 192 +--
1 file changed, 103 insertions(+), 89 deletions(-)
diff
Remove unused struct field.
Signed-off-by: Gilad Ben-Yossef
---
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/ccree/ssi_hash.c
+++ b
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
---
drivers/staging/ccree/ssi_buffer_mgr.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/staging/ccree
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
---
drivers/staging/ccree/Makefile | 3 ++-
drivers/staging/ccree/ssi_pm.c | 9 +---
drivers
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
---
drivers/staging/ccree/ssi_buffer_mgr.c | 3 ++-
1 file changed, 2 insertions(+), 1
me at the time.
Cc: sta...@vger.kernel.org
Signed-off-by: Gilad Ben-Yossef
---
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
index ff05ac8..ee7370c 100644
-
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
---
drivers/staging/ccree/ssi_request_mgr.c | 8 +---
1 file changed, 1 insertion(+), 7 deletions(-)
diff --
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
---
drivers/staging/ccree
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
---
drivers/staging/ccree/ssi_driver.c | 2 +
drivers/staging/ccree/ssi_hash.c | 121 -
drivers
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
---
drive
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
---
drivers/staging/ccree/cc_debugfs.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers
Remove the unused monitor_desc field.
Signed-off-by: Gilad Ben-Yossef
---
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..e1c01da 100644
--- a/drivers
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
---
drivers/staging/ccree/ssi_cipher.c | 2 +-
drivers/staging/ccree/ssi_hash.c | 15 ++-
2 files changed, 7 insertions(+), 10
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
---
drivers/staging/ccree/cc_crypto_ctx.h | 4 ++--
drivers/staging/ccree/dx_reg_common.h | 13 -
drivers/staging/ccree/ssi_driver.h| 5 +++--
3
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
---
drivers/staging/ccree/ssi_buffer_mgr.c | 19 +++--
drivers/staging/ccree
Replace verbatim GPL v2 copy with SPDX tag.
Signed-off-by: Gilad Ben-Yossef
---
drivers/staging/ccree/Kconfig| 2 ++
drivers/staging/ccree/Makefile | 2 ++
drivers/staging/ccree/cc_crypto_ctx.h| 17 ++---
drivers/staging/ccree/cc_debugfs.c | 17
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
---
drivers/staging/ccree/cc_hw_queue_defs.h | 13 +
drivers/staging/ccree/hash_defs.h| 23 ---
drivers
know 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
Changes from v2:
- Revert to SPDX-2.0 license tags as the kernel tools are not
ready yet for 3.0
Changes from v1:
-
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
> ---
> drivers/staging/ccree/ssi_sysfs.c | 21 -
>
On Wed, Jan 3, 2018 at 5:01 PM, Philippe Ombredanne
wrote:
> Gilad,
>
> On Wed, Jan 3, 2018 at 2:35 PM, Gilad Ben-Yossef wrote:
>> Replace verbatim GPL v2 copy with SPDX tag.
>>
>> Signed-off-by: Gilad Ben-Yossef
>
>
>
>> --- a/drivers/staging/ccre
Add the missing include of include file with function declarations.
Signed-off-by: Gilad Ben-Yossef
---
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
index 363a0ef..e07cbb1 100644
Update TODO to reflect work done
Signed-off-by: Gilad Ben-Yossef
---
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/staging/ccree/TODO
+++ b
Remove include files not needed for compilation.
Signed-off-by: Gilad Ben-Yossef
---
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_driver.c | 31
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
---
drivers/staging/ccree/ssi_ivgen.c| 9 -
drivers/staging/ccree/ssi_sram_mgr.c
Put pointer next to var name as per coding style.
Signed-off-by: Gilad Ben-Yossef
---
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/ccree/ssi_request_mgr.c
index 01f4756
Fold common code in hash call into service functions.
Signed-off-by: Gilad Ben-Yossef
---
drivers/staging/ccree/ssi_hash.c | 339 ++-
1 file changed, 116 insertions(+), 223 deletions(-)
diff --git a/drivers/staging/ccree/ssi_hash.c b/drivers/staging/ccree
Fix indentation of some function params in hash code for
better readability.
Signed-off-by: Gilad Ben-Yossef
---
drivers/staging/ccree/ssi_hash.c | 46 +---
1 file changed, 20 insertions(+), 26 deletions(-)
diff --git a/drivers/staging/ccree/ssi_hash.c b
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
---
drivers/staging/ccree/ssi_hash.c | 192 +--
1 file changed, 103 insertions(+), 89 deletions(-)
diff
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
---
drivers/staging/ccree/ssi_h
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
---
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/ccree/ssi_hash.c
+++ b
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
---
drivers/staging/ccree/Makefile | 3 ++-
drivers/staging/ccree/ssi_pm.c | 9 +---
drivers
me at the time.
Cc: sta...@vger.kernel.org
Signed-off-by: Gilad Ben-Yossef
---
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
index ffcd1f0..e05c87d 100644
-
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
---
drivers/staging/ccree/ssi_buffer_mgr.c | 3 ++-
1 file changed, 2 insertions(+), 1
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
---
drivers/staging/ccree/ssi_buffer_mgr.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/staging/ccree
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
---
drivers/staging/ccree
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
---
drivers/staging/ccree/ssi_request_mgr.c | 8 +---
1 file changed, 1 insertion(+), 7 deletions(-)
diff --
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
---
drive
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
---
drivers/staging/ccree/cc_debugfs.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers
Remove the unused monitor_desc field.
Signed-off-by: Gilad Ben-Yossef
---
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..18e2e1d 100644
--- a/drivers
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
---
drivers/staging/ccree/ssi_driver.c | 2 +
drivers/staging/ccree/ssi_hash.c | 121 -
drivers
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
---
drivers/staging/ccree/ssi_cipher.c | 2 +-
drivers/staging/ccree/ssi_hash.c | 15 ++-
2 files changed, 7 insertions(+), 10
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
---
drivers/staging/ccree/ssi_buffer_mgr.c | 19 +++--
drivers/staging/ccree
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
---
drivers/staging/ccree/cc_hw_queue_defs.h | 13 +
drivers/staging/ccree/hash_defs.h| 23 ---
drivers
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
---
drivers/staging/ccree/cc_crypto_ctx.h | 4 ++--
drivers/staging/ccree/dx_reg_common.h | 13 -
drivers/staging/ccree/ssi_driver.h| 5 +++--
3
Replace verbatim GPL v2 copy with SPDX tag.
Signed-off-by: Gilad Ben-Yossef
---
drivers/staging/ccree/Kconfig| 2 ++
drivers/staging/ccree/Makefile | 2 ++
drivers/staging/ccree/cc_crypto_ctx.h| 17 ++---
drivers/staging/ccree/cc_debugfs.c | 17
know 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
Changes from v1:
- Fixed wrong use of CPP style comments in SPDX include file
heade
ic 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 did not have s3cmci
compiled in) and was sur
On Mon, Jan 1, 2018 at 3:53 PM, Philippe Ombredanne
wrote:
> Gilad,
>
> On Mon, Jan 1, 2018 at 1:06 PM, Gilad Ben-Yossef wrote:
>> Replace verbatim GPL v2 copy with SPDX tag.
>>
>> Signed-off-by: Gilad Ben-Yossef
>
>
>
>> --- a/drivers/staging/ccre
Update TODO to reflect work done
Signed-off-by: Gilad Ben-Yossef
---
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/staging/ccree/TODO
+++ b
Remove include files not needed for compilation.
Signed-off-by: Gilad Ben-Yossef
---
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_driver.c | 31
Put pointer next to var name as per coding style.
Signed-off-by: Gilad Ben-Yossef
---
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/ccree/ssi_request_mgr.c
index b71200a
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
---
drivers/staging/ccree/cc_debugfs.c | 3 ++-
drivers/staging/ccree/ssi_ivgen.c
Fold common code in hash call into service functions.
Signed-off-by: Gilad Ben-Yossef
---
drivers/staging/ccree/ssi_hash.c | 339 ++-
1 file changed, 116 insertions(+), 223 deletions(-)
diff --git a/drivers/staging/ccree/ssi_hash.c b/drivers/staging/ccree
1 - 100 of 520 matches
Mail list logo