[PATCH] crypto: qat - fix some timeout tests

2015-12-15 Thread Yang Pingchao
Change the timeout condition since the times value would be -1 after running MAX_RETRY_TIMES. Reported-by: Dan Carpenter Signed-off-by: Yang Pingchao --- drivers/crypto/qat/qat_common/qat_hal.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/crypto/qat/qat_common/qat

[PATCH] crypto: qat - fix CTX_ENABLES bits shift direction issue

2015-12-15 Thread Yang Pingchao
AE CTX bits should be 8-15 in CTX_ENABLES, so the mask value 0xff should be left shifted 0x8. Reported-by: Dan Carpenter Signed-off-by: Yang Pingchao --- drivers/crypto/qat/qat_common/qat_hal.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/crypto/qat/qat_common/qat

Re: [patch] crypto: qat - fix some timeout tests

2015-12-15 Thread Dan Carpenter
On Tue, Dec 15, 2015 at 12:27:23PM -0800, Tadeusz Struk wrote: > Since the times var is an signed int I think we should rather change the > condition: I don't see what signed int has to do with anything. > > diff --git a/drivers/crypto/qat/qat_common/qat_hal.c > b/drivers/crypto/qat/qat_common

Re: [PATCH] net: fix uninitialized variable issue

2015-12-15 Thread Eric Dumazet
On Tue, 2015-12-15 at 14:42 -0800, Tadeusz Struk wrote: > It was added in this commit: 0345f93138b2 ("net: socket: add support for > async operations") > Thanks ! -- To unsubscribe from this list: send the line "unsubscribe linux-crypto" in the body of a message to majord...@vger.kernel.org M

Re: [PATCH] net: fix uninitialized variable issue

2015-12-15 Thread Tadeusz Struk
On 12/15/2015 11:02 AM, Eric Dumazet wrote: > On Tue, 2015-12-15 at 10:46 -0800, Tadeusz Struk wrote: >> msg_iocb needs to be initialized on the recv/recvfrom path. >> Otherwise afalg will wrongly interpret it as an async call. >> >> Cc: sta...@vger.kernel.org >> Reported-by: Harald Freudenberger

Re: [PATCH] net: fix uninitialized variable issue

2015-12-15 Thread David Miller
From: Tadeusz Struk Date: Tue, 15 Dec 2015 10:46:17 -0800 > msg_iocb needs to be initialized on the recv/recvfrom path. > Otherwise afalg will wrongly interpret it as an async call. > > Cc: sta...@vger.kernel.org > Reported-by: Harald Freudenberger > Signed-off-by: Tadeusz Struk Looks good, a

Re: [patch] crypto: qat - fix some timeout tests

2015-12-15 Thread Tadeusz Struk
On 12/15/2015 02:05 AM, Dan Carpenter wrote: > We do an "if (!times)" test later to see if we ran the loop too many > times, but because it is a postop negate that means times is -1 when we > exit that way. I have fixed this by changing it from a post op to a > preop. > > Fixes: b3416fb8a2f5 ('cr

Re: [PATCH] net: fix uninitialized variable issue

2015-12-15 Thread Eric Dumazet
On Tue, 2015-12-15 at 10:46 -0800, Tadeusz Struk wrote: > msg_iocb needs to be initialized on the recv/recvfrom path. > Otherwise afalg will wrongly interpret it as an async call. > > Cc: sta...@vger.kernel.org > Reported-by: Harald Freudenberger > Signed-off-by: Tadeusz Struk > --- > net/socke

[PATCH] net: fix uninitialized variable issue

2015-12-15 Thread Tadeusz Struk
msg_iocb needs to be initialized on the recv/recvfrom path. Otherwise afalg will wrongly interpret it as an async call. Cc: sta...@vger.kernel.org Reported-by: Harald Freudenberger Signed-off-by: Tadeusz Struk --- net/socket.c |1 + 1 file changed, 1 insertion(+) diff --git a/net/socket.c

Re: [PATCH v4 5/5] crypto: AES CBC multi-buffer glue code

2015-12-15 Thread Tim Chen
On Sat, 2015-12-12 at 13:48 +0800, Herbert Xu wrote: > On Fri, Dec 11, 2015 at 08:54:40AM -0800, Tim Chen wrote: > > Direct call I assume have less overhead. Let me think about > > static inline int crypto_ablkcipher_encrypt(struct ablkcipher_request *req) > { > struct ablkcipher_tfm *crt =

[PATCH v3 1/4] crypto: hash: add zero length message hash for shax and md5

2015-12-15 Thread LABBE Corentin
Some crypto drivers cannot process empty data message and return a precalculated hash for md5/sha1/sha224/sha256. This patch add thoses precalculated hash in include/crypto. Signed-off-by: LABBE Corentin --- crypto/md5.c| 6 ++ crypto/sha1_generic.c | 7 +++ crypto/sha25

[PATCH v3 3/4] crypto: ccp: Use precalculated hash from headers

2015-12-15 Thread LABBE Corentin
Precalculated hash for empty message are now present in hash headers. This patch just use them. Signed-off-by: LABBE Corentin Tested-by: Tom Lendacky Acked-by: Tom Lendacky --- drivers/crypto/ccp/Kconfig | 1 + drivers/crypto/ccp/ccp-ops.c | 39 --- 2 fil

[PATCH v3 4/4] crypto: ux500: Use precalculated hash from headers

2015-12-15 Thread LABBE Corentin
Precalculated hash for empty message are now present in hash headers. This patch just use them. Signed-off-by: LABBE Corentin --- drivers/crypto/ux500/Kconfig | 1 + drivers/crypto/ux500/hash/hash_core.c | 20 ++-- 2 files changed, 3 insertions(+), 18 deletions(-) diff

[PATCH v3 2/4] crypto: niagara: Use precalculated hash from headers

2015-12-15 Thread LABBE Corentin
Precalculated hash for empty message are now present in hash headers. This patch just use them. Signed-off-by: LABBE Corentin --- drivers/crypto/Kconfig | 2 ++ drivers/crypto/n2_core.c | 33 ++--- 2 files changed, 8 insertions(+), 27 deletions(-) diff --git a/dri

[PATCH v3 0/4] crypto: add precalculated hash for zero message length

2015-12-15 Thread LABBE Corentin
Hello Some crypto drivers cannot process empty data message and so rely on precalculated hash. This patch series add precalculated hash in headers and make the drivers use them. Changes since v2 - Added missing Kconfig depends on MD5/SHA1 Changes since v1 - Moved arrays from headers to c file an

[patch] crypto: qat - fix some timeout tests

2015-12-15 Thread Dan Carpenter
We do an "if (!times)" test later to see if we ran the loop too many times, but because it is a postop negate that means times is -1 when we exit that way. I have fixed this by changing it from a post op to a preop. Fixes: b3416fb8a2f5 ('crypto: qat - Intel(R) QAT accelengine part of fw loader')