Re: linux-next: build warnings after merge of the crypto tree

2015-03-09 Thread Stephen Rothwell
Hi Herbert, On Tue, 10 Mar 2015 17:03:28 +1100 Herbert Xu wrote: > > On Tue, Mar 10, 2015 at 04:44:17PM +1100, Stephen Rothwell wrote: > > > > After merging the crypto tree, today's (and the past few days) > > linux-next build (powerpc allyesconfig) produced these warnings: > > > > crypto/algi

Re: linux-next: build warnings after merge of the crypto tree

2015-03-09 Thread Herbert Xu
On Tue, Mar 10, 2015 at 04:44:17PM +1100, Stephen Rothwell wrote: > Hi Herbert, > > After merging the crypto tree, today's (and the past few days) > linux-next build (powerpc allyesconfig) produced these warnings: > > crypto/algif_aead.c:561:2: warning: initialization from incompatible pointer >

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

2015-03-09 Thread Herbert Xu
David Miller wrote: > From: Ying Xue > 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 we eliminate the werid usage >> o

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 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 bits in registers

[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 --- 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 100644 --- a/crypto/af_alg

[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

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 Acked-by: Pavel Machek -- (english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin

[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 t

[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

[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 --- drivers/crypto/qat/qat_dh895xcc/adf_drv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff

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,

[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 --- arch/arm/crypto/Kconfig |

[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 --- drivers/char/hw_random/omap-rng.c | 15 +++

[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: Dm

[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 probe(

[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: D

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

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ă wrote: > On 3/3/2015 7:44 PM, Martin Hicks wrote: >> On Tue, Mar 3, 2015 at 10:44 AM, Horia Geantă >> wrote: >>> >>> For talitos, there are two cases: >>> >>> 1. request data size is <= data unit / sector size >>> talitos can handle any IV / tweak sche

[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

Re: [PATCH v2 5/5] crypto: talitos: Add software backlog queue handling

2015-03-09 Thread Horia Geantă
On 3/6/2015 6:48 AM, Herbert Xu wrote: > On Thu, Mar 05, 2015 at 11:35:23AM +0200, Horia Geantă wrote: >> >>> Only potential problem is getting the crypto API to set the GFP_DMA >>> flag in the allocation request, but presumably a >>> CRYPTO_TFM_REQ_DMA crt_flag can be made to handle that. >> >> Ri

[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 --- arch/arm/crypto/Kconfig | 9 + arch/arm/crypto/Makefile | 2 + arch/arm/crypto/aes-ce-core.S | 535

[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 --- 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 --- arch/arm/crypto/Kconfig| 9 ++ arch/arm/crypto/Makefile | 2 + arch/arm/crypto/sha2-ce-core.S | 134 ++

[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 --- arch/arm/Kconfig| 3 ++ arch/arm/crypto/Kconfig |

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ă > 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 IV int

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 err

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 Applied. -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt -- To unsubscribe from t

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] http://www.chronox

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 > > 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: > > CONFIG_DMA_API_DEBUG=y

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 wrote: > >> On Thu, Mar 5, 2015 at 7:16 PM, Kim Phillips >> wrote: >>> On Fri, 20 Feb 2015 12:00:10 -0500 >>> Martin Hicks wrote: >>> The newer talitos hardware has support for AES in XTS mode. >>>