Re: [PATCH v2] [v2] crypto: aes-generic - fix aes-generic regression on powerpc

2018-01-19 Thread Herbert Xu
On Mon, Jan 15, 2018 at 05:07:22PM +0100, Arnd Bergmann wrote: > My last bugfix added -Os on the command line, which unfortunately caused > a build regression on powerpc in some configurations. > > I've done some more analysis of the original problem and found slightly > different workaround that

[cryptodev:master 130/155] aes_generic.c:undefined reference to `_restgpr_31_x'

2018-01-19 Thread kbuild test robot
Hi Arnd, FYI, the error/warning still remains. tree: https://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git master head: 5abc8db013174ef6022bf7af81adf210c54e4549 commit: 148b974deea927f5dbb6c468af2707b488bfa2de [130/155] crypto: aes-generic - build with -Os on gcc-7+

[PATCH] crypto: picoxcell - Fix error handling in spacc_probe()

2018-01-19 Thread Alexey Khoroshilov
If clk_get() fails, device_remove_file() looks inappropriate. The error path, where all crypto_register fail, misses resource deallocations. Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Alexey Khoroshilov ---

Re: [PATCH 1/1] crypto: chelsio - Fix indentation warning

2018-01-19 Thread Herbert Xu
On Fri, Jan 19, 2018 at 11:09:58AM +0530, Harsh Jain wrote: > Fix Warning introduced in changeset > > e1a018e607a3 ("crypto: chelsio - Remove dst sg size zero check") > > Reported-by: Stephen Rothwell > Signed-off-by: Harsh Jain Patch applied.

[PATCH] crypto: chelsio - fix code indentation warning

2018-01-19 Thread Arnd Bergmann
gcc noticed some unusual and confusing indentation: drivers/crypto/chelsio/chcr_algo.c: In function 'create_authenc_wr': drivers/crypto/chelsio/chcr_algo.c:2113:2: error: this 'if' clause does not guard... [-Werror=misleading-indentation] if (error) ^~

[PATCH 6/8] crypto/arm64: sha3 - new v8.2 Crypto Extensions implementation

2018-01-19 Thread Ard Biesheuvel
Implement the various flavours of SHA3 using the new optional EOR3/RAX1/XAR/BCAX instructions introduced by ARMv8.2. Tested-by: Steve Capper Signed-off-by: Ard Biesheuvel --- arch/arm64/crypto/Kconfig| 6 + arch/arm64/crypto/Makefile

[PATCH 3/8] crypto/generic: sha3 - simplify code

2018-01-19 Thread Ard Biesheuvel
In preparation of exposing the generic SHA3 implementation to other versions as a fallback, simplify the code, and remove an inconsistency in the output handling (endian swabbing rsizw words of state before writing the output does not make sense) Signed-off-by: Ard Biesheuvel

[PATCH 5/8] crypto/testmgr: sha3 - add new testcases

2018-01-19 Thread Ard Biesheuvel
All current SHA3 test cases are smaller than the SHA3 block size, which means not all code paths are being exercised. So add a new test case to each variant, and make one of the existing test cases chunked. Signed-off-by: Ard Biesheuvel --- crypto/testmgr.h | 550

[PATCH 4/8] crypto/generic: sha3 - export init/update/final routines

2018-01-19 Thread Ard Biesheuvel
To allow accelerated implementations to fall back to the generic routines, e.g., in contexts where a SIMD based implementation is not allowed to run, expose the generic SHA3 init/update/final routines to other modules. Signed-off-by: Ard Biesheuvel ---

[PATCH 7/8] crypto/arm64: sm3 - new v8.2 Crypto Extensions implementation

2018-01-19 Thread Ard Biesheuvel
Implement the Chinese SM3 secure hash algorithm using the new special instructions that have been introduced as an optional extension in ARMv8.2. Tested-by: Steve Capper Signed-off-by: Ard Biesheuvel --- arch/arm64/crypto/Kconfig | 6 +

[PATCH 8/8] crypto/arm64: sha512 - fix/improve new v8.2 Crypto Extensions code

2018-01-19 Thread Ard Biesheuvel
Add a missing symbol export that prevents this code to be built as a module. Also, move the round constant table to the .rodata section, and use a more optimized version of the core transform. Signed-off-by: Ard Biesheuvel --- arch/arm64/crypto/sha512-ce-core.S | 145

[PATCH 1/8] crypto/generic: sha3 - fixes for alignment and big endian operation

2018-01-19 Thread Ard Biesheuvel
Ensure that the input is byte swabbed before injecting it into the SHA3 transform. Use the get_unaligned() accessor for this so that we don't perform unaligned access inadvertently on architectures that do not support that. Cc: Fixes: 53964b9ee63b7075 ("crypto: sha3 - Add

[PATCH 2/8] crypto/generic: sha3: rewrite KECCAK transform to help the compiler optimize

2018-01-19 Thread Ard Biesheuvel
The way the KECCAK transform is currently coded involves many references into the state array using indexes that are calculated at runtime using simple but non-trivial arithmetic. This forces the compiler to treat the state matrix as an array in memory rather than keep it in registers, which

[PATCH 0/8] crypto: arm64+generic - SHA3/SHA-512/SM-3 roundup

2018-01-19 Thread Ard Biesheuvel
This supersedes all outstanding patches from me related to SHA-3, SHA-512 or SM-3. - fix a correctness issue in the SHA-3 code (#1) and a performance issue (#2), the first one is definitely a -stable candidate, the second one potentially as well - patches #3 and #4 make the generic SHA-3 code

Re: [PATCH 5/5] crypto: ahash.c: Require export/import in ahash

2018-01-19 Thread Kamil Konieczny
On 19.01.2018 11:08, Marek Vasut wrote: > On 01/19/2018 10:53 AM, Kamil Konieczny wrote: >> On 18.01.2018 22:31, Marek Vasut wrote: >>> On 01/18/2018 07:34 PM, Kamil Konieczny wrote: Export and import are mandatory in async hash. As drivers were rewritten, drop empty wrappers and

Re: [PATCH 5/5] crypto: ahash.c: Require export/import in ahash

2018-01-19 Thread Marek Vasut
On 01/19/2018 10:53 AM, Kamil Konieczny wrote: > On 18.01.2018 22:31, Marek Vasut wrote: >> On 01/18/2018 07:34 PM, Kamil Konieczny wrote: >>> Export and import are mandatory in async hash. As drivers were >>> rewritten, drop empty wrappers and correct init of ahash transformation. >> >> Are you

Re: [PATCH 5/5] crypto: ahash.c: Require export/import in ahash

2018-01-19 Thread Kamil Konieczny
On 18.01.2018 22:31, Marek Vasut wrote: > On 01/18/2018 07:34 PM, Kamil Konieczny wrote: >> Export and import are mandatory in async hash. As drivers were >> rewritten, drop empty wrappers and correct init of ahash transformation. > > Are you moving checks from the core subsystem to drivers ?