On Tue, 2017-08-15 at 09:26 +0300, Gilad Ben-Yossef wrote:
> Fix wrong indentation and line breaks, including missing tabs,
> breaking lines longer then 80 char or wrongly broken.
[]
> diff --git a/drivers/staging/ccree/ssi_driver.c
> b/drivers/staging/ccree/ssi_driver.c
[]
> -
Fix strings in log messages being split across lines and the resulting
alignment issues when being fixed.
Signed-off-by: Gilad Ben-Yossef
---
drivers/staging/ccree/ssi_aead.c| 9 ++--
drivers/staging/ccree/ssi_buffer_mgr.c | 86 ++---
drivers/staging/ccree/s
Change places where we alloc memory by sizeof type to sizeof var.
Signed-off-by: Gilad Ben-Yossef
---
drivers/staging/ccree/ssi_aead.c| 4 ++--
drivers/staging/ccree/ssi_cipher.c | 4 ++--
drivers/staging/ccree/ssi_driver.c | 2 +-
drivers/staging/ccree/ssi_hash.c| 4 ++
From: Suniel Mahesh
It is recommended to use managed function devm_ioremap_resource(),
which simplifies driver cleanup paths and driver code.
This patch does the following:
(a) replace request_mem_region(), ioremap() and corresponding error
handling with devm_ioremap_resource().
(b) remove struct
From: Suniel Mahesh
It is recommended to use managed function devm_kzalloc, which
simplifies driver cleanup paths and driver code.
This patch does the following:
(a) replace kzalloc with devm_kzalloc.
(b) drop kfree(), because memory allocated with devm_kzalloc() is
automatically freed on driver
From: Suniel Mahesh
It is recommended to use managed function devm_request_irq(),
which simplifies driver cleanup paths and driver code.
This patch does the following:
(a) replace platform_get_resource(), request_irq() and corresponding
error handling with platform_get_irq() and devm_request_irq(
The resource release on probe/init error was being handled
in an awkward manner and possibly leaking memory on certain
(unlikely) error path.
Fix it by simplifying the error resource release and making
it easier to track.
Reported-by: Dan Carpenter
Signed-off-by: Gilad Ben-Yossef
---
drivers/s
M32R requires special handling due due to how it has implemented
ioread32. It is also an orphaned arch on Linux and doesn't seem
to be worth the trouble. So until we have a real user, remove
support for it.
Signed-off-by: Gilad Ben-Yossef
---
drivers/staging/ccree/Kconfig | 2 +-
1 file changed,
From: Joe Perches
By default, debug logging is disabled by CC_DEBUG not being defined.
Convert SSI_LOG_DEBUG to use no_printk instead of an empty define
to validate formats and arguments.
Fix fallout.
Miscellanea:
o One of the conversions now uses %pR instead of multiple uses of %pad
Signed-
icache_setup_completion is no longer used. Remove it.
Signed-off-by: Gilad Ben-Yossef
---
drivers/staging/ccree/ssi_driver.c | 2 --
drivers/staging/ccree/ssi_driver.h | 1 -
2 files changed, 3 deletions(-)
diff --git a/drivers/staging/ccree/ssi_driver.c
b/drivers/staging/ccree/ssi_driver.c
in
The GET_DMA_BUFFER_TYPE macro was triggering a macro argument reuse
warning from checkpatch. Rewrite the macro as inline function instead
to avoid risk of unintended side effects.
Signed-off-by: Gilad Ben-Yossef
---
drivers/staging/ccree/ssi_buffer_mgr.c | 26 +-
drivers/
Fix indentation in first comment.
Signed-off-by: Gilad Ben-Yossef
---
drivers/staging/ccree/ssi_hash.c | 28 ++--
1 file changed, 14 insertions(+), 14 deletions(-)
diff --git a/drivers/staging/ccree/ssi_hash.c b/drivers/staging/ccree/ssi_hash.c
index b7d6586..b95c3ce 100
Fix wrong indentation and line breaks, including missing tabs,
breaking lines longer then 80 char or wrongly broken.
Signed-off-by: Gilad Ben-Yossef
---
drivers/staging/ccree/ssi_driver.c | 107 +++--
1 file changed, 67 insertions(+), 40 deletions(-)
diff --git a
Fix source line indentation and breaks
Signed-off-by: Gilad Ben-Yossef
---
drivers/staging/ccree/ssi_hash.c | 494 ++-
1 file changed, 284 insertions(+), 210 deletions(-)
diff --git a/drivers/staging/ccree/ssi_hash.c b/drivers/staging/ccree/ssi_hash.c
index b
Put struct init braces on line of it's own.
Signed-off-by: Gilad Ben-Yossef
---
drivers/staging/ccree/ssi_hash.c | 32
1 file changed, 24 insertions(+), 8 deletions(-)
diff --git a/drivers/staging/ccree/ssi_hash.c b/drivers/staging/ccree/ssi_hash.c
index e2dc5d8
Fix source line indentation and breaks in ssi_aead.c
Signed-off-by: Gilad Ben-Yossef
---
drivers/staging/ccree/ssi_aead.c | 1024 --
1 file changed, 532 insertions(+), 492 deletions(-)
diff --git a/drivers/staging/ccree/ssi_aead.c b/drivers/staging/ccree/ssi_
Replace noop macro with a noop inline function
Signed-off-by: Gilad Ben-Yossef
---
drivers/staging/ccree/ssi_driver.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/staging/ccree/ssi_driver.h
b/drivers/staging/ccree/ssi_driver.h
index 0b9c7e6..063a1cc 100644
---
Use BIT macro for bit definitions where needed.
Signed-off-by: Gilad Ben-Yossef
---
drivers/staging/ccree/ssi_cipher.h | 10 +-
drivers/staging/ccree/ssi_driver.c | 3 ++-
drivers/staging/ccree/ssi_driver.h | 6 +++---
3 files changed, 10 insertions(+), 9 deletions(-)
diff --git a/dri
Clean up comments: fix style, trim long lines and remove useless ones.
Signed-off-by: Gilad Ben-Yossef
---
drivers/staging/ccree/ssi_aead.c| 40 +
drivers/staging/ccree/ssi_aead.h| 47 ++---
drivers/staging/ccree/ssi_buffer_mgr.c |
Fix various spelling mistakes in comments.
Signed-off-by: Gilad Ben-Yossef
---
drivers/staging/ccree/ssi_cipher.c | 2 +-
drivers/staging/ccree/ssi_hash.c| 2 +-
drivers/staging/ccree/ssi_hash.h| 2 +-
drivers/staging/ccree/ssi_ivgen.c | 2 +-
drivers/staging/ccree/ssi
Fix multiple code indentation issues.
Signed-off-by: Gilad Ben-Yossef
---
drivers/staging/ccree/ssi_buffer_mgr.c | 23 ---
drivers/staging/ccree/ssi_cipher.c | 2 +-
drivers/staging/ccree/ssi_sysfs.c | 4 +++-
3 files changed, 16 insertions(+), 13 deletions(-)
dif
Replace BUG() macro usage that crash the kernel with alternatives
that signal error and/or try to recover.
Signed-off-by: Gilad Ben-Yossef
---
drivers/staging/ccree/ssi_buffer_mgr.c | 14 ++
drivers/staging/ccree/ssi_cipher.c | 1 -
drivers/staging/ccree/ssi_pm.c | 3
The crypto API requires saving the last blocks of ciphertext
in req->info for use as IV for CTS mode. The ccree driver
was not doing it and so failing tcrypt tests in some
situations. This patch fixes the issue.
Signed-off-by: Gilad Ben-Yossef
---
drivers/staging/ccree/ssi_cipher.c | 31
The series includes various bug fixes, code simplification and style
cleanups.
Changer from v2:
- Drop M32R as supported architecture, which resolve the kbuild bot
warnings on Joe Perches patch.
- Bug fix that properly saves last bytes of ciphertext for CTS in
skcipher
- Even more coding styl
On Mon, 2017-08-14 at 18:21 +0300, Gilad Ben-Yossef wrote:
> The mediatek driver starts several async crypto ops and waits for their
> completions. Move it over to generic code doing the same.
>
> Signed-off-by: Gilad Ben-Yossef
> ---
Acked-by: Ryder Lee
> drivers/crypto/mediatek/mtk-aes.c |
On Mon, 14 Aug 2017 18:21:15 +0300
Gilad Ben-Yossef wrote:
> Invoking a possibly async. crypto op and waiting for completion
> while correctly handling backlog processing is a common task
> in the crypto API implementation and outside users of it.
>
> This patch adds a generic implementation for
On Mon, Aug 14, 2017 at 10:20:18AM +0200, Stephan Mueller wrote:
> Hi Ted,
>
> drivers/char/random.c contains the following comment:
>
> """
> * Our mixing functions were analyzed by Lacharme, Roeck, Strubel, and
> * Videau in their paper, "The Linux Pseudorandom Number Generator
> * Revisited
On 08/14/2017 10:21 AM, Gilad Ben-Yossef wrote:
Replace -EBUSY with -EAGAIN when reporting transient busy
indication in the absence of backlog.
Signed-off-by: Gilad Ben-Yossef
Reviewed-by: Gary R Hook
---
drivers/crypto/ccp/ccp-crypto-main.c | 8 +++-
drivers/crypto/ccp/ccp-dev.c
The crypto API was using the -EBUSY return value to indicate
both a hard failure to submit a crypto operation into a
transformation provider when the latter was busy and the backlog
mechanism was not enabled as well as a notification that the
operation was queued into the backlog when the backlog m
Replace -EBUSY with -EAGAIN when reporting transient busy
indication in the absence of backlog.
Signed-off-by: Gilad Ben-Yossef
---
drivers/crypto/ccp/ccp-crypto-main.c | 8 +++-
drivers/crypto/ccp/ccp-dev.c | 7 +--
2 files changed, 8 insertions(+), 7 deletions(-)
diff --git a/
Now that -EBUSY return code only indicates backlog queueing
we can safely remove the now redundant check for the
CRYPTO_TFM_REQ_MAY_BACKLOG flag when -EBUSY is returned.
Signed-off-by: Gilad Ben-Yossef
---
drivers/crypto/marvell/cesa.c | 3 +--
drivers/crypto/marvell/cesa.h | 2 +-
2 files chang
Now that -EBUSY return code only indicates backlog queueing
we can safely remove the now redundant check for the
CRYPTO_TFM_REQ_MAY_BACKLOG flag when -EBUSY is returned.
Signed-off-by: Gilad Ben-Yossef
---
crypto/ahash.c| 12 +++-
crypto/cts.c | 6 ++
crypto/lrw.c
Invoking a possibly async. crypto op and waiting for completion
while correctly handling backlog processing is a common task
in the crypto API implementation and outside users of it.
This patch adds a generic implementation for doing so in
preparation for using it across the board instead of hand
algif starts several async crypto ops and waits for their completion.
Move it over to generic code doing the same.
Signed-off-by: Gilad Ben-Yossef
---
crypto/af_alg.c | 27 ---
crypto/algif_aead.c | 8
crypto/algif_hash.c | 30 ++-
DRBG is starting an async. crypto op and waiting for it complete.
Move it over to generic code doing the same.
The code now also passes CRYPTO_TFM_REQ_MAY_SLEEP flag indicating
crypto request memory allocation may use GFP_KERNEL which should
be perfectly fine as the code is obviously sleeping for
public_key_verify_signature() is starting an async crypto op and
waiting for it to complete. Move it over to generic code doing
the same.
Signed-off-by: Gilad Ben-Yossef
---
crypto/asymmetric_keys/public_key.c | 28
1 file changed, 4 insertions(+), 24 deletions(-)
d
testmgr is starting async. crypto ops and waiting for them to complete.
Move it over to generic code doing the same.
This also provides a test of the generic crypto async. wait code.
Signed-off-by: Gilad Ben-Yossef
---
crypto/testmgr.c | 204 ++---
gcm is starting an async. crypto op and waiting for it complete.
Move it over to generic code doing the same.
Signed-off-by: Gilad Ben-Yossef
---
crypto/gcm.c | 32 ++--
1 file changed, 6 insertions(+), 26 deletions(-)
diff --git a/crypto/gcm.c b/crypto/gcm.c
index 3
fscrypt starts several async. crypto ops and waiting for them to
complete. Move it over to generic code doing the same.
Signed-off-by: Gilad Ben-Yossef
---
fs/crypto/crypto.c | 28
fs/crypto/fname.c | 36 ++--
fs/cry
dm-verity is starting async. crypto ops and waiting for them to complete.
Move it over to generic code doing the same.
This also fixes a possible data coruption bug created by the
use of wait_for_completion_interruptible() without dealing
correctly with an interrupt aborting the wait prior to the
ima starts several async crypto ops and waits for their completions.
Move it over to generic code doing the same.
Signed-off-by: Gilad Ben-Yossef
Acked-by: Mimi Zohar
---
security/integrity/ima/ima_crypto.c | 56 +++--
1 file changed, 17 insertions(+), 39 deleti
cifs starts an async. crypto op and waits for their completion.
Move it over to generic code doing the same.
Signed-off-by: Gilad Ben-Yossef
Acked-by: Pavel Shilovsky
---
fs/cifs/smb2ops.c | 30 --
1 file changed, 4 insertions(+), 26 deletions(-)
diff --git a/fs/cif
tcrypt starts several async crypto ops and waits for their completions.
Move it over to generic code doing the same.
Signed-off-by: Gilad Ben-Yossef
---
crypto/tcrypt.c | 84 +
1 file changed, 25 insertions(+), 59 deletions(-)
diff --git
The talitos driver starts several async crypto ops and waits for their
completions. Move it over to generic code doing the same.
Signed-off-by: Gilad Ben-Yossef
---
drivers/crypto/talitos.c | 38 +-
1 file changed, 5 insertions(+), 33 deletions(-)
diff --git
The mediatek driver starts several async crypto ops and waits for their
completions. Move it over to generic code doing the same.
Signed-off-by: Gilad Ben-Yossef
---
drivers/crypto/mediatek/mtk-aes.c | 31 +--
1 file changed, 5 insertions(+), 26 deletions(-)
diff --g
The qce driver starts several async crypto ops and waits for their
completions. Move it over to generic code doing the same.
Signed-off-by: Gilad Ben-Yossef
---
drivers/crypto/qce/sha.c | 30 --
1 file changed, 4 insertions(+), 26 deletions(-)
diff --git a/drivers/c
The code sample is waiting for an async. crypto op completion.
Adapt sample to use the new generic infrastructure to do the same.
This also fixes a possible data coruption bug created by the
use of wait_for_completion_interruptible() without dealing
correctly with an interrupt aborting the wait pr
Many users of kernel async. crypto services have a pattern of
starting an async. crypto op and than using a completion
to wait for it to end.
This patch set simplifies this common use case in two ways:
First, by separating the return codes of the case where a
request is queued to a backlog due to
On Fri, Aug 11, 2017 at 09:20:10AM -0400, Chris Mason wrote:
>
>
> On 08/10/2017 03:25 PM, Hugo Mills wrote:
> > On Thu, Aug 10, 2017 at 01:41:21PM -0400, Chris Mason wrote:
> >> On 08/10/2017 04:30 AM, Eric Biggers wrote:
> >>>
> >>> Theses benchmarks are misleading because they compress the who
Commit 9ae433bc79f9 ("crypto: chacha20 - convert generic and x86 versions
to skcipher") ported the existing chacha20 code to use the new skcipher
API, and introduced a bug along the way. Unfortunately, the tcrypt tests
did not catch the error, and it was only found recently by Tobias.
Stefan kindl
We failed to catch a bug in the chacha20 code after porting it to the
skcipher API. We would have caught it if any chunked tests had been
defined, so define some now so we will catch future regressions.
Signed-off-by: Ard Biesheuvel
---
crypto/testmgr.h | 7 +++
1 file changed, 7 insertions(
This patch export crypto_skcipher_type2 like others cra_type
Signed-off-by: Corentin Labbe
---
crypto/skcipher.c | 3 ++-
include/crypto/algapi.h | 1 +
2 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/crypto/skcipher.c b/crypto/skcipher.c
index 4faa0fd53b0c..c6523826890f 1006
The current method for finding request type is based on crypto_tfm_alg_type.
But in case of skcipher, it is the same than ablkcipher.
Using cra_type for this work permits to make the distinction between the two.
Signed-off-by: Corentin Labbe
---
crypto/crypto_engine.c | 19 ---
The crypto engine could actually only enqueue hash and ablkcipher request.
This patch permit it to enqueue skcipher requets by adding all necessary
functions.
Signed-off-by: Corentin Labbe
---
crypto/crypto_engine.c | 114
include/crypto/engine.h
Hello
The crypto engine could actually only enqueue hash and ablkcipher request.
This patch serie permit it to enqueue skcipher requests by adding all necessary
functions.
Changes since v2
- added two patch for finding request type according to its cra_type
Changes since v1
- Aligned to column s
Am Montag, 14. August 2017, 14:25:49 CEST schrieb Plauth, Max:
Hi Max,
> Dear linux-crypto community,
>
> I think I might have run into a bug in crypto/scatterwalk.c:
> - at the end of scatterwalk_pagedone, sg_next(walk->sg) is fed as an
> argument to scatterwalk_start(...) - sg_next (lib/scatte
Dear linux-crypto community,
I think I might have run into a bug in crypto/scatterwalk.c:
- at the end of scatterwalk_pagedone, sg_next(walk->sg) is fed as an argument
to scatterwalk_start(...)
- sg_next (lib/scatterlist.c) returns NULL in the case of sg_is_last(sg)
- In this case, NULL is being
Two return case misses to call release_firmware() and so leak some
memory.
This patch create a fw_release label (and so a common error path)
and use it on all return case.
Detected by CoverityScan, CID#1416422 ("Resource Leak")
Signed-off-by: Corentin Labbe
---
drivers/crypto/cavium/cpt/cptpf_
Hi Linus:
This push fixes an error path bug in ixp4xx as well as a read
overrun in sha1-avx2.
Please pull from
git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6.git linus
Herbert Xu (1):
crypto: ixp4xx - Fix error handling path in 'aead_perform()'
megha@linux.intel.
Hi Stephan,
>>> The first part is clearly where AF_ALG fits and keyctl does not. This is
>>> provided with the current patch set. As the keyctl API only handles, well,
>>> keys, access to the raw ciphers may not be possible through this API. And
>>> let us face it, a lot of user space code shall s
Hi,
On Sun, Aug 13, 2017 at 8:21 PM, Sandy Harris wrote:
> Showing only the key parts of the message:
>
>> From: John Gilmore
>
> An exceedingly knowledgeable guy, one we should probably take seriously.
> https://en.wikipedia.org/wiki/John_Gilmore_(activist)
>
>> Most hardware crypto accelerator
Hi Ted,
drivers/char/random.c contains the following comment:
"""
* Our mixing functions were analyzed by Lacharme, Roeck, Strubel, and
* Videau in their paper, "The Linux Pseudorandom Number Generator
* Revisited" (see: http://eprint.iacr.org/2012/251.pdf). In their
* paper, they point out
Hi,
On Thu, Jun 29, 2017 at 1:19 PM, Horia Geantă wrote:
> On 6/28/2017 4:42 PM, Horia Geantă wrote:
>> On 6/28/2017 4:27 PM, David Gstir wrote:
>>> Certain cipher modes like CTS expect the IV (req->info) of
>>> ablkcipher_request (or equivalently req->iv of skcipher_request) to
>>> contain the l
Am Montag, 14. August 2017, 08:26:22 CEST schrieb Marcel Holtmann:
Hi Marcel,
> > The first part is clearly where AF_ALG fits and keyctl does not. This is
> > provided with the current patch set. As the keyctl API only handles, well,
> > keys, access to the raw ciphers may not be possible through
64 matches
Mail list logo