[BISECT] ARM build errors on GCC v6.2 (crypto: arm/aes - replace scalar AES cipher)

2017-01-14 Thread Krzysztof Kozlowski
Hi, allyesconfig and multi_v7_defconfig fail to build on recent linux-next on GCC 6.2.0. Errors: ../arch/arm/crypto/aes-cipher-core.S: Assembler messages: ../arch/arm/crypto/aes-cipher-core.S:21: Error: selected processor does not support `tt .req ip' in ARM mode ../arch/arm/crypto/aes-cipher-co

Re: [BISECT] ARM build errors on GCC v6.2 (crypto: arm/aes - replace scalar AES cipher)

2017-01-14 Thread Krzysztof Kozlowski
On Sat, Jan 14, 2017 at 06:20:12PM +, Russell King - ARM Linux wrote: > On Sat, Jan 14, 2017 at 04:24:35PM +0200, Krzysztof Kozlowski wrote: > > Hi, > > > > allyesconfig and multi_v7_defconfig fail to build on recent linux-next > > on GCC 6.2.0. > > >

[PATCH] crypto: s5p-sss - Fix completing crypto request in IRQ handler

2017-03-05 Thread Krzysztof Kozlowski
PID: 0 at crypto/skcipher.c:430 skcipher_walk_first+0x13c/0x14c The interrupt is marked shared but in fact there are no other users sharing it. Thus the simplest solution seems to be to just use a threaded interrupt handler, after converting it to oneshot. Signed-off-by: Krzysztof Kozlowski ---

Re: XTS Crypto Not Found In /proc/crypto Even After Compiled for 4.10.1.

2017-03-05 Thread Krzysztof Kozlowski
On Fri, Mar 03, 2017 at 12:02:10PM +0800, Herbert Xu wrote: > On Thu, Mar 02, 2017 at 05:35:30PM -0600, Nathan Royce wrote: > > ARM ODroid XU4 > > > > $ cat /proc/config.gz | gunzip | grep XTS > > CONFIG_CRYPTO_XTS=y > > > > $ grep xts /proc/crypto > > //4.9.13 > > name : xts(aes) > > dri

Re: XTS Crypto Not Found In /proc/crypto Even After Compiled for 4.10.1.

2017-03-06 Thread Krzysztof Kozlowski
ntry+0x18/0x1c) > [ 22.095258] [] (cpu_startup_entry) from [] > (start_kernel+0x374/0x394) > [ 22.103389] handlers: > [ 22.105635] [] irq_default_primary_handler threaded > [] s5p_aes_interrupt > [ 22.114046] Disabling IRQ #69 > [ 23.496638] Btrfs loaded, crc32c=

Re: XTS Crypto Not Found In /proc/crypto Even After Compiled for 4.10.1.

2017-03-08 Thread Krzysztof Kozlowski
On Mon, Mar 06, 2017 at 03:29:48PM -0600, Nathan Royce wrote: > OK, I just tried 4.10.0 and the output is looking the same. > > I can't say my setup is all that odd. The cryptographic use is only > with the swap partition found in my original email (seen in Herbert's > reply). You have quite spec

[PATCH] crypto: s5p-sss - Fix spinlock recursion on LRW(AES)

2017-03-08 Thread Krzysztof Kozlowski
putting the s5p_aes_complete() only within ISR level. Reported-by: Nathan Royce Cc: # v4.10.x: 07de4bc88c crypto: s5p-sss - Fix completing Cc: # v4.10.x Signed-off-by: Krzysztof Kozlowski --- I think, along with 07de4bc88c this should be backported to v4.10 as it happens there. Signed-off-by: Krzyszto

Re: XTS Crypto Not Found In /proc/crypto Even After Compiled for 4.10.1.

2017-03-08 Thread Krzysztof Kozlowski
On Wed, Mar 08, 2017 at 07:45:42PM +0200, Krzysztof Kozlowski wrote: > On Mon, Mar 06, 2017 at 03:29:48PM -0600, Nathan Royce wrote: > > OK, I just tried 4.10.0 and the output is looking the same. > > > > I can't say my setup is all that odd. The cryptographic use

Re: [PATCH v2] dt/bindings: exynos-rng: Move dt binding documentation to bindings/crypto

2017-08-23 Thread Krzysztof Kozlowski
rename Documentation/devicetree/bindings/{rng => > crypto}/samsung,exynos-rng4.txt (100%) > Patch is okay but CC list is still incomplete. I do not know how you could get Mauro for this patch... just use get_maintainers.pl. Reviewed-by: Krzysztof Kozlowski Best regards, Krzysztof

Re: [PATCH v2] dt/bindings: exynos-rng: Move dt binding documentation to bindings/crypto

2017-08-23 Thread Krzysztof Kozlowski
On Wed, Aug 23, 2017 at 10:14:29PM +0530, PrasannaKumar Muralidharan wrote: > Hi Krzysztof, > > On 23 August 2017 at 21:42, Krzysztof Kozlowski wrote: > > On Wed, Aug 23, 2017 at 08:34:43PM +0530, PrasannaKumar Muralidharan wrote: > >> Samsung exynos PRNG driver is using

Re: [PATCH] crypto: s5p-sss: Add HASH support for Exynos

2017-09-13 Thread Krzysztof Kozlowski
On Wed, Sep 13, 2017 at 2:44 PM, Kamil Konieczny wrote: > Add support for MD5, SHA1, SHA256 hash algorithms for Exynos HW. > It uses the crypto framework asynchronous hash api. > It is based on omap-sham.c driver. > S5P has some HW differencies and is not implemented. > > Modifications in s5p-sss:

Re: [PATCH] crypto: s5p-sss: Add HASH support for Exynos

2017-09-14 Thread Krzysztof Kozlowski
On Wed, Sep 13, 2017 at 4:24 PM, Kamil Konieczny wrote: > Hi Krzysztof, > > On 13.09.2017 15:18, Krzysztof Kozlowski wrote: >> On Wed, Sep 13, 2017 at 2:44 PM, Kamil Konieczny >> wrote: >>> Add support for MD5, SHA1, SHA256 hash algorithms for Exynos HW. &g

Re: [PATCH] crypto: s5p-sss: Add HASH support for Exynos

2017-09-15 Thread Krzysztof Kozlowski
On Fri, Sep 15, 2017 at 8:10 AM, Krzysztof Kozlowski wrote: > On Wed, Sep 13, 2017 at 4:24 PM, Kamil Konieczny > wrote: >> Hi Krzysztof, >> >> On 13.09.2017 15:18, Krzysztof Kozlowski wrote: >>> On Wed, Sep 13, 2017 at 2:44 PM, Kamil Konieczny >>> wro

Re: [PATCH v2] crypto: s5p-sss: Add HASH support for Exynos

2017-09-19 Thread Krzysztof Kozlowski
new CRYPTO_DEV_EXYNOS_HASH, depend on !EXYNOS_RNG > and CRYPTO_DEV_S5P > > - Select sw algorithms MD5, SHA1 and SHA256 in EXYNOS_HASH > as they are nedded for fallback. > > Signed-off-by: Kamil Konieczny > --- > version 2: > - change patch format so number of lines

Re: [PATCH v2] crypto: s5p-sss: Add HASH support for Exynos

2017-09-25 Thread Krzysztof Kozlowski
On Fri, Sep 22, 2017 at 08:00:17PM +0200, Kamil Konieczny wrote: > On 19.09.2017 21:03, Krzysztof Kozlowski wrote: > > On Fri, Sep 15, 2017 at 07:50:06PM +0200, Kamil Konieczny wrote: (...) > >> + > >> +/* HASH flags */ > > > > All defines below have &q

Re: [PATCH v2] crypto: s5p-sss: Add HASH support for Exynos

2017-09-26 Thread Krzysztof Kozlowski
On Tue, Sep 26, 2017 at 05:54:42PM +0200, Kamil Konieczny wrote: > On 25.09.2017 20:27, Krzysztof Kozlowski wrote: > [...] > >>>> +struct tasklet_struct hash_tasklet; > >>>> +u8 xmit_buf[BUFLEN] SSS_ALIGNE

Re: [PATCH v3] crypto: s5p-sss: Add HASH support for Exynos

2017-09-30 Thread Krzysztof Kozlowski
new CRYPTO_DEV_EXYNOS_HASH, depend on !EXYNOS_RNG > and CRYPTO_DEV_S5P > > - Select sw algorithms MD5, SHA1 and SHA256 in EXYNOS_HASH > as they are nedded for fallback. > > Signed-off-by: Kamil Konieczny > --- > version 3: > - many fixes suggested by Krzysztof Kozlo

Re: [PATCH v3] crypto: s5p-sss: Add HASH support for Exynos

2017-10-03 Thread Krzysztof Kozlowski
On Tue, Oct 03, 2017 at 04:57:43PM +0200, Kamil Konieczny wrote: > >> [...] > >> +static struct ahash_alg algs_sha256[] = { > >> +{ > >> + .init = s5p_hash_init, > >> + .update = s5p_hash_update, > >> + .final = s5p_hash_final, > >> + .finup = s5p_hash_finu

Re: [PATCH v4] crypto: s5p-sss: Add HASH support for Exynos

2017-10-06 Thread Krzysztof Kozlowski
new CRYPTO_DEV_EXYNOS_HASH, depend on !EXYNOS_RNG > and CRYPTO_DEV_S5P > > - Select sw algorithms MD5, SHA1 and SHA256 in EXYNOS_HASH > as they are nedded for fallback. > > Signed-off-by: Kamil Konieczny > --- > version 4: > - fixes suggested by Krzysztof Kozlowsk

Re: [PATCH v5] crypto: s5p-sss: Add HASH support for Exynos

2017-10-09 Thread Krzysztof Kozlowski
new CRYPTO_DEV_EXYNOS_HASH, depend on !EXYNOS_RNG > and CRYPTO_DEV_S5P > > - Select sw algorithms MD5, SHA1 and SHA256 in EXYNOS_HASH > as they are nedded for fallback. > > Signed-off-by: Kamil Konieczny > --- > version 5: > - fix suggested by Krzysztof Kozlowski:

Re: [PATCH 1/2] change spaces into tabs in defines

2017-10-17 Thread Krzysztof Kozlowski
ons(-) > Reviewed-by: Krzysztof Kozlowski Best regards, Krzysztof

Re: [PATCH 2/2] Add HASH support for Exynos

2017-10-17 Thread Krzysztof Kozlowski
On Mon, Oct 16, 2017 at 7:43 PM, Kamil Konieczny wrote: > Add support for MD5, SHA1, SHA256 hash algorithms for Exynos HW. > It uses the crypto framework asynchronous hash api. > It is based on omap-sham.c driver. > S5P has some HW differencies and is not implemented. > > Modifications in s5p-sss:

Re: [PATCH v7 1/2] crypto: s5p-sss: change spaces into tabs in defines

2017-10-19 Thread Krzysztof Kozlowski
On Tue, Oct 17, 2017 at 1:28 PM, Kamil Konieczny wrote: > change spaces into tabs in defines > > Signed-off-by: Kamil Konieczny > --- > drivers/crypto/s5p-sss.c | 190 > +++ > 1 file changed, 95 insertions(+), 95 deletions(-) > I reviewed this alread

Re: [PATCH v7 2/2] crypto: s5p-sss: Add HASH support for Exynos

2017-10-19 Thread Krzysztof Kozlowski
t; +++++- > 2 files changed, 1411 insertions(+), 10 deletions(-) Reviewed-by: Krzysztof Kozlowski Best regards, Krzysztof

Re: [PATCH] crypto/s5p-sss: Use common error handling code in s5p_aes_probe()

2017-10-22 Thread Krzysztof Kozlowski
On Sun, Oct 22, 2017 at 03:05:05PM +0200, SF Markus Elfring wrote: > From: Markus Elfring > Date: Sun, 22 Oct 2017 15:00:27 +0200 > > Add a jump target so that a bit of exception handling can be better reused > at the end of this function. > > This issue was detected by using the Coccinelle soft

Re: [PATCH] crypto: s5p-sss - Remove a stray tab

2017-11-10 Thread Krzysztof Kozlowski
On Thu, Nov 9, 2017 at 10:26 PM, Dan Carpenter wrote: > This code seems correct, but the goto was indented too far. > > Signed-off-by: Dan Carpenter > > diff --git a/drivers/crypto/s5p-sss.c b/drivers/crypto/s5p-sss.c Reviewed-by: Krzysztof Kozlowski Best regards, Krzysztof

Re: [PATCH 1/3] dt-bindings: hwrng: Add Samsung Exynos 5250+ True RNG bindings

2017-11-23 Thread Krzysztof Kozlowski
+++ > 1 file changed, 17 insertions(+) > create mode 100644 > Documentation/devicetree/bindings/rng/samsung,exynos5250-trng.txt Reviewed-by: Krzysztof Kozlowski Best regards, Krzysztof

Re: [PATCH 2/3] hwrng: exynos - add Samsung Exynos True RNG driver

2017-11-23 Thread Krzysztof Kozlowski
On Thu, Nov 23, 2017 at 4:09 PM, Łukasz Stelmach wrote: > Add support for True Random Number Generator found in Samsung Exynos > 5250+ SoCs. > > Signed-off-by: Łukasz Stelmach > --- > MAINTAINERS | 7 + > drivers/char/hw_random/Kconfig | 12 ++ > drivers/char/hw

Re: [PATCH 3/3] ARM: dts: exynos: Add nodes for True Random Number Generator

2017-11-23 Thread Krzysztof Kozlowski
On Thu, Nov 23, 2017 at 4:09 PM, Łukasz Stelmach wrote: > Add nodes for the True Random Number Generator found in Samsung Exynos > 5250+ SoCs. > > Signed-off-by: Łukasz Stelmach > --- > arch/arm/boot/dts/exynos5.dtsi| 5 + > arch/arm/boot/dts/exynos5250.dtsi | 5 + > arch/arm/boot/dt

Re: [PATCH 2/3] hwrng: exynos - add Samsung Exynos True RNG driver

2017-11-24 Thread Krzysztof Kozlowski
On Thu, Nov 23, 2017 at 7:46 PM, Łukasz Stelmach wrote: > It was <2017-11-23 czw 17:31>, when Krzysztof Kozlowski wrote: >> On Thu, Nov 23, 2017 at 4:09 PM, Łukasz Stelmach >> wrote: >>> Add support for True Random Number Generator found in Samsung Exynos >>

Re: [PATCH 2/3] hwrng: exynos - add Samsung Exynos True RNG driver

2017-11-24 Thread Krzysztof Kozlowski
On Fri, Nov 24, 2017 at 2:05 PM, Stephan Müller wrote: > Am Freitag, 24. November 2017, 13:09:06 CET schrieb Krzysztof Kozlowski: > > Hi Krzysztof, >> >> >> >> 1. I was rather thinking about extending existing exynos-rng.c [1] so >> >> it would be

Re: [PATCH v2 1/3] dt-bindings: hwrng: Add Samsung Exynos 5250+ True RNG bindings

2017-11-27 Thread Krzysztof Kozlowski
On Mon, Nov 27, 2017 at 10:58 AM, Łukasz Stelmach wrote: > Add binding documentation for the True Random Number Generator > found on Samsung Exynos 5250+ SoCs. > > Acked-by: Rob Herring > Reviewed-by: Krzysztof Kozlowski > Signed-off-by: Łukasz Stelmach A minor nit: add n

Re: [PATCH v2 2/3] hwrng: exynos - add Samsung Exynos True RNG driver

2017-11-27 Thread Krzysztof Kozlowski
On Mon, Nov 27, 2017 at 10:58 AM, Łukasz Stelmach wrote: > Add support for True Random Number Generator found in Samsung Exynos > 5250+ SoCs. > > Signed-off-by: Łukasz Stelmach > --- > MAINTAINERS | 7 + > drivers/char/hw_random/Kconfig | 12 ++ > drivers/char/h

Re: [PATCH v3 1/3] dt-bindings: hwrng: Add Samsung Exynos 5250+ True RNG bindings

2017-12-04 Thread Krzysztof Kozlowski
On Mon, Dec 4, 2017 at 1:53 PM, Łukasz Stelmach wrote: > Add binding documentation for the True Random Number Generator > found on Samsung Exynos 5250+ SoCs. > > Signed-off-by: Łukasz Stelmach > --- > .../devicetree/bindings/rng/samsung,exynos5250-trng.txt | 17 > + > 1 file cha

Re: [PATCH v3 2/3] hwrng: exynos - add Samsung Exynos True RNG driver

2017-12-04 Thread Krzysztof Kozlowski
12 ++ > drivers/char/hw_random/Makefile | 1 + > drivers/char/hw_random/exynos-trng.c | 245 > +++ > 4 files changed, 265 insertions(+) > create mode 100644 drivers/char/hw_random/exynos-trng.c Reviewed-by: Krzysztof Kozlowski Best regards, Krzysztof

Re: [PATCH v3 1/3] dt-bindings: hwrng: Add Samsung Exynos 5250+ True RNG bindings

2017-12-05 Thread Krzysztof Kozlowski
On Tue, Dec 5, 2017 at 10:30 AM, Łukasz Stelmach wrote: > It was <2017-12-04 pon 14:13>, when Krzysztof Kozlowski wrote: >> On Mon, Dec 4, 2017 at 1:53 PM, Łukasz Stelmach >> wrote: >>> Add binding documentation for the True Random Number Generator >>

Re: [PATCH 1/3] crypto: exynos - Support Exynos5250+ SoCs

2017-12-05 Thread Krzysztof Kozlowski
On Tue, Dec 5, 2017 at 1:35 PM, Łukasz Stelmach wrote: > Add support for PRNG in Exynos5250+ SoCs. > > Signed-off-by: Łukasz Stelmach > --- > .../bindings/crypto/samsung,exynos-rng4.txt| 4 ++- > drivers/crypto/exynos-rng.c| 36 > -- > 2 file

Re: [PATCH 2/3] crypto: exynos - Improve performance of PRNG

2017-12-05 Thread Krzysztof Kozlowski
On Tue, Dec 5, 2017 at 1:35 PM, Łukasz Stelmach wrote: > Use memcpy_fromio() instead of custom exynos_rng_copy_random() function > to retrieve generated numbers from the registers of PRNG. > > Remove unnecessary invocation of cpu_relax(). > > Signed-off-by: Łukasz Stelmach > --- > drivers/crypto

Re: [PATCH 3/3] crypto: exynos - Reseed PRNG after generating 2^16 random bytes

2017-12-05 Thread Krzysztof Kozlowski
On Tue, Dec 5, 2017 at 1:35 PM, Łukasz Stelmach wrote: > Reseed PRNG after reading 65 kB of randomness. Although this may reduce > performance, in most casese the loss is not noticable. s/casese/cases/ s/noticable/noticeable/ Please explain why you want to reseed after 65 kB (as opposite to curre

Re: [PATCH 2/3] crypto: exynos - Improve performance of PRNG

2017-12-05 Thread Krzysztof Kozlowski
On Tue, Dec 05, 2017 at 05:43:10PM +0100, Łukasz Stelmach wrote: > It was <2017-12-05 wto 14:54>, when Stephan Mueller wrote: > > Am Dienstag, 5. Dezember 2017, 13:35:57 CET schrieb Łukasz Stelmach: > > > > Hi Łukasz, > > > >> Use memcpy_fromio() instead of custom exynos_rng_copy_random() function

Re: [PATCH] crypto: exynos - Icrease the priority of the driver

2017-12-05 Thread Krzysztof Kozlowski
ore > software implementations, but allow them to be selected in FIPS-mode > (fips=1 in the kernel command line). Typo in subject ("Increase"). Reviewed-by: Krzysztof Kozlowski Best regards, Krzysztof

Re: [PATCH 2/3] crypto: exynos - Improve performance of PRNG

2017-12-05 Thread Krzysztof Kozlowski
On Tue, Dec 5, 2017 at 6:53 PM, Krzysztof Kozlowski wrote: > On Tue, Dec 05, 2017 at 05:43:10PM +0100, Łukasz Stelmach wrote: >> It was <2017-12-05 wto 14:54>, when Stephan Mueller wrote: >> > Am Dienstag, 5. Dezember 2017, 13:35:57 CET schrieb Łukasz Stelmach: >> &g

Re: [PATCH 2/3] crypto: exynos - Improve performance of PRNG

2017-12-06 Thread Krzysztof Kozlowski
On Wed, Dec 6, 2017 at 12:32 PM, Łukasz Stelmach wrote: > It was <2017-12-05 wto 19:06>, when Krzysztof Kozlowski wrote: >> On Tue, Dec 5, 2017 at 6:53 PM, Krzysztof Kozlowski wrote: >>> On Tue, Dec 05, 2017 at 05:43:10PM +0100, Łukasz Stelmach wrote: >>>>

Re: [PATCH 1/3] crypto: exynos - Support Exynos5250+ SoCs

2017-12-06 Thread Krzysztof Kozlowski
On Wed, Dec 6, 2017 at 2:42 PM, Łukasz Stelmach wrote: > It was <2017-12-05 wto 14:34>, when Krzysztof Kozlowski wrote: >> On Tue, Dec 5, 2017 at 1:35 PM, Łukasz Stelmach >> wrote: >>> Add support for PRNG in Exynos5250+ SoCs. >>> >>> Signed-of

Re: [PATCH 1/3] crypto: exynos - Support Exynos5250+ SoCs

2017-12-06 Thread Krzysztof Kozlowski
On Wed, Dec 6, 2017 at 3:53 PM, Łukasz Stelmach wrote: > It was <2017-12-06 śro 15:05>, when Krzysztof Kozlowski wrote: >> On Wed, Dec 6, 2017 at 2:42 PM, Łukasz Stelmach >> wrote: >>> It was <2017-12-05 wto 14:34>, when Krzysztof Kozlowski wrote: >>

Re: [PATCH v2 1/4] crypto: exynos - Support Exynos5250+ SoCs

2017-12-11 Thread Krzysztof Kozlowski
On Mon, Dec 11, 2017 at 3:06 PM, Łukasz Stelmach wrote: > Cc: Marek Szyprowski , Bartlomiej Zolnierkiewicz > > > Add support for PRNG in Exynos5250+ SoCs. > > Signed-off-by: Łukasz Stelmach > --- > .../bindings/crypto/samsung,exynos-rng4.txt| 4 ++- > drivers/crypto/exynos-rng.c

Re: [PATCH v2 2/4] crypto: exynos - Improve performance of PRNG

2017-12-11 Thread Krzysztof Kozlowski
On Mon, Dec 11, 2017 at 3:06 PM, Łukasz Stelmach wrote: > Cc: Marek Szyprowski , Bartlomiej Zolnierkiewicz > This should not appear here. > > Use memcpy_fromio() instead of custom exynos_rng_copy_random() function > to retrieve generated numbers from the registers of PRNG. > > Rearrange the lo

Re: [PATCH v2 3/4] crypto: exynos - Reseed PRNG after generating 2^16 random bytes

2017-12-11 Thread Krzysztof Kozlowski
On Mon, Dec 11, 2017 at 3:06 PM, Łukasz Stelmach wrote: > Cc: Marek Szyprowski , Bartlomiej Zolnierkiewicz > Same as in 1/4 and 2/4. > > Reseed PRNG after reading 65 kB of randomness. Although this may reduce > performance, in most cases the loss is not noticeable. You missed the comment abou

Re: [PATCH v2 4/4] crypto: exynos - Introduce mutex to prevent concurrent access to hardware

2017-12-11 Thread Krzysztof Kozlowski
On Mon, Dec 11, 2017 at 3:06 PM, Łukasz Stelmach wrote: > Cc: Marek Szyprowski , Bartlomiej Zolnierkiewicz > > > Hardware operations like reading random numbers and setting a seed need > to be conducted in a single thread. Therefore a mutex is required to > prevent multiple threads (processes) f

Re: [PATCH v3 3/3] ARM: dts: exynos: Add nodes for True Random Number Generator

2017-12-11 Thread Krzysztof Kozlowski
On Mon, Dec 04, 2017 at 01:53:51PM +0100, Łukasz Stelmach wrote: > Add nodes for the True Random Number Generator found in Samsung Exynos > 5250+ SoCs. > > Signed-off-by: Łukasz Stelmach > --- > arch/arm/boot/dts/exynos5.dtsi| 5 + > arch/arm/boot/dts/exynos5250.dtsi | 5 + > arch/ar

Re: [PATCH v3 3/3] ARM: dts: exynos: Add nodes for True Random Number Generator

2017-12-12 Thread Krzysztof Kozlowski
On Tue, Dec 12, 2017 at 11:35 AM, Łukasz Stelmach wrote: > It was <2017-12-11 pon 19:49>, when Krzysztof Kozlowski wrote: >> On Mon, Dec 04, 2017 at 01:53:51PM +0100, Łukasz Stelmach wrote: >>> Add nodes for the True Random Number Generator found in Samsung Exynos >&g

Re: [PATCH v2 4/4] crypto: exynos - Introduce mutex to prevent concurrent access to hardware

2017-12-12 Thread Krzysztof Kozlowski
On Tue, Dec 12, 2017 at 11:30 AM, Łukasz Stelmach wrote: > It was <2017-12-11 pon 16:03>, when Krzysztof Kozlowski wrote: >> On Mon, Dec 11, 2017 at 3:06 PM, Łukasz Stelmach >> wrote: >>> Cc: Marek Szyprowski , Bartlomiej Zolnierkiewicz >>> >>

Re: [PATCH v4] ARM: dts: exynos: Add nodes for True Random Number Generator

2017-12-12 Thread Krzysztof Kozlowski
On Tue, Dec 12, 2017 at 01:09:02PM +0100, Łukasz Stelmach wrote: > Add nodes for the True Random Number Generator found in Samsung Exynos > 5250+ SoCs. > > Signed-off-by: Łukasz Stelmach > --- > Changes since v3: > > - Rebased accroding to Krzysztof Kozłowski's request > > arch/arm/boot/dts/ex

Re: [PATCH v3 1/4] crypto: exynos - Support Exynos5250+ SoCs

2017-12-13 Thread Krzysztof Kozlowski
++-- > 2 files changed, 28 insertions(+), 3 deletions(-) Reviewed-by: Krzysztof Kozlowski Best regards, Krzysztof

Re: [PATCH v3 2/4] crypto: exynos - Improve performance of PRNG

2017-12-13 Thread Krzysztof Kozlowski
ice to mention some numbers here. Anyway it is fine with me: Reviewed-by: Krzysztof Kozlowski Best regards, Krzysztof > > Signed-off-by: Łukasz Stelmach > --- > drivers/crypto/exynos-rng.c | 31 ++- > 1 file changed, 2 insertions(+), 29 deletions(-) >

Re: [PATCH v3 3/4] crypto: exynos - Reseed PRNG after generating 2^16 random bytes

2017-12-13 Thread Krzysztof Kozlowski
t; Signed-off-by: Łukasz Stelmach > Reviewed-by: Stephan Mueller > --- > drivers/crypto/exynos-rng.c | 15 +++ > 1 file changed, 11 insertions(+), 4 deletions(-) > Reviewed-by: Krzysztof Kozlowski Best regards, Krzysztof

Re: [PATCH 07/14] hw_random: exynos: use __maybe_unused to hide pm functions

2016-03-02 Thread Krzysztof Kozlowski
rect #ifdef and instead uses a __maybe_unused > annotation to let the compiler know it can silently drop > the function definition. > > Signed-off-by: Arnd Bergmann > --- > drivers/char/hw_random/exynos-rng.c | 10 -- > 1 file changed, 4 insertions(+), 6 deletions(-)

[PATCH 1/2] crypto: s5p-sss - Minor coding cleanups

2016-03-06 Thread Krzysztof Kozlowski
Remove unneeded inclusion of delay.h and get rid of indentation from labels. Signed-off-by: Krzysztof Kozlowski --- drivers/crypto/s5p-sss.c | 15 +++ 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/drivers/crypto/s5p-sss.c b/drivers/crypto/s5p-sss.c index 5f161a9777e3

[PATCH 2/2] crypto: s5p-sss - Handle unaligned buffers

2016-03-06 Thread Krzysztof Kozlowski
space. Signed-off-by: Krzysztof Kozlowski --- drivers/crypto/s5p-sss.c | 149 +++ 1 file changed, 137 insertions(+), 12 deletions(-) diff --git a/drivers/crypto/s5p-sss.c b/drivers/crypto/s5p-sss.c index 60f835455a41..bac1f4593f98 100644 --- a/drivers

Re: [PATCH 2/2] crypto: s5p-sss - Handle unaligned buffers

2016-03-06 Thread Krzysztof Kozlowski
On 07.03.2016 10:28, Vladimir Zapolskiy wrote: > Hi Krzysztof, > > On 06.03.2016 12:17, Krzysztof Kozlowski wrote: >> During crypto selftests on Odroid XU3 (Exynos5422) some of the >> algorithms failed because of passing AES-block unaligned source and >> destinat

Re: [PATCH 1/2] crypto: s5p-sss - Minor coding cleanups

2016-03-06 Thread Krzysztof Kozlowski
On 07.03.2016 10:01, Vladimir Zapolskiy wrote: > Hi Krzysztof, > > On 06.03.2016 12:17, Krzysztof Kozlowski wrote: >> Remove unneeded inclusion of delay.h and get rid of indentation from >> labels. > > just in case are you aware of this discussion regarding goto

[PATCH v2 1/3] crypto: s5p-sss - Minor coding cleanups

2016-03-09 Thread Krzysztof Kozlowski
From: Krzysztof Kozlowski Remove unneeded inclusion of delay.h and get rid of indentation from labels. Signed-off-by: Krzysztof Kozlowski Acked-by: Vladimir Zapolskiy --- Changes since v1: 1. Add Vladimir's acked-by. --- drivers/crypto/s5p-sss.c | 15 +++ 1 file chang

[PATCH v2 3/3] crypto: s5p-sss - Sort the headers to improve readability

2016-03-09 Thread Krzysztof Kozlowski
Sort the headers alphabetically to improve readability and to spot duplications easier. Suggested-by: Vladimir Zapolskiy Signed-off-by: Krzysztof Kozlowski --- Changes since v1: 1. New patch. My email differs from one used in previous patches because this time I am sending this from work

[PATCH v2 2/3] crypto: s5p-sss - Handle unaligned buffers

2016-03-09 Thread Krzysztof Kozlowski
From: Krzysztof Kozlowski During crypto selftests on Odroid XU3 (Exynos5422) some of the algorithms failed because of passing AES-block unaligned source and destination buffers: alg: skcipher: encryption failed on chunk test 1 for ecb-aes-s5p: ret=22 Handle such case by copying the buffers to

[PATCH 1/5] hwrng: exynos - Hide PM functions with __maybe_unused

2016-03-10 Thread Krzysztof Kozlowski
/exynos-rng.c:171:12: warning: ‘exynos_rng_resume’ defined but not used [-Wunused-function] static int exynos_rng_resume(struct device *dev) Signed-off-by: Krzysztof Kozlowski --- drivers/char/hw_random/exynos-rng.c | 10 -- 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a

[PATCH 4/5] hwrng: exynos - Disable runtime PM on probe failure

2016-03-10 Thread Krzysztof Kozlowski
Add proper error path (for disabling runtime PM) when registering of hwrng fails. Fixes: b329669ea0b5 ("hwrng: exynos - Add support for Exynos random number generator") Signed-off-by: Krzysztof Kozlowski --- drivers/char/hw_random/exynos-rng.c | 7 ++- 1 file changed, 6 insert

[PATCH 3/5] hwrng: exynos - Fix unbalanced PM runtime put on timeout error path

2016-03-10 Thread Krzysztof Kozlowski
In case of timeout during read operation, the exit path lacked PM runtime put. This could lead to unbalanced runtime PM usage counter thus leaving the device in an active state. Fixes: d7fd6075a205 ("hwrng: exynos - Add timeout for waiting on init done") Cc: # v4.4+ Signed-off-by:

[PATCH 5/5] hwrng: exynos - Disable runtime PM on driver unbind

2016-03-10 Thread Krzysztof Kozlowski
Driver enabled runtime PM but did not revert this on removal. Re-binding of a device triggered warning: exynos-rng 10830400.rng: Unbalanced pm_runtime_enable! Fixes: b329669ea0b5 ("hwrng: exynos - Add support for Exynos random number generator") Signed-off-by: Krzysztof

[PATCH 2/5] hwrng: exynos - Runtime suspend device after init

2016-03-10 Thread Krzysztof Kozlowski
. However for this purpose autosuspend is enabled so it is safe to runtime put just after the initialization. Signed-off-by: Krzysztof Kozlowski --- drivers/char/hw_random/exynos-rng.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/char/hw_random/exynos-rng.c b/drivers

Re: [PATCH 1/5] hwrng: exynos - Hide PM functions with __maybe_unused

2016-03-11 Thread Krzysztof Kozlowski
2016-03-11 16:49 GMT+09:00 Krzysztof Kozlowski : > Replace ifdef with __maybe_unused to silence compiler warning on when > SUSPEND=n and PM=y: > > drivers/char/hw_random/exynos-rng.c:166:12: warning: ‘exynos_rng_suspend’ > defined but not used [-Wunused-function] > static int

Re: [PATCH 5/5] hwrng: exynos - Disable runtime PM on driver unbind

2016-03-11 Thread Krzysztof Kozlowski
W dniu 11.03.2016 o 16:49, Krzysztof Kozlowski pisze: > Driver enabled runtime PM but did not revert this on removal. Re-binding > of a device triggered warning: > exynos-rng 10830400.rng: Unbalanced pm_runtime_enable! > > Fixes: b329669ea0b5 ("hwrng: exynos - Add suppo

[PATCH v2 1/4] hwrng: exynos - Runtime suspend device after init

2016-03-13 Thread Krzysztof Kozlowski
. However for this purpose autosuspend is enabled so it is safe to runtime put just after the initialization. Signed-off-by: Krzysztof Kozlowski --- Changes since v1: 1. None. --- drivers/char/hw_random/exynos-rng.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/char

[PATCH v2 3/4] hwrng: exynos - Disable runtime PM on probe failure

2016-03-13 Thread Krzysztof Kozlowski
Add proper error path (for disabling runtime PM) when registering of hwrng fails. Fixes: b329669ea0b5 ("hwrng: exynos - Add support for Exynos random number generator") Signed-off-by: Krzysztof Kozlowski --- Changes since v1: 1. Call also pm_runtime_dont_use_autosuspend() to revert

[PATCH v2 2/4] hwrng: exynos - Fix unbalanced PM runtime put on timeout error path

2016-03-13 Thread Krzysztof Kozlowski
In case of timeout during read operation, the exit path lacked PM runtime put. This could lead to unbalanced runtime PM usage counter thus leaving the device in an active state. Fixes: d7fd6075a205 ("hwrng: exynos - Add timeout for waiting on init done") Cc: # v4.4+ Signed-off-by:

[PATCH v2 4/4] hwrng: exynos - Disable runtime PM on driver unbind

2016-03-13 Thread Krzysztof Kozlowski
Driver enabled runtime PM but did not revert this on removal. Re-binding of a device triggered warning: exynos-rng 10830400.rng: Unbalanced pm_runtime_enable! Fixes: b329669ea0b5 ("hwrng: exynos - Add support for Exynos random number generator") Signed-off-by: Krzysztof

[PATCH] hwrng: exynos - Enable COMPILE_TEST

2016-03-13 Thread Krzysztof Kozlowski
Get some build coverage of Exynos H/W random number generator driver. Driver uses devm_ioremap_resource() so add IOMEM dependency for the compile testing. Signed-off-by: Krzysztof Kozlowski --- Compile-tested on x86, x86_64, ppc64, arm, arm64 and mips. --- drivers/char/hw_random/Kconfig | 3

[PATCH] crypto: s5p-sss - Enable COMPILE_TEST

2016-03-13 Thread Krzysztof Kozlowski
Get some build coverage of S5P/Exynos AES H/W acceleration driver. Driver uses DMA and devm_ioremap_resource() so add DMA and IOMEM dependencies for the compile testing. Signed-off-by: Krzysztof Kozlowski --- Compile-tested on x86, x86_64, ppc64, arm, arm64 and mips. --- drivers/crypto

[PATCH v3 2/3] crypto: s5p-sss - Handle unaligned buffers

2016-03-21 Thread Krzysztof Kozlowski
From: Krzysztof Kozlowski During crypto selftests on Odroid XU3 (Exynos5422) some of the algorithms failed because of passing AES-block unaligned source and destination buffers: alg: skcipher: encryption failed on chunk test 1 for ecb-aes-s5p: ret=22 Handle such case by copying the buffers to

[PATCH v3 1/3] crypto: s5p-sss - Minor coding cleanups

2016-03-21 Thread Krzysztof Kozlowski
From: Krzysztof Kozlowski Remove unneeded inclusion of delay.h and get rid of indentation from labels. Signed-off-by: Krzysztof Kozlowski Acked-by: Vladimir Zapolskiy --- Changes since v2: 1. None. Changes since v1: 1. Add Vladimir's acked-by. --- drivers/crypto/s5p-sss.c

[PATCH v3 3/3] crypto: s5p-sss - Sort the headers to improve readability

2016-03-21 Thread Krzysztof Kozlowski
Sort the headers alphabetically to improve readability and to spot duplications easier. Suggested-by: Vladimir Zapolskiy Signed-off-by: Krzysztof Kozlowski Acked-by: Vladimir Zapolskiy --- Changes since v2: 1. Add Vladimir's acked-by. Changes since v1: 1. New patch. My email differs

[PATCH] hwrng: exynos - Fix misspelled Samsung address

2016-04-04 Thread Krzysztof Kozlowski
Correct smasung.com into samsung.com. Signed-off-by: Krzysztof Kozlowski --- drivers/char/hw_random/exynos-rng.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/char/hw_random/exynos-rng.c b/drivers/char/hw_random/exynos-rng.c index ada081232528..3443fdda44fa 100644

[PATCH 1/2] crypto: s5p-sss - Fix use after free of copied input buffer in error path

2016-04-19 Thread Krzysztof Kozlowski
freed by s5p_aes_complete(). Fixes: 9e4a1100a445 ("crypto: s5p-sss - Handle unaligned buffers") Signed-off-by: Krzysztof Kozlowski --- drivers/crypto/s5p-sss.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/crypto/s5p-sss.c b/drivers/crypto/s5p-sss.c index 4f6d5b3ec418..b0

[PATCH 2/2] crypto: s5p-sss - Remove useless hash interrupt handler

2016-04-19 Thread Krzysztof Kozlowski
fe to remove the hash interrupt related code and to not require the interrupt in Device Tree. Signed-off-by: Krzysztof Kozlowski --- .../devicetree/bindings/crypto/samsung-sss.txt | 6 ++-- drivers/crypto/s5p-sss.c | 34 -- 2 files chang

[PATCH 1/2] crypto: s5p-sss - Use common BIT macro

2016-04-22 Thread Krzysztof Kozlowski
The BIT() macro is obvious and well known, so prefer to use it instead of crafted own macro. Signed-off-by: Krzysztof Kozlowski --- drivers/crypto/s5p-sss.c | 95 1 file changed, 47 insertions(+), 48 deletions(-) diff --git a/drivers/crypto/s5p

[PATCH 2/2] crypto: s5p-sss - Fix missed interrupts when working with 8 kB blocks

2016-04-22 Thread Krzysztof Kozlowski
e) from [] (load_module+0x1a30/0x1d08) [] (load_module) from [] (SyS_finit_module+0x8c/0x98) [] (SyS_finit_module) from [] (ret_fast_syscall+0x0/0x3c) Fixes: a49e490c7a8a ("crypto: s5p-sss - add S5PV210 advanced crypto engine support") Cc: Signed-off-by: Krzysztof Kozlowski --- Issue was e

Re: [PATCH] crypto: s5p-sss: fix incorrect usage of scatterlists api

2016-04-26 Thread Krzysztof Kozlowski
5p-sss - add S5PV210 advanced crypto engine > support") > Fixes: 9e4a1100a445 ("crypto: s5p-sss - Handle unaligned buffers") > Cc: > Signed-off-by: Marek Szyprowski > --- > drivers/crypto/s5p-sss.c | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) Re

[PATCH] crypto: s5p-sss - Use consistent indentation for variables and members

2016-05-27 Thread Krzysztof Kozlowski
reversed-christmas-tree order with first variables being initialized ones. Signed-off-by: Krzysztof Kozlowski --- drivers/crypto/s5p-sss.c | 80 1 file changed, 40 insertions(+), 40 deletions(-) diff --git a/drivers/crypto/s5p-sss.c b/drivers

[PATCH stable 3.16+] crypto: s5p-sss - Fix missed interrupts when working with 8 kB blocks

2016-05-30 Thread Krzysztof Kozlowski
quot;) Cc: # 3.16+ Signed-off-by: Krzysztof Kozlowski Tested-by: Marek Szyprowski Signed-off-by: Herbert Xu [k.kozlowski: Backport to v3.16] --- Backporting to earlier kernels does not make much sense as the driver differs and the testing won't be possible probab

[PATCH 2/2] crypto: tcrypt: Fix linkage error on ARM on division of s64

2016-06-28 Thread Krzysztof Kozlowski
gcc 4.7.3 for ARM on Ubuntu couldn't link tcrypt module because of division of s64: ERROR: "__aeabi_ldivmod" [crypto/tcrypt.ko] undefined! Fixes: 087bcd225c56 ("crypto: tcrypt - Add speed tests for SHA multibuffer algorithms") Signed-off-by: Krzysztof Kozlowski

[PATCH 1/2] crypto: tcrypt: Fix mixing printk/pr_err and obvious indentation issues

2016-06-28 Thread Krzysztof Kozlowski
first argument; Signed-off-by: Krzysztof Kozlowski --- crypto/tcrypt.c | 33 ++--- 1 file changed, 14 insertions(+), 19 deletions(-) diff --git a/crypto/tcrypt.c b/crypto/tcrypt.c index 6ef78157a0ab..3788a607921e 100644 --- a/crypto/tcrypt.c +++ b/crypto/tcrypt.c @@

Re: [PATCH 2/2] crypto: tcrypt: Fix linkage error on ARM on division of s64

2016-06-28 Thread Krzysztof Kozlowski
On 06/28/2016 10:41 AM, Herbert Xu wrote: > On Tue, Jun 28, 2016 at 09:23:07AM +0200, Krzysztof Kozlowski wrote: >> gcc 4.7.3 for ARM on Ubuntu couldn't link tcrypt module because of >> division of s64: >> ERROR: "__aeabi_ldivmod" [crypto/tcrypt.ko]

Re: crypto: tcrypt - Fix memory leaks/crashes in multibuffer hash speed test

2016-06-28 Thread Krzysztof Kozlowski
On Tue, Jun 28, 2016 at 11:55 AM, Herbert Xu wrote: > This patch resolves a number of issues with the mb speed test > function: > > * The tfm is never freed. > * Memory is allocated even when we're not using mb. > * When an error occurs we don't wait for completion for other requests. > * When an

Re: [PATCH v2] crypto: tcrypt - Fix memory leaks/crashes in multibuffer hash speed test

2016-06-29 Thread Krzysztof Kozlowski
On 06/28/2016 02:33 PM, Herbert Xu wrote: > On Tue, Jun 28, 2016 at 12:15:43PM +0200, Krzysztof Kozlowski wrote: >> Oops: > > Thanks, there was a typo where it said k instead of j in the second > loop. > > ---8<--- > This patch resolves a number of issues wit

Re: [PATCH v2] crypto: tcrypt - Fix memory leaks/crashes in multibuffer hash speed test

2016-06-29 Thread Krzysztof Kozlowski
On 06/29/2016 10:19 AM, Herbert Xu wrote: > On Wed, Jun 29, 2016 at 10:16:10AM +0200, Krzysztof Kozlowski wrote: >> >> Seems to work fine except: >> 1. The updates are always 1. > > Yes the test function only does digest so it's always one update. > >> 2.

[PATCH] crypto: Drop owner assignment from platform_driver

2015-07-09 Thread Krzysztof Kozlowski
platform_driver does not need to set an owner because platform_driver_register() will set it. Signed-off-by: Krzysztof Kozlowski --- The coccinelle script which generated the patch was sent here: http://www.spinics.net/lists/kernel/msg2029903.html --- drivers/crypto/marvell/cesa.c | 1 - 1

Re: Issues with HW RNG / SSS on Exynos 5422

2015-08-16 Thread Krzysztof Kozlowski
2015-08-16 20:18 GMT+09:00 Heiner Kallweit : > Am 15.08.2015 um 13:19 schrieb Heiner Kallweit: >> I'm having issues making the hardware RNG work on a Samsung Exynos 5422 >> (Odroid XU4) with kernel 4.2rc6. >> No random number generation is started if I write the appropriate value >> (0x18) to the

Re: Issues with HW RNG / SSS on Exynos 5422

2015-08-16 Thread Krzysztof Kozlowski
On 17.08.2015 15:10, Heiner Kallweit wrote: > Am 17.08.2015 um 02:19 schrieb Krzysztof Kozlowski: >> 2015-08-16 20:18 GMT+09:00 Heiner Kallweit : >>> Am 15.08.2015 um 13:19 schrieb Heiner Kallweit: >>>> I'm having issues making the hardware RNG work on a Samsung

Re: Issues with HW RNG / SSS on Exynos 5422

2015-08-17 Thread Krzysztof Kozlowski
On 18.08.2015 15:02, Heiner Kallweit wrote: > Am 17.08.2015 um 08:30 schrieb Krzysztof Kozlowski: >> On 17.08.2015 15:10, Heiner Kallweit wrote: >>> Am 17.08.2015 um 02:19 schrieb Krzysztof Kozlowski: >>>> 2015-08-16 20:18 GMT+09:00 Heiner Kallweit : >>>&

Re: Issues with HW RNG / SSS on Exynos 5422

2015-08-23 Thread Krzysztof Kozlowski
2015-08-16 20:18 GMT+09:00 Heiner Kallweit : > Am 15.08.2015 um 13:19 schrieb Heiner Kallweit: >> I'm having issues making the hardware RNG work on a Samsung Exynos 5422 >> (Odroid XU4) with kernel 4.2rc6. >> No random number generation is started if I write the appropriate value >> (0x18) to the

Re: [PATCH] hwrng: exynos - Fix unbalanced PM runtime get/puts

2015-10-18 Thread Krzysztof Kozlowski
s way. > > Signed-off-by: Daniel Thompson > Cc: Kukjin Kim > Cc: Krzysztof Kozlowski > --- > > Notes: > Compile tested only (CONFIG_PM=y, CONFIG_HW_RANDOM_EXYNOS=m); I spotted > this whilst reviewing the code and don't have an exynos platform to > t

  1   2   3   >