[PATCH] crypto: tcrypt - fix uninit sg entries in test_acipher_speed

2015-03-09 Thread Horia Geanta
Commit 5be4d4c94b1f (crypto: replace scatterwalk_sg_next with sg_next) did not consider the fact that scatterwalk_sg_next() was looking at sg entry length, while sg_next() looks at the chained sg bit. This should have no effect in theory. However in practice, there are cases where the sg table is

Re: [PATCH 0/2] crypto: talitos: Add AES-XTS mode

2015-03-09 Thread Martin Hicks
On Mon, Mar 9, 2015 at 6:16 AM, Horia Geantă horia.gea...@freescale.com wrote: On 3/3/2015 7:44 PM, Martin Hicks wrote: On Tue, Mar 3, 2015 at 10:44 AM, Horia Geantă horia.gea...@freescale.com wrote: For talitos, there are two cases: 1. request data size is = data unit / sector size

Re: [PATCH RESEND 0/2] crypto: algif - change algif_skcipher to be asynchronous

2015-03-09 Thread Tadeusz Struk
Hi Stephan, On 03/08/2015 11:20 AM, Stephan Mueller wrote: As you may know, I am working on libkcapi [1] to cover the user space AF_ALG interface and provide an easy-to use interface for applications. I am now trying to cover your interface proposal there and also measure the speed of it.

[PATCH 1/4] hwrng: omap - remove incorrect __exit markups

2015-03-09 Thread Dmitry Torokhov
Even if bus is not hot-pluggable, the devices can be unbound from the driver via sysfs, so we should not be using __exit annotations on remove() methods. The only exception is drivers registered with platform_driver_probe() which specifically disables sysfs bind/unbind attributes. Signed-off-by:

[PATCH 2/4] hwrng: omap - remove #ifdefery around PM methods

2015-03-09 Thread Dmitry Torokhov
Instead of using #ifdefs let's mark suspend and resume methods as __maybe_unused which will suppress compiler warnings about them being unused and provide better compile coverage. This will not increase image size. Signed-off-by: Dmitry Torokhov dmitry.torok...@gmail.com ---

[PATCH 3/4] hwrng: octeon - remove incorrect __exit markups

2015-03-09 Thread Dmitry Torokhov
Even if bus is not hot-pluggable, the devices can be unbound from the driver via sysfs, so we should not be using __exit annotations on remove() methods. The only exception is drivers registered with platform_driver_probe() which specifically disables sysfs bind/unbind attributes Signed-off-by:

[PATCH 4/4] hwrng: pseries-rng - remove incorrect __init/__exit markups

2015-03-09 Thread Dmitry Torokhov
Even if bus is not hot-pluggable, the devices can be unbound from the driver via sysfs, so we should not be using __exit annotations on remove() methods. The only exception is drivers registered with platform_driver_probe() which specifically disables sysfs bind/unbind attributes. Similarly

[PATCH v2 0/2] crypto: algif - change algif_skcipher to be asynchronous

2015-03-09 Thread Tadeusz Struk
The way the algif_skcipher works currently is that on sendmsg/sendpage it builds an sgl for the input data and then on read/recvmsg it sends the job for encryption putting the user to sleep till the data is processed. This way it can only handle one job at a given time. To be able to fuly utilize

Re: [PATCH v2] crypto: omap-sham: Check for return value from pm_runtime_get_sync

2015-03-09 Thread Pavel Machek
On Sun 2015-03-08 11:01:01, Pali Rohár wrote: Function pm_runtime_get_sync could fail and we need to check return value to prevent kernel crash. Signed-off-by: Pali Rohár pali.ro...@gmail.com Acked-by: Pavel Machek pa...@ucw.cz -- (english) http://www.livejournal.com/~pavelmachek (cesky,

[PATCH v2 2/2] crypto: algif - change algif_skcipher to be asynchronous

2015-03-09 Thread Tadeusz Struk
The way the algif_skcipher works currently is that on sendmsg/sendpage it builds an sgl for the input data and then on read/recvmsg it sends the job for encryption putting the user to sleep till the data is processed. This way it can only handle one job at a given time. This patch changes it to be

[PATCH v2 1/2] crypto: af_alg - Allow to link sgl

2015-03-09 Thread Tadeusz Struk
Allow to link af_alg sgls. Signed-off-by: Tadeusz Struk tadeusz.st...@intel.com --- crypto/af_alg.c | 18 +- include/crypto/if_alg.h |4 +++- 2 files changed, 16 insertions(+), 6 deletions(-) diff --git a/crypto/af_alg.c b/crypto/af_alg.c index 7f8b7edc..26089d1

Re: [PATCH RESEND 2/2] crypto: algif - change algif_skcipher to be asynchronous

2015-03-09 Thread Tadeusz Struk
On 03/06/2015 04:09 AM, Herbert Xu wrote: It helps to make it faster. This way I can do some of the request setup beforehand and minimize overhead on the data path. Do you have numbers to back this up? Ok, you are right. It was implemented that way when I used the qat type socket, which

[PATCH] crypto: qat - remove incorrect __exit markup

2015-03-09 Thread Dmitry Torokhov
PCI bus is hot-pluggable, and even if it wasn't one can still unbind the device from driver via sysfs, so we should not make driver's remove method as __exit. Signed-off-by: Dmitry Torokhov dmitry.torok...@gmail.com --- drivers/crypto/qat/qat_dh895xcc/adf_drv.c | 2 +- 1 file changed, 1

[PATCH] crypto/arm: add support for GHASH using ARMv8 Crypto Extensions

2015-03-09 Thread Ard Biesheuvel
This implements the GHASH hash algorithm (as used by the GCM AEAD chaining mode) using the AArch32 version of the 64x64 to 128 bit polynomial multiplication instruction (vmull.p64) that is part of the ARMv8 Crypto Extensions. Signed-off-by: Ard Biesheuvel ard.biesheu...@linaro.org ---

[PATCH] crypto: amcc: remove incorrect __init/__exit markups

2015-03-09 Thread Dmitry Torokhov
Even if bus is not hot-pluggable, the devices can be bound and unbound from the driver via sysfs, so we should not be using __init/__exit annotations on probe() and remove() methods. The only exception is drivers registered with platform_driver_probe() which specifically disables sysfs bind/unbind

Re: [PATCH v2 15/17] crypto: talitos - Implementation of SEC1

2015-03-09 Thread Kim Phillips
On Fri, 6 Mar 2015 17:42:26 +0100 Christophe Leroy christophe.le...@c-s.fr wrote: This patch adds talitos1.c and talitos1.h with all specificities needed to handle the SEC1 security engine found in MPC885 and MPC8272. The SEC1 has several differences with its younger brother SEC2: * Several

Re: [PATCH net-next v2 0/2] net: Remove iocb argument from sendmsg and recvmsg

2015-03-09 Thread Herbert Xu
David Miller da...@davemloft.net wrote: From: Ying Xue ying@windriver.com Date: Mon, 2 Mar 2015 15:37:46 +0800 Currently there is only one user - TIPC whose sendmsg() instances using iocb argument. Meanwhile, there is no user using iocb argument in its recvmsg() instance. Therefore, if

Re: [PATCH V3 1/2] crypto: Add Imagination Technologies hw hash accelerator

2015-03-09 Thread Stephan Mueller
Am Freitag, 6. März 2015, 02:58:26 schrieb James Hartley: Hi James, This adds support for the Imagination Technologies hash accelerator which provides hardware acceleration for SHA1 SHA224 SHA256 and MD5 hashes. Signed-off-by: James Hartley james.hart...@imgtec.com --- drivers/crypto/Kconfig

Crypto Fixes for 4.0

2015-03-09 Thread Herbert Xu
Hi Linus: This push fixes a bug in the ARM XTS implementation that can cause failures to in decrypting encrypted disks. Please pull from git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6.git or master.kernel.org:/pub/scm/linux/kernel/git/herbert/crypto-2.6.git Ard Biesheuvel

Re: [V3 PATCH 0/2] fix some CAAM warnings.

2015-03-09 Thread Herbert Xu
On Fri, Mar 06, 2015 at 10:34:40AM +0800, yanjiang@windriver.com wrote: From: Yanjiang Jin yanjiang@windriver.com Hi, This patch series fix some CAAM compile and runtime warnings. I have tested this on fsl-p5020ds board using upstream 4.0.0-rc2 with the below configs:

[PATCH 4/4] crypto/arm: AES in ECB/CBC/CTR/XTS modes using ARMv8 Crypto Extensions

2015-03-09 Thread Ard Biesheuvel
This implements the ECB, CBC, CTR and XTS asynchronous block ciphers using the AArch32 versions of the ARMv8 Crypto Extensions for AES. Signed-off-by: Ard Biesheuvel ard.biesheu...@linaro.org --- arch/arm/crypto/Kconfig | 9 + arch/arm/crypto/Makefile | 2 +

[PATCH 2/4] crypto/arm: add support for SHA1 using ARMv8 Crypto Instructions

2015-03-09 Thread Ard Biesheuvel
This implements the SHA1 secure hash algorithm using the AArch32 versions of the ARMv8 Crypto Extensions for SHA1. Signed-off-by: Ard Biesheuvel ard.biesheu...@linaro.org --- arch/arm/crypto/Kconfig| 10 +++ arch/arm/crypto/Makefile | 2 + arch/arm/crypto/sha1-ce-core.S | 134

[PATCH 3/4] crypto/arm: add support for SHA-224/256 using ARMv8 Crypto Extensions

2015-03-09 Thread Ard Biesheuvel
This implements the SHA-224/256 secure hash algorithm using the AArch32 versions of the ARMv8 Crypto Extensions for SHA2. Signed-off-by: Ard Biesheuvel ard.biesheu...@linaro.org --- arch/arm/crypto/Kconfig| 9 ++ arch/arm/crypto/Makefile | 2 + arch/arm/crypto/sha2-ce-core.S |

Re: [PATCH 2/2] crypto: talitos: Add AES-XTS Support

2015-03-09 Thread Horia Geantă
On 3/7/2015 3:16 AM, Kim Phillips wrote: On Fri, 6 Mar 2015 11:49:43 -0500 Martin Hicks m...@bork.org wrote: On Thu, Mar 5, 2015 at 7:16 PM, Kim Phillips kim.phill...@freescale.com wrote: On Fri, 20 Feb 2015 12:00:10 -0500 Martin Hicks m...@bork.org wrote: The newer talitos hardware has

Re: [PATCH] rng: xgene-rng: add ACPI support for APM X-Gene RNG unit

2015-03-09 Thread Herbert Xu
On Fri, Mar 06, 2015 at 02:53:15PM -0800, Feng Kan wrote: This adds ACPI support for APM X-Gene RNG unit. Signed-off-by: Feng Kan f...@apm.com Applied. -- Email: Herbert Xu herb...@gondor.apana.org.au Home Page: http://gondor.apana.org.au/~herbert/ PGP Key:

Re: [PATCH] crypto: RNGs must return 0 in success case

2015-03-09 Thread Herbert Xu
On Fri, Mar 06, 2015 at 08:26:31AM +0100, Stephan Mueller wrote: Change the RNGs to always return 0 in success case. This patch ensures that seqiv.c works with RNGs other than krng. seqiv expects that any return code other than 0 is an error. Without the patch, rfc4106(gcm(aes)) will not

Re: [PATCH 0/2] crypto: Documentation - add AF_ALG to DocBook

2015-03-09 Thread Herbert Xu
On Fri, Mar 06, 2015 at 09:33:41PM +0100, Stephan Mueller wrote: Hi, the AF_ALG interface description is added to the kernel crypto API DocBook. It is extended by the newly added AEAD and RNG interfaces. An example of the documentation can be viewed at [1]. [1]

Re: [PATCH] crypto: powerpc - move files to fix build error

2015-03-09 Thread Herbert Xu
On Fri, Mar 06, 2015 at 06:46:21PM -0600, Kim Phillips wrote: The current cryptodev-2.6 tree commits: d9850fc529ef (crypto: powerpc/sha1 - kernel config) 50ba29aaa7b0 (crypto: powerpc/sha1 - glue) failed to properly place files under arch/powerpc/crypto, which leads to build errors:

Re: [PATCH 0/2] crypto: talitos: Add AES-XTS mode

2015-03-09 Thread Horia Geantă
On 3/3/2015 7:44 PM, Martin Hicks wrote: On Tue, Mar 3, 2015 at 10:44 AM, Horia Geantă horia.gea...@freescale.com wrote: On 3/3/2015 12:09 AM, Martin Hicks wrote: On Mon, Mar 02, 2015 at 03:37:28PM +0100, Milan Broz wrote: If crypto API allows to encrypt more sectors in one run (handling

[PATCH 1/4] crypto/arm: move ARM specific Kconfig definitions to a dedicated file

2015-03-09 Thread Ard Biesheuvel
This moves all Kconfig symbols defined in crypto/Kconfig that depend on CONFIG_ARM to a dedicated Kconfig file in arch/arm/crypto, which is where the code that implements those features resides as well. Signed-off-by: Ard Biesheuvel ard.biesheu...@linaro.org --- arch/arm/Kconfig| 3 ++