Re: [PATCH v2 0/7] hwrng: Add support for STMicroelectronics' RNG IP

2015-09-18 Thread Herbert Xu
On Fri, Sep 18, 2015 at 04:51:12PM +0100, Lee Jones wrote: > > I think it's okay for you to take all but patch 6. > > Patch 6 is an ARM patch and needs to go into ARM SoC via > STMicroelectronics STi tree. In future please don't send me patches that you don't want me to merge in the series. Chee

Re: [PATCH v2 5/8] lib: introduce sg_nents_len_chained

2015-09-18 Thread Tony Battersby
On 09/18/2015 12:19 PM, Tony Battersby wrote: > But why do drivers even need this at all? Here is a typical usage: > > int qce_mapsg(struct device *dev, struct scatterlist *sg, int nents, > enum dma_data_direction dir, bool chained) > { > int err; > > if (chained) { > whi

Re: [PATCH v2 4/7] hwrng: st: Provide DT bindings for ST's Random Number Generator

2015-09-18 Thread Lee Jones
On 18 September 2015 at 17:21, Stephen Boyd wrote: > On 09/17/2015 06:45 AM, Lee Jones wrote: >> Signed-off-by: Lee Jones >> --- >> Documentation/devicetree/bindings/rng/st,rng.txt | 15 +++ >> 1 file changed, 15 insertions(+) >> create mode 100644 Documentation/devicetree/bindings/

Re: [PATCH v2 4/7] hwrng: st: Provide DT bindings for ST's Random Number Generator

2015-09-18 Thread Stephen Boyd
On 09/17/2015 06:45 AM, Lee Jones wrote: > Signed-off-by: Lee Jones > --- > Documentation/devicetree/bindings/rng/st,rng.txt | 15 +++ > 1 file changed, 15 insertions(+) > create mode 100644 Documentation/devicetree/bindings/rng/st,rng.txt > > diff --git a/Documentation/devicetree/bi

Re: [PATCH v2 5/8] lib: introduce sg_nents_len_chained

2015-09-18 Thread Tony Battersby
On 09/18/2015 08:57 AM, LABBE Corentin wrote: > + for (nents = 0, total = 0; sg; sg = sg_next(sg)) { > + nents++; > + total += sg->length; > + if (!sg_is_last(sg) && (sg + 1)->length == 0 && chained) > + *chained = true; > + if

Re: [cryptodev:master 10/29] arch/x86/crypto/sha256_ssse3_glue.c:172:19: error: 'X86_FEATURE_SHA_NI' undeclared

2015-09-18 Thread Tim Chen
On Fri, 2015-09-18 at 23:17 +0800, Herbert Xu wrote: > On Fri, Sep 18, 2015 at 10:36:07PM +0800, kbuild test robot wrote: > > tree: > > https://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git > > master > > head: dcde21287f931b6cee61825306db6a5665566f66 > > commit: a3476db1b

Re: [PATCH] crypto: qat - VF should never trigger SBR on PH

2015-09-18 Thread Tadeusz Struk
Hi Herbert, On 09/18/2015 08:59 AM, Tadeusz Struk wrote: > From: Conor McLoughlin > > Don't allow to trigger SBR from a VF running in VMM context. > > Signed-off-by: Conor McLoughlin > Signed-off-by: Tadeusz Struk > --- > drivers/crypto/qat/qat_common/adf_aer.c |3 +++ > 1 file changed, 3

[PATCH] crypto: qat - VF should never trigger SBR on PH

2015-09-18 Thread Tadeusz Struk
From: Conor McLoughlin Don't allow to trigger SBR from a VF running in VMM context. Signed-off-by: Conor McLoughlin Signed-off-by: Tadeusz Struk --- drivers/crypto/qat/qat_common/adf_aer.c |3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/crypto/qat/qat_common/adf_aer.c b/dri

Re: [PATCH v2 0/7] hwrng: Add support for STMicroelectronics' RNG IP

2015-09-18 Thread Lee Jones
On Fri, 18 Sep 2015, Herbert Xu wrote: > On Fri, Sep 18, 2015 at 03:53:50PM +0100, Lee Jones wrote: > > On 18 September 2015 at 15:07, Herbert Xu > > wrote: > > > On Thu, Sep 17, 2015 at 02:45:50PM +0100, Lee Jones wrote: > > >> v1 => v2: > > >> - New patch: Also fixing /dev/hw_random => /dev/hw

Re: [PATCH] crypto: marvell: properly handle CRYPTO_TFM_REQ_MAY_BACKLOG-flagged requests

2015-09-18 Thread Boris Brezillon
Hi Thomas, On Fri, 18 Sep 2015 17:25:36 +0200 Thomas Petazzoni wrote: > The mv_cesa_queue_req() function calls crypto_enqueue_request() to > enqueue a request. In the normal case (i.e the queue isn't full), this > function returns -EINPROGRESS. The current Marvell CESA crypto driver > takes this

[PATCH] crypto: marvell: properly handle CRYPTO_TFM_REQ_MAY_BACKLOG-flagged requests

2015-09-18 Thread Thomas Petazzoni
The mv_cesa_queue_req() function calls crypto_enqueue_request() to enqueue a request. In the normal case (i.e the queue isn't full), this function returns -EINPROGRESS. The current Marvell CESA crypto driver takes this into account and cleans up the request only if an error occured, i.e if the retu

Re: [cryptodev:master 10/29] arch/x86/crypto/sha256_ssse3_glue.c:172:19: error: 'X86_FEATURE_SHA_NI' undeclared

2015-09-18 Thread Herbert Xu
On Fri, Sep 18, 2015 at 10:36:07PM +0800, kbuild test robot wrote: > tree: > https://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git > master > head: dcde21287f931b6cee61825306db6a5665566f66 > commit: a3476db1b524f2e2d869b001c56ba9ce353d860e [10/29] crypto: x86/sha - > Add

Re: [PATCH v2 0/7] hwrng: Add support for STMicroelectronics' RNG IP

2015-09-18 Thread Herbert Xu
On Fri, Sep 18, 2015 at 03:53:50PM +0100, Lee Jones wrote: > On 18 September 2015 at 15:07, Herbert Xu wrote: > > On Thu, Sep 17, 2015 at 02:45:50PM +0100, Lee Jones wrote: > >> v1 => v2: > >> - New patch: Also fixing /dev/hw_random => /dev/hwrng in Kconfig > >> - Fix 2099 => 2009 typo in commit

Re: [PATCH v2 0/7] hwrng: Add support for STMicroelectronics' RNG IP

2015-09-18 Thread Lee Jones
On 18 September 2015 at 15:07, Herbert Xu wrote: > On Thu, Sep 17, 2015 at 02:45:50PM +0100, Lee Jones wrote: >> v1 => v2: >> - New patch: Also fixing /dev/hw_random => /dev/hwrng in Kconfig >> - Fix 2099 => 2009 typo in commit log >> - Fix 'number of random numbers sourced' return value >> -

Re: [PATCH v2 5/8] lib: introduce sg_nents_len_chained

2015-09-18 Thread Tom Lendacky
On 09/18/2015 07:57 AM, LABBE Corentin wrote: Some driver use a modified version of sg_nents_for_len with an additional parameter bool *chained for knowing if the scatterlist is chained or not. So, for removing duplicate code, add sg_nents_len_chained in lib/scatterlist.c Signed-off-by: LABBE C

RE: [PATCH v2] crypto/caam: add backlogging support

2015-09-18 Thread Porosanu Alexandru
Hi Herbert, > -Original Message- > From: linux-crypto-ow...@vger.kernel.org [mailto:linux-crypto- > ow...@vger.kernel.org] On Behalf Of Herbert Xu > Sent: Friday, September 18, 2015 5:11 PM > To: Porosanu Alexandru-B06830 > Cc: linux-crypto@vger.kernel.org; Geanta Neag Horia Ioan-B05471 >

Re: [PATCH v2] crypto/caam: add backlogging support

2015-09-18 Thread Herbert Xu
On Fri, Sep 18, 2015 at 02:07:38PM +, Porosanu Alexandru wrote: > > MAY_BACKLOG requests will fail once you run out of memory (f.i. backlogging > using crypto_queue) > Now, for this patch requests will be dropped if there are no more > "backlogging" slots available. > Would limiting the # of

Re: [PATCH v2 0/7] hwrng: Add support for STMicroelectronics' RNG IP

2015-09-18 Thread Herbert Xu
On Thu, Sep 17, 2015 at 02:45:50PM +0100, Lee Jones wrote: > v1 => v2: > - New patch: Also fixing /dev/hw_random => /dev/hwrng in Kconfig > - Fix 2099 => 2009 typo in commit log > - Fix 'number of random numbers sourced' return value > - Treat devm_clk_get()'s return value correctly > - Check

RE: [PATCH v2] crypto/caam: add backlogging support

2015-09-18 Thread Porosanu Alexandru
Hi Herbert, > -Original Message- > From: Herbert Xu [mailto:herb...@gondor.apana.org.au] > Sent: Friday, September 18, 2015 4:50 PM > To: Porosanu Alexandru-B06830 > Cc: linux-crypto@vger.kernel.org; Geanta Neag Horia Ioan-B05471 > ; Pop Mircea-R19439 > > Subject: Re: [PATCH v2] crypto/c

Re: [PATCH 0/3] crypto: [sha] Restructure x86 sha trasforms glue code to expose all available transform algorithms

2015-09-18 Thread Herbert Xu
On Wed, Sep 16, 2015 at 04:34:32PM -0700, Tim Chen wrote: > > During the posting of patches of new x86 sha1 and sha256 algorithms based > on new x86 SHA extensions, I got requests to expose all the available > sha transform implementations that are based on SSSE3, AVX and AVX2 as > separate indivi

Re: [PATCH] crypto: qat - Add load balancing across devices

2015-09-18 Thread Herbert Xu
On Wed, Sep 16, 2015 at 05:33:06AM -0700, Tadeusz Struk wrote: > Load balancing of crypto instances only used a single device. > There was no problem with that on PF, but since there is only > one or two instance per VF we need to loadbalance across devices. > > Signed-off-by: Tadeusz Struk Patc

Re: [PATCH 1/2] char: hw_random: Fix module autoload for OF platform drivers

2015-09-18 Thread Herbert Xu
On Tue, Sep 15, 2015 at 06:41:33PM +0200, Luis de Bethencourt wrote: > This platform drivers have a OF device ID table but the OF module > alias information is not created so module autoloading won't work. > > Signed-off-by: Luis de Bethencourt Patch applied. Thanks. -- Email: Herbert Xu Home

Re: [PATCH v2] caam: desc: Remove unused JUMP_TYPE_MASK definition

2015-09-18 Thread Herbert Xu
On Tue, Sep 15, 2015 at 01:54:53PM -0300, Fabio Estevam wrote: > Commit a1efb01feca597b ("jump_label, locking/static_keys: Rename > JUMP_LABEL_TYPE_* and related helpers to the static_key* pattern") > introduced the definition of JUMP_TYPE_MASK in > include/linux/jump_label.h causing the followin

Re: [PATCH 1/4] hwrng: mxc-rnga - Remove unneeded goto label

2015-09-18 Thread Herbert Xu
On Sat, Sep 12, 2015 at 08:19:50PM -0300, Fabio Estevam wrote: > From: Fabio Estevam > > We can simplify the code by returning the error code immediately > instead of jumping to a goto label. > > Signed-off-by: Fabio Estevam All applied. Thanks. -- Email: Herbert Xu Home Page: http://gondor

Re: [PATCH] crypto: qat - don't check for iommu

2015-09-18 Thread Herbert Xu
On Fri, Sep 11, 2015 at 12:26:00PM -0700, Tadeusz Struk wrote: > > Again after checkpatch fixes. Patch applied. Thanks. -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt -- To unsubscribe from this list: send the line "u

Re: [PATCH 0/4] crypto: [sha] x86 SHA extension optimization of SHA1 and SHA256

2015-09-18 Thread Herbert Xu
On Thu, Sep 10, 2015 at 03:26:52PM -0700, Tim Chen wrote: > > The new x86 SHA extensions provide new hardware accelerated instructions > for computing SHA1 and SHA256 hashes. This patch series provide the > assembly routines for SHA1 and SHA256 computation using these new > instructions to the ker

Re: [PATCH] hw_random: octeon-rng: Use devm_hwrng_register

2015-09-18 Thread Herbert Xu
On Thu, Sep 10, 2015 at 11:32:26AM +0530, Vaishali Thakkar wrote: > Use resource managed function devm_hwrng_register instead of > hwrng_register to make the error-path simpler. Also, remove > octeon_rng_remove as it is now redundant. > > Signed-off-by: Vaishali Thakkar Patch applied. Thanks. -

Re: [PATCH] crypto: Kconfig: Allow MXS_DCP to be used on MX6SL

2015-09-18 Thread Herbert Xu
On Wed, Sep 02, 2015 at 12:05:18PM -0300, Fabio Estevam wrote: > From: Fabio Estevam > > MX6SL has the same DCP crypto block as in MX23/MX28, so allow it to be > built for ARCH_MXC. > > Signed-off-by: Fabio Estevam Patch applied. Thanks. -- Email: Herbert Xu Home Page: http://gondor.apana.o

Re: [PATCH 0/3] crypto: Fix module autoload for OF platform drivers

2015-09-18 Thread Herbert Xu
On Fri, Aug 28, 2015 at 06:42:45PM +0200, Luis de Bethencourt wrote: > Hello, > > This series add the missing MODULE_DEVICE_TABLE() for OF to eport > that information so modules have the correct aliases built-in > and autoloading works correctly. All applied. Thanks. -- Email: Herbert Xu Home

Re: [PATCH v2] crypto/caam: add backlogging support

2015-09-18 Thread Herbert Xu
On Fri, Sep 18, 2015 at 01:46:50PM +, Porosanu Alexandru wrote: > > Before this patch, for CAAM driver, regardless if a tfm has MAY_BACKLOG set > or not, if there are no more slots available in the HW JR, the API will > return -EBUSY, but the > request will _not_ be saved for future processin

RE: [PATCH v2] crypto/caam: add backlogging support

2015-09-18 Thread Porosanu Alexandru
Hi Herbert, > -Original Message- > From: Herbert Xu [mailto:herb...@gondor.apana.org.au] > Sent: Friday, September 18, 2015 4:25 PM > To: Porosanu Alexandru-B06830 > Cc: linux-crypto@vger.kernel.org; Geanta Neag Horia Ioan-B05471 > ; Pop Mircea-R19439 > > Subject: Re: [PATCH v2] crypto/c

Re: [PATCH v2] crypto/caam: add backlogging support

2015-09-18 Thread Herbert Xu
On Wed, Sep 16, 2015 at 11:12:41PM +0300, Alex Porosanu wrote: > caam_jr_enqueue() function returns -EBUSY once there are no > more slots available in the JR, but it doesn't actually save > the current request. This breaks the functionality of users > that expect that even if there is no more space

Re: [PATCH v3] crypto: omap-aes: Add support for GCM mode

2015-09-18 Thread Herbert Xu
On Tue, Sep 15, 2015 at 06:58:01PM +0530, Lokesh Vutla wrote: > > + assoc = &req->src[0]; > + sg_init_table(dd->in_sgl, nsg + 1); > + if (assoclen) { > + if (omap_aes_check_aligned(assoc, assoclen)) { > + dd->sgs_copied |= AES_ASSOC_DATA_COPIED; > +

[PATCH v2 3/8] crypto: sahara: replace sahara_sg_length with sg_nents_for_len

2015-09-18 Thread LABBE Corentin
The sahara_sg_length function of the sahara driver is the same as sg_nents_for_len from lib/scatterlist.c Signed-off-by: LABBE Corentin --- drivers/crypto/sahara.c | 30 +++--- 1 file changed, 3 insertions(+), 27 deletions(-) diff --git a/drivers/crypto/sahara.c b/driver

[PATCH v2 2/8] crypto: amcc replace get_sg_count by sg_nents_for_len

2015-09-18 Thread LABBE Corentin
The get_sg_count function of amcc is the same as sg_nents_for_len from lib/scatterlist.c Signed-off-by: LABBE Corentin --- drivers/crypto/amcc/crypto4xx_core.c | 22 +- 1 file changed, 1 insertion(+), 21 deletions(-) diff --git a/drivers/crypto/amcc/crypto4xx_core.c b/drive

[PATCH v2 8/8] crypto: caam: replace __sg_count with sg_nents_len_chained

2015-09-18 Thread LABBE Corentin
The caam driver use a modified version of sg_nents_for_len called __sg_count. This function is now availlable in lib/scatterlist.c Replace __sg_count by sg_nents_len_chained Signed-off-by: LABBE Corentin --- drivers/crypto/caam/caamhash.c | 14 -- drivers/crypto/caam/sg_sw_sec4.h

[PATCH v2 5/8] lib: introduce sg_nents_len_chained

2015-09-18 Thread LABBE Corentin
Some driver use a modified version of sg_nents_for_len with an additional parameter bool *chained for knowing if the scatterlist is chained or not. So, for removing duplicate code, add sg_nents_len_chained in lib/scatterlist.c Signed-off-by: LABBE Corentin --- include/linux/scatterlist.h | 1 +

[PATCH v2 7/8] crypto: qce: replace qce_countsg with sg_nents_len_chained

2015-09-18 Thread LABBE Corentin
The qce driver use a modified version of sg_nents_for_len called qce_countsg. This function is now availlable in lib/scatterlist.c Replace qce_countsg by sg_nents_len_chained Signed-off-by: LABBE Corentin --- drivers/crypto/qce/ablkcipher.c | 8 drivers/crypto/qce/dma.c| 19 --

[PATCH v2 6/8] crypto: talitos: replace sg_count with sg_nents_len_chained

2015-09-18 Thread LABBE Corentin
The talitos driver use a modified version of sg_nents_for_len called sg_count. This function is now availlable in lib/scatterlist.c Replace sg_count by sg_nents_len_chained Signed-off-by: LABBE Corentin --- drivers/crypto/talitos.c | 42 -- 1 file changed

[PATCH v2 4/8] s390: replace zfcp_qdio_sbale_count by sg_nents

2015-09-18 Thread LABBE Corentin
The zfcp_qdio_sbale_count function do the same work than sg_nents(). So replace it by sg_nents() for removing duplicate code. Signed-off-by: LABBE Corentin --- drivers/s390/scsi/zfcp_fsf.c | 3 +-- drivers/s390/scsi/zfcp_qdio.h | 15 --- 2 files changed, 1 insertion(+), 17 deletion

[PATCH v2 1/8] crypto: bfin: replace sg_count by sg_nents

2015-09-18 Thread LABBE Corentin
The sg_count function in bfin_crc.c is the same function as sg_nents. Remove the duplicate code and use sg_nents() instead. Signed-off-by: LABBE Corentin --- drivers/crypto/bfin_crc.c | 25 +++-- 1 file changed, 3 insertions(+), 22 deletions(-) diff --git a/drivers/crypto/bf

[PATCH v2] crypto: Remove duplicate code of SG helpers functions

2015-09-18 Thread LABBE Corentin
Hello This patch series try to remove some duplicate code of some SG helpers functions. The first four patch replace custom functions by already in-tree helper functions. The fourth add a new functions "sg_nents_len_chained" who is the same as sg_nents_for_len with an additionnal arguments. Th

Re: [PATCH 4/7] lib: introduce sg_nents_for_len2

2015-09-18 Thread Herbert Xu
On Fri, Sep 18, 2015 at 02:42:34PM +0200, LABBE Corentin wrote: > Since I have used badly get_maintainer.pl, I need to resend all patchs with > all proper recipient. > And I have respelled some patch. (like for sahara which have an empty commit > log). OK. Cheers, -- Email: Herbert Xu Home Pa

Re: [PATCH 4/7] lib: introduce sg_nents_for_len2

2015-09-18 Thread LABBE Corentin
On Fri, Sep 18, 2015 at 08:22:13PM +0800, Herbert Xu wrote: > On Fri, Sep 18, 2015 at 02:20:48PM +0200, LABBE Corentin wrote: > > > > I will send the modified patch series with this function name soon. > > You only need to resend patches 4-7. > Since I have used badly get_maintainer.pl, I need t

Re: [PATCH 4/7] lib: introduce sg_nents_for_len2

2015-09-18 Thread Herbert Xu
On Fri, Sep 18, 2015 at 02:20:48PM +0200, LABBE Corentin wrote: > > I will send the modified patch series with this function name soon. You only need to resend patches 4-7. Thanks, -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/

Re: [PATCH 4/7] lib: introduce sg_nents_for_len2

2015-09-18 Thread LABBE Corentin
On Fri, Sep 18, 2015 at 07:53:00PM +0800, Herbert Xu wrote: > On Thu, Sep 10, 2015 at 03:21:39PM +0200, LABBE Corentin wrote: > > Some driver use a modified version of sg_nents_for_len with an > > additional parameter bool *chained for knowing if the scatterlist is > > chained or not. > > > > So,

Re: [PATCH 4/7] lib: introduce sg_nents_for_len2

2015-09-18 Thread Herbert Xu
On Thu, Sep 10, 2015 at 03:21:39PM +0200, LABBE Corentin wrote: > Some driver use a modified version of sg_nents_for_len with an > additional parameter bool *chained for knowing if the scatterlist is > chained or not. > > So, for removing duplicate code, add sg_nents_for_len2 in > lib/scatterlist.

Re: [PATCH 4/8] crypto: akcipher - Changes to asymmetric key API

2015-09-18 Thread Herbert Xu
On Wed, Sep 09, 2015 at 09:15:20AM -0700, Tadeusz Struk wrote: > 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 need to be disabled so that the build works fine > after this patch. > They will be

Re: [PATCH 1/8] crypto: akcipher - return status from crypto_unregister_alg

2015-09-18 Thread Herbert Xu
On Wed, Sep 09, 2015 at 09:15:01AM -0700, Tadeusz Struk wrote: > Return status from crypto_unregister_alg to the caller. Why? My plan is to turn crypto_unregister_alg into a void function. Cheers, -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.

Re: [PATCH v2 5/7] hwrng: st: Add support for ST's HW Random Number Generator

2015-09-18 Thread Kieran Bingham
On 17 September 2015 at 14:45, Lee Jones wrote: > Signed-off-by: Pankaj Dev > Signed-off-by: Lee Jones Comments addressed, Also LGTM. Acked-by: Kieran Bingham > --- > drivers/char/hw_random/Kconfig | 10 +++ > drivers/char/hw_random/Makefile | 1 + > drivers/char/hw_random/st-rng.c | 14

Re: [PATCH v2 2/7] hwrng: Kconfig: Fix device node name reference /dev/hw_random => /dev/hwrng

2015-09-18 Thread Kieran Bingham
On 17 September 2015 at 14:45, Lee Jones wrote: > In April 2009, commit d405640 ("Driver Core: misc: add node name support > for misc devices.") inadvertently changed the device node name from > /dev/hw_random to /dev/hwrng. Since 6 years has passed since the change > it seems unpractical to chan

Re: [PATCH v2 1/7] Documentation: hw_random: Fix device node name reference /dev/hw_random => /dev/hwrng

2015-09-18 Thread Kieran Bingham
On 17 September 2015 at 14:45, Lee Jones wrote: > In April 2009, commit d405640 ("Driver Core: misc: add node name support > for misc devices.") inadvertently changed the device node name from > /dev/hw_random to /dev/hwrng. Since 6 years has passed since the change > it seems unpractical to chan

Re: single_task_running() vs. preemption warnings (was Re: [PATCH] kvm: fix preemption warnings in kvm_vcpu_block)

2015-09-18 Thread Peter Zijlstra
On Thu, Sep 17, 2015 at 01:32:55PM -0700, Tim Chen wrote: > I have no objection to change single_task_running to use > raw_smp_processor_id. The worker in mcryptd is bound to > the cpu so it has no migration/preemption issue. So it shouldn't care > which smp_processor_id version is being used. Y