[PATCH] crypto: qce: dma_map_sg can handle chained SG

2015-10-01 Thread LABBE Corentin
The qce driver use two dma_map_sg path according to SG are chained or not. Since dma_map_sg can handle both case, clean the code with all references to sg chained. Thus removing qce_mapsg, qce_unmapsg and qce_countsg functions. Signed-off-by: LABBE Corentin --- drivers/crypto/qce/ablkcipher.c |

[PATCH v5 2/2] crypto: akcipher - Changes to asymmetric key API

2015-10-01 Thread Tadeusz Struk
Setkey function has been split into set_priv_key and set_pub_key. Akcipher requests takes sgl for src and dst instead of void *. Users of the API i.e. two existing RSA implementation and test mgr code have been updated accordingly. Signed-off-by: Tadeusz Struk --- crypto/Makefile

[PATCH v5 0/2] crypto: akcipher - Changes to asymmetric key API

2015-10-01 Thread Tadeusz Struk
This series updates the asymmetric key API. The changes include - setkey function has been split into set_priv_key and set_pub_key. - akcipher requests takes sgl for src and dst instead of void *. Users of the API i.e. two existing RSA implementation and test mgr code have been updated accordingl

[PATCH v5 1/2] lib/mpi: Add mpi sgl helpers

2015-10-01 Thread Tadeusz Struk
Add mpi_read_raw_from_sgl and mpi_write_to_sgl helpers. Signed-off-by: Tadeusz Struk --- include/linux/mpi.h |4 + lib/mpi/mpicoder.c | 191 +++ 2 files changed, 195 insertions(+) diff --git a/include/linux/mpi.h b/include/linux/mpi.h index

Re: [PATCH v4 0/3] crypto: akcipher - Changes to asymmetric key API

2015-10-01 Thread Herbert Xu
On Thu, Oct 01, 2015 at 09:09:54PM -0700, Tadeusz Struk wrote: > > This is used not only in rsa, but also in the new mpi sgl helpers. > Should I drop all the params checking? For a start the MPI helpers shouldn't be using sg_len as the length that they are allowed to read or write. The length sho

Re: [PATCH v4 0/3] crypto: akcipher - Changes to asymmetric key API

2015-10-01 Thread Tadeusz Struk
On 10/01/2015 09:04 PM, Herbert Xu wrote: >> I do use src_len for processing. The sg_len() is still useful for >> > parameter checking to make sure that src_len <= sg_len(req->src) > I don't see the point. We don't check that anywhere else in the > crypto API. It's the caller's responsibility to

Re: [PATCH v4 0/3] crypto: akcipher - Changes to asymmetric key API

2015-10-01 Thread Herbert Xu
On Thu, Oct 01, 2015 at 08:40:26PM -0700, Tadeusz Struk wrote: > > I do use src_len for processing. The sg_len() is still useful for > parameter checking to make sure that src_len <= sg_len(req->src) I don't see the point. We don't check that anywhere else in the crypto API. It's the caller's r

Re: [PATCH v4 0/3] crypto: akcipher - Changes to asymmetric key API

2015-10-01 Thread Tadeusz Struk
On 10/01/2015 08:20 PM, Herbert Xu wrote: >> Changes in v4: >> > - add back src_len and dst_len > So why do you still use sg_len? The length of the SG list is > irrelevant now that you have src_len/dst_len. I do use src_len for processing. The sg_len() is still useful for parameter checking to mak

Re: [PATCH v4 0/3] crypto: akcipher - Changes to asymmetric key API

2015-10-01 Thread Herbert Xu
On Thu, Oct 01, 2015 at 01:28:45PM -0700, Tadeusz Struk wrote: > > Changes in v4: > - add back src_len and dst_len So why do you still use sg_len? The length of the SG list is irrelevant now that you have src_len/dst_len. Cheers, -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~herbe

[PATCH v1 1/4] crypto: ccp - Replace BUG_ON with WARN_ON and a return code

2015-10-01 Thread Tom Lendacky
Replace the usage of BUG_ON with WARN_ON and return an error. Signed-off-by: Tom Lendacky --- drivers/crypto/ccp/ccp-crypto-aes-cmac.c | 20 +- drivers/crypto/ccp/ccp-crypto-main.c |6 +- drivers/crypto/ccp/ccp-crypto-sha.c | 13 drivers/crypto/ccp/ccp-ops.c

[PATCH v1 3/4] crypto: ccp - Change references to accelerator to offload

2015-10-01 Thread Tom Lendacky
The CCP is meant to be more of an offload engine than an accelerator engine. To avoid any confusion, change references to accelerator to offload. Signed-off-by: Tom Lendacky --- drivers/crypto/Kconfig |2 +- drivers/crypto/ccp/Kconfig | 13 ++--- 2 files changed, 7 insertions(+

[PATCH v1 4/4] crypto: ccp - Use module name in driver structures

2015-10-01 Thread Tom Lendacky
The convention is to use the name of the module in the driver structures that are used for registering the device. The CCP module is currently using a descriptive name. Replace the descriptive name with module name. Signed-off-by: Tom Lendacky --- drivers/crypto/ccp/ccp-pci.c |2 +- dri

[PATCH v1 0/4] crypto: ccp - CCP driver updates 2015-10-01

2015-10-01 Thread Tom Lendacky
The following patches are included in this driver update series: - Remove the usage of BUG_ON and replace with WARN_ON and an error return code - Remove unused variable - Change references to accelerator to offload - Use the module name in the driver structure instead of a descriptive name T

[PATCH v1 2/4] crypto: ccp - Remove use ACPI field

2015-10-01 Thread Tom Lendacky
With the creation of the device_dma_is_coherent API the "use_acpi" field is no longer needed, so remove it. Signed-off-by: Tom Lendacky --- drivers/crypto/ccp/ccp-platform.c |4 1 file changed, 4 deletions(-) diff --git a/drivers/crypto/ccp/ccp-platform.c b/drivers/crypto/ccp/ccp-plat

[PATCH v4 2/3] lib/mpi: Add mpi sgl helpers

2015-10-01 Thread Tadeusz Struk
Add mpi_read_raw_from_sgl and mpi_write_to_sgl helpers. Signed-off-by: Tadeusz Struk --- include/linux/mpi.h |4 + lib/mpi/mpicoder.c | 194 +++ 2 files changed, 198 insertions(+) diff --git a/include/linux/mpi.h b/include/linux/mpi.h index

[PATCH v4 3/3] crypto: akcipher - Changes to asymmetric key API

2015-10-01 Thread Tadeusz Struk
Setkey function has been split into set_priv_key and set_pub_key. Akcipher requests takes sgl for src and dst instead of void *. Users of the API i.e. two existing RSA implementation and test mgr code have been updated accordingly. Signed-off-by: Tadeusz Struk --- crypto/Makefile

[PATCH v4 0/3] crypto: akcipher - Changes to asymmetric key API

2015-10-01 Thread Tadeusz Struk
This series updates the asymmetric key API. The changes include - setkey function has been split into set_priv_key and set_pub_key. - akcipher requests takes sgl for src and dst instead of void *. Users of the API i.e. two existing RSA implementation and test mgr code have been updated accordingl

[PATCH v4 1/3] lib/scatterlist: Add sg_len helper

2015-10-01 Thread Tadeusz Struk
Add sg_len function which returns the total number of bytes in sg. Signed-off-by: Tadeusz Struk --- include/linux/scatterlist.h |1 + lib/scatterlist.c | 20 2 files changed, 21 insertions(+) diff --git a/include/linux/scatterlist.h b/include/linux/scatterli

Re: [PATCH v3 2/2] crypto: akcipher - Changes to asymmetric key API

2015-10-01 Thread Tadeusz Struk
On 10/01/2015 08:15 AM, Herbert Xu wrote: > On Thu, Oct 01, 2015 at 07:52:32AM -0700, Tadeusz Struk wrote: >> On 10/01/2015 06:45 AM, Herbert Xu wrote: >>> On Tue, Sep 22, 2015 at 09:34:03AM -0700, Tadeusz Struk wrote: struct akcipher_request { struct crypto_async_request base; >

Re: [PATCH v3 2/2] crypto: akcipher - Changes to asymmetric key API

2015-10-01 Thread Herbert Xu
On Thu, Oct 01, 2015 at 07:52:32AM -0700, Tadeusz Struk wrote: > On 10/01/2015 06:45 AM, Herbert Xu wrote: > > On Tue, Sep 22, 2015 at 09:34:03AM -0700, Tadeusz Struk wrote: > >> > >> struct akcipher_request { > >>struct crypto_async_request base; > >> - void *src; > >> - void *dst; > >> -

Re: [PATCH v3 2/2] crypto: akcipher - Changes to asymmetric key API

2015-10-01 Thread Tadeusz Struk
On 10/01/2015 06:45 AM, Herbert Xu wrote: > On Tue, Sep 22, 2015 at 09:34:03AM -0700, Tadeusz Struk wrote: >> >> struct akcipher_request { >> struct crypto_async_request base; >> -void *src; >> -void *dst; >> -unsigned int src_len; >> -unsigned int dst_len; >> +struct scat

Re: [PATCH] crypto: qat - add support for ctr(aes) and xts(aes)

2015-10-01 Thread Herbert Xu
On Wed, Sep 30, 2015 at 05:38:39AM -0700, Tadeusz Struk wrote: > Add support for ctr and xts encryption modes. > > Signed-off-by: Tadeusz Struk Patch applied. Thanks! -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt -

Re: [PATCH] crypto: qat - remove unneeded variable

2015-10-01 Thread Herbert Xu
On Wed, Sep 30, 2015 at 05:40:00AM -0700, Tadeusz Struk wrote: > Remove unneeded variable val_indx. > Issue found by a static analyzer. > > Reported-by: Giovanni Cabiddu > Signed-off-by: Tadeusz Struk Patch applied. Thanks! -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~herbert/

Re: [PATCH] crypto: blkcipher and ablkcipher should it be static

2015-10-01 Thread Herbert Xu
On Sun, Sep 27, 2015 at 10:47:05PM +0800, Geliang Tang wrote: > Fixes the following sparse warnings: > > crypto/skcipher.c:94:5: > warning: symbol 'crypto_init_skcipher_ops_blkcipher' > was not declared. Should it be static? > > crypto/skcipher.c:185:5: > warning: symbol 'crypto_init_skciphe

Re: [PATCHv2 1/1] Disable fips-allowed for authenc() and des() ciphers

2015-10-01 Thread Herbert Xu
On Fri, Sep 25, 2015 at 07:58:10AM +0200, Stephan Mueller wrote: > Am Donnerstag, 24. September 2015, 18:24:35 schrieb John Haxby: > > Hi John, > > >No authenc() ciphers are FIPS approved, nor is ecb(des). > >After the end of 2015, ansi_cprng will also be non-approved. > > > >Signed-off-by: John

Re: [PATCH] crypto: dma_map_sg can handle chained SG

2015-10-01 Thread Herbert Xu
On Wed, Sep 23, 2015 at 01:55:24PM +0200, LABBE Corentin wrote: > > Hello > > Some drivers use two dma_map_sg path according to SG are chained or not. > Since dma_map_sg can handle both case, this patch series clean all code > with references to sg chained. > > Note that I could only compile tes

Re: [PATCH] crypto: qat - remove empty functions and turn qat_uregister fn to void

2015-10-01 Thread Herbert Xu
On Tue, Sep 22, 2015 at 11:57:47AM -0700, Tadeusz Struk wrote: > Some code cleanups after crypto API changes: > - Change qat_algs_unregister to a void function to keep it consistent > with qat_asym_algs_unregister. > - Remove empty functions qat_algs_init & qat_algs_exit. > > Signed-off-by: Tade

Re: [PATCH 2/4] crypto: qce: dma_map_sg can handle chained SG

2015-10-01 Thread Herbert Xu
On Wed, Sep 23, 2015 at 01:55:26PM +0200, LABBE Corentin wrote: > The qce driver use two dma_map_sg path according to SG are chained > or not. > Since dma_map_sg can handle both case, clean the code with all > references to sg chained. > > Thus removing qce_mapsg, qce_unmapsg and qce_countsg funct

Re: [PATCH v3 2/2] crypto: akcipher - Changes to asymmetric key API

2015-10-01 Thread Herbert Xu
On Tue, Sep 22, 2015 at 09:34:03AM -0700, Tadeusz Struk wrote: > > struct akcipher_request { > struct crypto_async_request base; > - void *src; > - void *dst; > - unsigned int src_len; > - unsigned int dst_len; > + struct scatterlist *src; > + struct scatterlist *dst;

Re: [STLinux Kernel] [PATCH v2 6/7] ARM: STi: STiH407: Enable the 2 HW Random Number Generators for STiH4{07, 10}

2015-10-01 Thread Maxime Coquelin
Hi Lee, Herbert, On 09/17/2015 03:45 PM, Lee Jones wrote: Signed-off-by: Lee Jones --- arch/arm/boot/dts/stih407-family.dtsi | 14 ++ 1 file changed, 14 insertions(+) diff --git a/arch/arm/boot/dts/stih407-family.dtsi b/arch/arm/boot/dts/stih407-family.dtsi index 838b812..9452b