[PATCH v2 1/2] crypto:chcr- Fix panic on dma_unmap_sg

2017-01-23 Thread Harsh Jain
Save DMA mapped sg list addresses to request context buffer. Signed-off-by: Atul Gupta --- drivers/crypto/chelsio/chcr_algo.c | 49 +++- drivers/crypto/chelsio/chcr_crypto.h | 3 +++ 2 files changed, 29 insertions(+), 23 deletions(-)

[PATCH v2 0/2 ] Bug Fixes for 4.10

2017-01-23 Thread Harsh Jain
This patch series includes critical bug fixes Atul Gupta (2): crypto:chcr- Fix panic on dma_unmap_sg crypto:chcr- Check device is allocated before use drivers/crypto/chelsio/chcr_algo.c | 49 +++- drivers/crypto/chelsio/chcr_core.c | 18 ++---

[PATCH v2 2/2] crypto:chcr- Check device is allocated before use

2017-01-23 Thread Harsh Jain
Ensure dev is allocated for crypto uld context before using the device for crypto operations. Signed-off-by: Atul Gupta --- drivers/crypto/chelsio/chcr_core.c | 18 -- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git

Re: [PATCH v4 1/4] lib: Update LZ4 compressor module

2017-01-23 Thread Andrew Morton
On Sun, 22 Jan 2017 20:35:14 +0100 Sven Schmidt <4ssch...@informatik.uni-hamburg.de> wrote: > This patch updates LZ4 kernel module to LZ4 v1.7.3 by Yann Collet. > The kernel module is inspired by the previous work by Chanho Min. > The updated LZ4 module will not break existing code since there

RE: [PATCH] crypto: api - Clear CRYPTO_ALG_DEAD bit before registering an alg

2017-01-23 Thread Benedetto, Salvatore
Hi Herbert, > -Original Message- > From: linux-crypto-ow...@vger.kernel.org [mailto:linux-crypto- > ow...@vger.kernel.org] On Behalf Of Herbert Xu > Sent: Monday, January 23, 2017 2:58 PM > To: Benedetto, Salvatore > Cc: linux-crypto@vger.kernel.org >

Re: [PATCH] crypto: vmx -- disable preemption to enable vsx in aes_ctr.c

2017-01-23 Thread Paulo Flabiano Smorigo
On Fri, 20 Jan 2017 16:35:33 +0800 Li Zhong wrote: > Some preemptible check warnings were reported from > enable_kernel_vsx(). This patch disables preemption in aes_ctr.c > before enabling vsx, and they are now consistent with other files in > the same directory. > >

Re: [PATCH] x86/crypto: make constants readonly, allow linker to merge them

2017-01-23 Thread Denys Vlasenko
On 01/20/2017 12:09 AM, Thomas Gleixner wrote: On Thu, 19 Jan 2017, Denys Vlasenko wrote: A lot of asm-optimized routines in arch/x86/crypto/ keep its constants in .data. This is wrong, they should be on .rodata. Mnay of these constants are the same in different modules. For example, 128-bit

Re: [PATCH] crypto: tcrypt - Add mode to test specified algs

2017-01-23 Thread Rabin Vincent
On Mon, Jan 23, 2017 at 10:14:03PM +0800, Herbert Xu wrote: > On Wed, Jan 18, 2017 at 05:25:00PM +0100, Rabin Vincent wrote: > > From: Rabin Vincent > > tcrypt offers a bunch of mode= values to test various (groups of) > > algorithms, but there is no way provided to test a subset

Re: [PATCH] crypto: vmx -- disable preemption to enable vsx in aes_ctr.c

2017-01-23 Thread Herbert Xu
Li Zhong wrote: > Some preemptible check warnings were reported from enable_kernel_vsx(). This > patch disables preemption in aes_ctr.c before enabling vsx, and they are now > consistent with other files in the same directory. > > Signed-off-by: Li Zhong

Re: [PATCH] x86/crypto: fix %progbits -> @progbits

2017-01-23 Thread Herbert Xu
On Thu, Jan 19, 2017 at 10:28:05PM +0100, Denys Vlasenko wrote: > %progbits form is used on ARM (where @ is a comment char). > > x86 consistently uses @progbits everywhere else. > > Signed-off-by: Denys Vlasenko Patch applied. Thanks. -- Email: Herbert Xu

Re: [PATCH 0/8] update mediatek crypto driver

2017-01-23 Thread Herbert Xu
On Fri, Jan 20, 2017 at 01:41:07PM +0800, Ryder Lee wrote: > Hi, > > This series of patches is a global rework of the mtk driver. > Fix bug - incomplete DMA data transfer when SG buffer dst.len != src.len > > It also updates some part of the code to make them more generic. For > instance the

Re: [PATCH] x86/crypto: make constants readonly, allow linker to merge them

2017-01-23 Thread Herbert Xu
On Thu, Jan 19, 2017 at 10:33:04PM +0100, Denys Vlasenko wrote: > A lot of asm-optimized routines in arch/x86/crypto/ keep its > constants in .data. This is wrong, they should be on .rodata. > > Mnay of these constants are the same in different modules. > For example, 128-bit shuffle mask

Re: [PATCH] crypto: tcrypt - Add mode to test specified algs

2017-01-23 Thread Herbert Xu
On Wed, Jan 18, 2017 at 05:25:00PM +0100, Rabin Vincent wrote: > From: Rabin Vincent > > tcrypt offers a bunch of mode= values to test various (groups of) > algorithms, but there is no way provided to test a subset of the > algorithms. This adds a new mode=2000 which interprets

Re: [PATCH] crypto: arm/aes-neonbs - fix issue with v2.22 and older assembler

2017-01-23 Thread Herbert Xu
On Thu, Jan 19, 2017 at 12:23:32PM +, Ard Biesheuvel wrote: > The GNU assembler for ARM version 2.22 or older fails to infer the > element size from the vmov instructions, and aborts the build in > the following way; > > .../aes-neonbs-core.S: Assembler messages: > .../aes-neonbs-core.S:817:

Re: [PATCH] crypto: tcrypt - Add debug prints

2017-01-23 Thread Herbert Xu
On Wed, Jan 18, 2017 at 02:54:05PM +0100, Rabin Vincent wrote: > From: Rabin Vincent > > tcrypt is very tight-lipped when it succeeds, but a bit more feedback > would be useful when developing or debugging crypto drivers, especially > since even a successful run ends with the

Re: [PATCH] crypto: arm64/aes-blk - honour iv_out requirement in CBC and CTR modes

2017-01-23 Thread Herbert Xu
On Tue, Jan 17, 2017 at 01:46:29PM +, Ard Biesheuvel wrote: > Update the ARMv8 Crypto Extensions and the plain NEON AES implementations > in CBC and CTR modes to return the next IV back to the skcipher API client. > This is necessary for chaining to work correctly. > > Note that for CTR, this

Re: [PATCH 1/1] crypto: img-hash - use dma_data_direction when calling dma_map_sg

2017-01-23 Thread Herbert Xu
On Sun, Jan 15, 2017 at 01:37:50PM +0100, Nicolas Iooss wrote: > The fourth argument of dma_map_sg() and dma_unmap_sg() is an item of > dma_data_direction enum. Function img_hash_xmit_dma() wrongly used > DMA_MEM_TO_DEV, which is an item of dma_transfer_direction enum. > > Replace DMA_MEM_TO_DEV

Re: [PATCH] crypto: api - Clear CRYPTO_ALG_DEAD bit before registering an alg

2017-01-23 Thread Herbert Xu
On Fri, Jan 13, 2017 at 11:54:08AM +, Salvatore Benedetto wrote: > Make sure CRYPTO_ALG_DEAD bit is cleared before proceeding with > the algorithm registration. This fixes qat-dh registration when > driver is restarted > > Signed-off-by: Salvatore Benedetto

Re: [PATCH 0/6] Add support for ECDSA algorithm

2017-01-23 Thread Herbert Xu
On Fri, Jan 20, 2017 at 05:05:55PM +0530, Nitin Kumbhar wrote: > Hello, > > This patch series adds support for Elliptic Curve Digital Signature > Algorithm (ECDSA). To reuse existing ECC functionality, which is > added as part of ECDH, it separates out ECC and ECDH so that > only ECC

Urgent Please,,

2017-01-23 Thread Joyes Dadi
Good Day Dear, My name is Ms. Joyes Dadi, I am glad you are reading this letter and I hope we will start our communication and I know that this message will look strange, surprising and probably unbelievable to you, but it is the reality. I want to make a donation of money to you. I contact you

[PATCH v2 02/10] crypto: arm/aes-ce - remove cra_alignmask

2017-01-23 Thread Ard Biesheuvel
Remove the unnecessary alignmask: it is much more efficient to deal with the misalignment in the core algorithm than relying on the crypto API to copy the data to a suitably aligned buffer. Signed-off-by: Ard Biesheuvel --- arch/arm/crypto/aes-ce-core.S | 84

[PATCH v2 06/10] crypto: arm64/chacha20 - remove cra_alignmask

2017-01-23 Thread Ard Biesheuvel
Remove the unnecessary alignmask: it is much more efficient to deal with the misalignment in the core algorithm than relying on the crypto API to copy the data to a suitably aligned buffer. Signed-off-by: Ard Biesheuvel --- arch/arm64/crypto/chacha20-neon-glue.c | 1 -

[PATCH v2 07/10] crypto: arm64/aes - avoid literals for cross-module symbol references

2017-01-23 Thread Ard Biesheuvel
Using simple adrp/add pairs to refer to the AES lookup tables exposed by the generic AES driver (which could be loaded far away from this driver when KASLR is in effect) was unreliable at module load time before commit 41c066f2c4d4 ("arm64: assembler: make adr_l work in modules under KASLR"),

[PATCH v2 05/10] crypto: arm64/aes-blk - remove cra_alignmask

2017-01-23 Thread Ard Biesheuvel
Remove the unnecessary alignmask: it is much more efficient to deal with the misalignment in the core algorithm than relying on the crypto API to copy the data to a suitably aligned buffer. Signed-off-by: Ard Biesheuvel --- arch/arm64/crypto/aes-glue.c | 16

[PATCH v2 09/10] crypto: arm64/aes-neon-blk - tweak performance for low end cores

2017-01-23 Thread Ard Biesheuvel
The non-bitsliced AES implementation using the NEON is highly sensitive to micro-architectural details, and, as it turns out, the Cortex-A53 on the Raspberry Pi 3 is a core that can benefit from this code, given that its scalar AES performance is abysmal (32.9 cycles per byte). The new bitsliced

[PATCH v2 10/10] crypto: arm64/aes - replace scalar fallback with plain NEON fallback

2017-01-23 Thread Ard Biesheuvel
The new bitsliced NEON implementation of AES uses a fallback in two places: CBC encryption (which is strictly sequential, whereas this driver can only operate efficiently on 8 blocks at a time), and the XTS tweak generation, which involves encrypting a single AES block with a different key

[PATCH v2 08/10] crypto: arm64/aes - performance tweak

2017-01-23 Thread Ard Biesheuvel
Shuffle some instructions around in the __hround macro to shave off 0.1 cycles per byte on Cortex-A57. Signed-off-by: Ard Biesheuvel --- arch/arm64/crypto/aes-cipher-core.S | 52 +++- 1 file changed, 19 insertions(+), 33 deletions(-) diff --git

[PATCH v2 04/10] crypto: arm64/aes-ce-ccm - remove cra_alignmask

2017-01-23 Thread Ard Biesheuvel
Remove the unnecessary alignmask: it is much more efficient to deal with the misalignment in the core algorithm than relying on the crypto API to copy the data to a suitably aligned buffer. Signed-off-by: Ard Biesheuvel --- arch/arm64/crypto/aes-ce-ccm-glue.c | 1 - 1

[PATCH v2 03/10] crypto: arm/chacha20 - remove cra_alignmask

2017-01-23 Thread Ard Biesheuvel
Remove the unnecessary alignmask: it is much more efficient to deal with the misalignment in the core algorithm than relying on the crypto API to copy the data to a suitably aligned buffer. Signed-off-by: Ard Biesheuvel --- arch/arm/crypto/chacha20-neon-glue.c | 1 -

[PATCH v2 00/10] crypto - AES for ARM/arm64 updates for v4.11 (round #2)

2017-01-23 Thread Ard Biesheuvel
Patch #1 is a fix for the CBC chaining issue that was discussed on the mailing list. The driver itself is queued for v4.11, so this fix can go right on top. Patches #2 - #6 clear the cra_alignmasks of various drivers: all NEON capable CPUs can perform unaligned accesses, and the advantage of

[PATCH v2 01/10] crypto: arm64/aes-neon-bs - honour iv_out requirement in CTR mode

2017-01-23 Thread Ard Biesheuvel
Update the new bitsliced NEON AES implementation in CTR mode to return the next IV back to the skcipher API client. This is necessary for chaining to work correctly. Note that this is only done if the request is a round multiple of the block size, since otherwise, chaining is impossible anyway.

Re: [PATCH] crypto: camellia: add missing declarations

2017-01-23 Thread Herbert Xu
On Mon, Jan 16, 2017 at 05:06:51PM +0100, Nicholas Mc Guire wrote: > Add declarations for the camellia substitution box to allow a clean build. > > Signed-off-by: Nicholas Mc Guire > --- > Problem reported by sparse > arch/x86/crypto/camellia_glue.c:65:21: warning: symbol

Re: [PATCH v1 0/4]crypto:chcr- Bug Fixes for 4.10

2017-01-23 Thread Herbert Xu
On Fri, Jan 13, 2017 at 05:59:19PM +0530, Harsh Jain wrote: > This patch series is based on Herbert's cryptodev-2.6 tree. > It includes several critical bug fixes. > > Atul Gupta (3): > crypto:chcr-Change flow IDs > crypto:chcr- Fix panic on dma_unmap_sg > crypto:chcr- Check device is

Re: [PATCH 00/13] crypto: copy AAD during encrypt for AEAD ciphers

2017-01-23 Thread Herbert Xu
On Fri, Jan 20, 2017 at 06:07:04PM +0100, Cyrille Pitchen wrote: > Hi all, > > Le 13/01/2017 à 12:39, Herbert Xu a écrit : > > On Fri, Jan 13, 2017 at 12:36:56PM +0100, Stephan Müller wrote: > >> > >> I thought I understood that you would not want to see it in any > >> implementation. But, ok,

Re: [RFC PATCH 0/6] Add bulk skcipher requests to crypto API and dm-crypt

2017-01-23 Thread Herbert Xu
On Thu, Jan 19, 2017 at 03:21:37PM +0100, Ondrej Mosnáček wrote: > > Hm, I just looked at what the IPsec IV generation is actually doing > and it seems to me that it's basically a crypto template that just > somehow transforms the IV before it is passed to the child cipher... I > thought for a