[PATCH v2] crypto: AF_ALG - fix AEAD AIO handling of zero buffer

2016-11-30 Thread Stephan Mueller
Hi Herbert, I split out the bug fix patch from the AD/tag formatting patch as they most likely will come after the next merge window. ---8<--- Handle the case when the caller provided a zero buffer to sendmsg/sendpage. Such scenario is legal for AEAD ciphers when no plaintext / ciphertext and

Re: [cryptodev:master 98/130] arch/arm64/crypto/aes-neon-blk.o:(.bss+0x0): multiple definition of `aes_simd_algs'

2016-11-30 Thread Herbert Xu
On Thu, Dec 01, 2016 at 09:45:30AM +0800, kbuild test robot wrote: > tree: > https://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git > master > head: 81126d1a8bc23c72a13c05c4308dc6951afc3b45 > commit: d0ed0db149fce92f4d69490f18be23ddc470bf6f [98/130] crypto: arm64/aes - >

RE: [PATCH v4 1/1] crypto: add virtio-crypto driver

2016-11-30 Thread Gonglei (Arei)
Hi Stefan, > > On Tue, Nov 29, 2016 at 08:48:14PM +0800, Gonglei wrote: > > diff --git a/drivers/crypto/virtio/virtio_crypto_algs.c > b/drivers/crypto/virtio/virtio_crypto_algs.c > > new file mode 100644 > > index 000..08b077f > > --- /dev/null > > +++

[PATCH 1/1] crypto: set error code when kcalloc fails

2016-11-30 Thread Pan Bian
Fix bug https://bugzilla.kernel.org/show_bug.cgi?id=188521. In function skcipher_recvmsg_async(), variable err takes the return value, and its value should be negative on failures. Because variable err may be reassigned and checked before calling kcalloc(), its value may be 0 (indicates no error)

[cryptodev:master 98/130] arch/arm64/crypto/aes-neon-blk.o:(.bss+0x0): multiple definition of `aes_simd_algs'

2016-11-30 Thread kbuild test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git master head: 81126d1a8bc23c72a13c05c4308dc6951afc3b45 commit: d0ed0db149fce92f4d69490f18be23ddc470bf6f [98/130] crypto: arm64/aes - Convert to skcipher config: arm64-allyesconfig (attached as .config) compiler:

[PATCH] crypto: arm/aesbs - Select SIMD in Kconfig

2016-11-30 Thread Arnd Bergmann
Commit 585b5fa63da9 ("crypto: arm/aes - Select SIMD in Kconfig") added the dependency for CRYPTO_AES_ARM_CE, but missed the same change for CRYPTO_AES_ARM_BS: arch/arm/crypto/aes-arm-bs.o: In function `aesbs_mod_init': aesbs-glue.c:(.init.text+0x38): undefined reference to

[PATCH 1/2] crypto: caam: pass key buffers with typesafe pointers

2016-11-30 Thread Arnd Bergmann
The 'key' field is defined as a 'u64' and used for two different pieces of information: either to store a pointer or a dma_addr_t. The former leads to a build error on 32-bit machines: drivers/crypto/caam/caamalg_desc.c: In function 'cnstr_shdsc_aead_null_encap':

[PATCH 2/2] crypto: caam: make aamalg_desc a proper module

2016-11-30 Thread Arnd Bergmann
The drivers/crypto/caam/ directory is entered during build only for building modules when CONFIG_CRYPTO_DEV_FSL_CAAM=m, but CONFIG_CRYPTO_DEV_FSL_CAAM_CRYPTO_API_DESC is defined as a 'bool' symbol, meaning that caamalg_desc.c is always compiled into built-in code, or not at all, leading to a link

[PATCH 3/3] crypto: brcm: Add Broadcom SPU driver DT entry.

2016-11-30 Thread Rob Rice
Add Northstar2 device tree entry for Broadcom Secure Processing Unit (SPU) crypto driver. Signed-off-by: Steve Lin Signed-off-by: Rob Rice --- arch/arm64/boot/dts/broadcom/ns2.dtsi | 12 1 file changed, 12 insertions(+) diff --git

[PATCH 0/3] Add Broadcom SPU Crypto Driver

2016-11-30 Thread Rob Rice
The Broadcom SPU crypto driver provides access to SPU hardware for symmetric crypto offload. The driver supports ablkcipher, ahash, and aead operations. The driver supports several Broadcom SoCs with different revisions of the SPU hardware. The driver supports SPU-M and SPU2 hardware revisions,

[PATCH 1/3] crypto: brcm: DT documentation for Broadcom SPU driver

2016-11-30 Thread Rob Rice
Device tree documentation for Broadcom Secure Processing Unit (SPU) crypto driver. Signed-off-by: Steve Lin Signed-off-by: Rob Rice --- .../devicetree/bindings/crypto/brcm,spu-crypto.txt | 25 ++ 1 file changed, 25

Re: [PATCH] crypto: arm/aesbs - fix brokenness after skcipher conversion

2016-11-30 Thread Ard Biesheuvel
> On 30 Nov 2016, at 13:19, Herbert Xu wrote: > >> On Tue, Nov 29, 2016 at 05:23:36PM +, Ard Biesheuvel wrote: >> The CBC encryption routine should use the encryption round keys, not >> the decryption round keys. >> >> Signed-off-by: Ard Biesheuvel

Re: [PATCH 3/4] crypto: arm64/aes-ce-ccm - fix decrypt path with new skcipher interface

2016-11-30 Thread Ard Biesheuvel
On 30 November 2016 at 13:14, Herbert Xu wrote: > On Tue, Nov 29, 2016 at 01:05:32PM +, Ard Biesheuvel wrote: >> The new skcipher walk interface does not take into account whether we >> are encrypting or decrypting. In the latter case, the walk should >> disregard

Re: [PATCH] crypto: arm/aesbs - fix brokenness after skcipher conversion

2016-11-30 Thread Herbert Xu
On Tue, Nov 29, 2016 at 05:23:36PM +, Ard Biesheuvel wrote: > The CBC encryption routine should use the encryption round keys, not > the decryption round keys. > > Signed-off-by: Ard Biesheuvel Patch applied. Thanks. > Another fix for the queued changes, this

Re: [PATCH 1/4] crypto: arm/aes-ce: fix broken monolithic build

2016-11-30 Thread Herbert Xu
On Tue, Nov 29, 2016 at 01:05:30PM +, Ard Biesheuvel wrote: > When building the arm64 kernel with both CONFIG_CRYPTO_AES_ARM64_CE_BLK=y > and CONFIG_CRYPTO_AES_ARM64_NEON_BLK=y configured, the build breaks with > the following error: > > arch/arm64/crypto/aes-neon-blk.o:(.bss+0x0): multiple

Re: [PATCH v3 00/10] crypto/chcr: AEAD support and bug fixes

2016-11-30 Thread Herbert Xu
On Tue, Nov 29, 2016 at 07:00:33PM +0530, Harsh Jain wrote: > This patch series includes Bug Fixes, performance improvement and > support for following AEAD algos. > GCM,CCM,RFC4106,RFC4303,authenc(hmac(shaXXX),cbc(aes)) > > v3: > -Break patch 01 into 2. All applied. Thanks. -- Email: Herbert

Re: [PATCH v2] crypto: CTR DRBG - prevent invalid SG mappings

2016-11-30 Thread Herbert Xu
On Tue, Nov 29, 2016 at 09:45:04AM +0100, Stephan Mueller wrote: > When using SGs, only heap memory (memory that is valid as per > virt_addr_valid) is allowed to be referenced. The CTR DRBG used to > reference the caller-provided memory directly in an SG. In case the > caller provided stack memory

Re: [PATCH 3/4] crypto: arm64/aes-ce-ccm - fix decrypt path with new skcipher interface

2016-11-30 Thread Herbert Xu
On Wed, Nov 30, 2016 at 09:14:07PM +0800, Herbert Xu wrote: > On Tue, Nov 29, 2016 at 01:05:32PM +, Ard Biesheuvel wrote: > > The new skcipher walk interface does not take into account whether we > > are encrypting or decrypting. In the latter case, the walk should > > disregard the MAC. Fix

[PATCH 1/4] crypto: api - fix comment typo

2016-11-30 Thread Baruch Siach
Signed-off-by: Baruch Siach --- include/linux/crypto.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/linux/crypto.h b/include/linux/crypto.h index 7cee5551625b..e4f250a108e7 100644 --- a/include/linux/crypto.h +++ b/include/linux/crypto.h @@ -87,7

[PATCH 3/4] crypt: doc - remove misleading mention of async API

2016-11-30 Thread Baruch Siach
The asynchronous API is quite mature. Not mentioning is at all is probably better than saying it is under development. Signed-off-by: Baruch Siach --- Documentation/crypto/api-intro.txt | 3 --- 1 file changed, 3 deletions(-) diff --git a/Documentation/crypto/api-intro.txt

[PATCH 2/4] crypto: doc - fix header file name

2016-11-30 Thread Baruch Siach
Fixes: 8bc618d6a2e0 ("crypto: doc - Use ahash") Signed-off-by: Baruch Siach --- Documentation/crypto/api-intro.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Documentation/crypto/api-intro.txt b/Documentation/crypto/api-intro.txt index

[PATCH 4/4] MAINTAINERS: add crypto headers to crypto entry

2016-11-30 Thread Baruch Siach
Signed-off-by: Baruch Siach --- MAINTAINERS | 1 + 1 file changed, 1 insertion(+) diff --git a/MAINTAINERS b/MAINTAINERS index 8d4148406923..dba40107aca4 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -3425,6 +3425,7 @@ F:arch/*/crypto/ F: crypto/ F:

Re: [PATCH 3/4] crypto: arm64/aes-ce-ccm - fix decrypt path with new skcipher interface

2016-11-30 Thread Herbert Xu
On Tue, Nov 29, 2016 at 01:05:32PM +, Ard Biesheuvel wrote: > The new skcipher walk interface does not take into account whether we > are encrypting or decrypting. In the latter case, the walk should > disregard the MAC. Fix this in the arm64 CE driver. > > Signed-off-by: Ard Biesheuvel

Re: [PATCH v4 1/1] crypto: add virtio-crypto driver

2016-11-30 Thread Stefan Hajnoczi
On Tue, Nov 29, 2016 at 08:48:14PM +0800, Gonglei wrote: > diff --git a/drivers/crypto/virtio/virtio_crypto_algs.c > b/drivers/crypto/virtio/virtio_crypto_algs.c > new file mode 100644 > index 000..08b077f > --- /dev/null > +++ b/drivers/crypto/virtio/virtio_crypto_algs.c > @@ -0,0 +1,518 @@