Re: [PATCH 06/61] crypto: simplify getting .drvdata

2018-04-20 Thread Krzysztof Kozlowski
; > --- > > Build tested only. buildbot is happy. Please apply individually. > > drivers/crypto/exynos-rng.c | 6 ++ > drivers/crypto/picoxcell_crypto.c | 6 ++ > 2 files changed, 4 insertions(+), 8 deletions(-) Reviewed-by: Krzysztof Kozlowski <k...@kernel.org> Best regards, Krzysztof

[PATCH 2/4] crypto: omap-sham - Fix misleading indentation

2018-03-01 Thread Krzysztof Kozlowski
ch warning: drivers/crypto/omap-sham.c:1761 omap_sham_done_task() warn: inconsistent indenting Signed-off-by: Krzysztof Kozlowski <k...@kernel.org> --- drivers/crypto/omap-sham.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/crypto/omap-sham.c b/drivers/crypto/o

[PATCH 4/4] crypto: s5p-sss - Constify pointed data (arguments and local variables)

2018-03-01 Thread Krzysztof Kozlowski
arrays. Signed-off-by: Krzysztof Kozlowski <k...@kernel.org> --- drivers/crypto/s5p-sss.c | 31 +-- 1 file changed, 17 insertions(+), 14 deletions(-) diff --git a/drivers/crypto/s5p-sss.c b/drivers/crypto/s5p-sss.c index d7c8163e5068..bf7163042569 100644 --- a/d

[PATCH 3/4] crypto: s5p-sss: Remove useless check for non-null request

2018-03-01 Thread Krzysztof Kozlowski
' (see line 1208) Signed-off-by: Krzysztof Kozlowski <k...@kernel.org> --- drivers/crypto/s5p-sss.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/crypto/s5p-sss.c b/drivers/crypto/s5p-sss.c index 5d64c08b7f47..d7c8163e5068 100644 --- a/drivers/crypto/s5p-sss.c +++ b/drivers/cryp

[PATCH 1/4] crypto: omap-sham: Remove useless check for non-null request

2018-03-01 Thread Krzysztof Kozlowski
' (see line 805) Signed-off-by: Krzysztof Kozlowski <k...@kernel.org> --- drivers/crypto/omap-sham.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/crypto/omap-sham.c b/drivers/crypto/omap-sham.c index 86b89ace836f..7650b1b449bb 100644 --- a/drivers/crypto/omap-sham.c +++ b/d

Re: [PATCH] crypto: s5p-sss.c: Fix kernel Oops in AES-ECB mode

2018-02-06 Thread Krzysztof Kozlowski
vice Tree) > [ 2078.715932] PC is at memcpy+0x80/0x330 > [ 2078.719652] LR is at s5p_tasklet_cb+0x19c/0x328 > > drivers/crypto/s5p-sss.c | 12 +--- > 1 file changed, 9 insertions(+), 3 deletions(-) Fixes and cc-stable? Reviewed-by: Krzysztof Kozlowski <k...@kernel.org> Best regards, Krzysztof

Re: Odroid HC1 cryptsetup:encrypt sata driver

2018-01-24 Thread Krzysztof Kozlowski
On Wed, Jan 24, 2018 at 2:04 PM, Anand Moon wrote: > Hi Kamil Konieczny, > > I am looking in setup of encrypted sata hard-disk on Odroid XU4/HC1 device. > using following encryption method. > > aes-cbc-essiv:sha256 128 > aes-cbc-essiv:sha256 256 > > Here is my defconfig I

Re: [PATCH][next] hwrng: exynos: check for -ve error return from readl_poll_timeout

2018-01-15 Thread Krzysztof Kozlowski
On Fri, Jan 12, 2018 at 5:30 PM, Colin King wrote: > From: Colin Ian King > > Currently, the return from readl_poll_timeout is being assigned to > a u32 and this is being checked for a -ve return which is always > false since a u32 cannot be

Re: [PATCH -next] hwrng: exynos - remove redundant dev_err call in exynos_trng_probe()

2018-01-10 Thread Krzysztof Kozlowski
--- > drivers/char/hw_random/exynos-trng.c | 4 +--- > 1 file changed, 1 insertion(+), 3 deletions(-) Reviewed-by: Krzysztof Kozlowski <k...@kernel.org> Best regards, Krzysztof

Re: [PATCH] hwrng: exynos - Signedness bug in exynos_trng_do_read()

2018-01-10 Thread Krzysztof Kozlowski
int exynos_trng_do_read(struct hwrng *rng, void > *data, size_t max, >bool wait) > { > struct exynos_trng_dev *trng; > - u32 val; > + int val; It seems that one forgot to run Smatch on the driver :). Reviewed-by: Krzysztof Kozlowski <k...@kernel.org> Best regards, Krzysztof

[PATCH 1/2] crypto: exynos-rng - Add SPDX license identifier and correct module license

2018-01-09 Thread Krzysztof Kozlowski
or later. GPL-2.0 was intended by author so fix up this mess. Signed-off-by: Krzysztof Kozlowski <k...@kernel.org> --- drivers/crypto/exynos-rng.c | 12 ++-- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/drivers/crypto/exynos-rng.c b/drivers/crypto/exynos-rng.c

[PATCH 2/2] crypto: s5p-sss - Add SPDX license identifier

2018-01-09 Thread Krzysztof Kozlowski
Replace GPL license statement with SPDX GPL-2.0 license identifier. Signed-off-by: Krzysztof Kozlowski <k...@kernel.org> --- drivers/crypto/s5p-sss.c | 24 ++-- 1 file changed, 10 insertions(+), 14 deletions(-) diff --git a/drivers/crypto/s5p-sss.c b/drivers/crypto/s5p

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

2017-12-13 Thread Krzysztof Kozlowski
be > generated. > > Signed-off-by: Łukasz Stelmach <l.stelm...@samsung.com> > Reviewed-by: Stephan Mueller <smuel...@chronox.de> > --- > drivers/crypto/exynos-rng.c | 15 +++ > 1 file changed, 11 insertions(+), 4 deletions(-) > Reviewed-by: Krzysztof Kozlowski <k...@kernel.org> Best regards, Krzysztof

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

2017-12-13 Thread Krzysztof Kozlowski
performance. If so it would be nice to mention some numbers here. Anyway it is fine with me: Reviewed-by: Krzysztof Kozlowski <k...@kernel.org> Best regards, Krzysztof > > Signed-off-by: Łukasz Stelmach <l.stelm...@samsung.com> > --- > drivers/crypto/exynos-rng.c | 31 ++---

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

2017-12-13 Thread Krzysztof Kozlowski
; drivers/crypto/exynos-rng.c| 27 > -- > 2 files changed, 28 insertions(+), 3 deletions(-) Reviewed-by: Krzysztof Kozlowski <k...@kernel.org> Best regards, Krzysztof

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 >

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 <l.stelm...@samsung.com> wrote: > It was <2017-12-11 pon 16:03>, when Krzysztof Kozlowski wrote: >> On Mon, Dec 11, 2017 at 3:06 PM, Łukasz Stelmach <l.stelm...@samsung.com> >> wrote: >>> Cc: Marek Szyprow

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 <l.stelm...@samsung.com> 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 fo

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 + >

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

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 >

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 >

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 >

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 <l.stelm...@samsung.com> wrote: > It was <2017-12-06 śro 15:05>, when Krzysztof Kozlowski wrote: >> On Wed, Dec 6, 2017 at 2:42 PM, Łukasz Stelmach <l.stelm...@samsung.com> >> wrote: >>> It was <2017-12-

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 <l.stelm...@samsung.com> wrote: > It was <2017-12-05 wto 14:34>, when Krzysztof Kozlowski wrote: >> On Tue, Dec 5, 2017 at 1:35 PM, Łukasz Stelmach <l.stelm...@samsung.com> >> wrote: >>> Add support for PR

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 <l.stelm...@samsung.com> wrote: > It was <2017-12-05 wto 19:06>, when Krzysztof Kozlowski wrote: >> On Tue, Dec 5, 2017 at 6:53 PM, Krzysztof Kozlowski <k...@kernel.org> wrote: >>> On Tue, Dec 05, 2017 at 05:

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 <k...@kernel.org> 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

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

2017-12-05 Thread Krzysztof Kozlowski
gt; 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 <k...@kernel.org> Best regards, Krzysztof

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

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

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

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 <l.stelm...@samsung.com> wrote: > It was <2017-12-04 pon 14:13>, when Krzysztof Kozlowski wrote: >> On Mon, Dec 4, 2017 at 1:53 PM, Łukasz Stelmach <l.stelm...@samsung.com> >> wrote: >>> Add bindin

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

2017-12-04 Thread Krzysztof Kozlowski
| 7 + > drivers/char/hw_random/Kconfig | 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/ex

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

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 + >

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 <l.stelm...@samsung.com> wrote: > Add binding documentation for the True Random Number Generator > found on Samsung Exynos 5250+ SoCs. > > Acked-by: Rob Herring <r...@kernel.org> > Reviewed-by: Krzysztof Kozlowski <

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 <smuel...@chronox.de> 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 >&g

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 <l.stelm...@samsung.com> wrote: > It was <2017-11-23 czw 17:31>, when Krzysztof Kozlowski wrote: >> On Thu, Nov 23, 2017 at 4:09 PM, Łukasz Stelmach <l.stelm...@samsung.com> >> wrote: >>> Add supp

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 + >

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 + >

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

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

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 <dan.carpen...@oracle.com> wrote: > This code seems correct, but the goto was indented too far. > > Signed-off-by: Dan Carpenter <dan.carpen...@oracle.com> > > diff --git a/drivers/crypto/s5p-sss.c b/drivers/crypto/s5p-ss

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

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

2017-10-19 Thread Krzysztof Kozlowski
@partner.samsung.com> > --- > drivers/crypto/Kconfig | 14 + > drivers/crypto/s5p-sss.c | 1407 > +++++- > 2 files changed, 1411 insertions(+), 10 deletions(-) Reviewed-by: Krzysztof Kozlowski <k...@kernel.org> Best regards, Krzysztof

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

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 <k.koniec...@partner.samsung.com> > --- > version 5: >

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 <k.koniec...@partner.samsung.com> > --- > version 4: > - fix

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 =

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 <k.koniec...@partner.samsung.com> > --- > version 3: >

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 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-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 <k.koniec...@partner.samsung.com> > --- > version 2: > - ch

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 <k...@kernel.org> wrote: > On Wed, Sep 13, 2017 at 4:24 PM, Kamil Konieczny > <k.koniec...@partner.samsung.com> wrote: >> Hi Krzysztof, >> >> On 13.09.2017 15:18, Krzysztof Kozlowski wrote: >>> On

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

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 <k...@kernel.org> wrote: > > On Wed, Aug 23, 2017 at 08:34:43PM +0530, PrasannaKumar Muralidharan wrote: > >> Samsung exyn

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

2017-08-23 Thread Krzysztof Kozlowski
nged, 1 insertion(+), 1 deletion(-) > 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 <k...@kernel.org> Best regards, Krzysztof

Re: [PATCH] crypto: exynoes-rng: Set cra_ctxsize to 0

2017-05-21 Thread Krzysztof Kozlowski
On Mon, May 22, 2017 at 5:44 AM, PrasannaKumar Muralidharan wrote: >>> I do not have access to the hardware, did not test the change. Sorry I >>> forgot to mention that. >> >> That is quite important... By default everything must be tested so if >> you are skipping

Re: [PATCH] crypto: exynoes-rng: Set cra_ctxsize to 0

2017-05-21 Thread Krzysztof Kozlowski
On Sun, May 21, 2017 at 9:11 AM, PrasannaKumar Muralidharan <prasannatsmku...@gmail.com> wrote: > Hi Krzysztof > > On 21 May 2017 at 11:56, Krzysztof Kozlowski <k...@kernel.org> wrote: >> On Sun, May 21, 2017 at 8:09 AM, PrasannaKumar Muralidharan >> &

Re: [PATCH] crypto: exynoes-rng: Set cra_ctxsize to 0

2017-05-21 Thread Krzysztof Kozlowski
On Sun, May 21, 2017 at 8:09 AM, PrasannaKumar Muralidharan wrote: > As cra_ctxsize is set but the allocated space is not used, set it 0. Why do you think it is not used? Did you test our change on hardware? Best regards, Krzysztof > > Signed-off-by: PrasannaKumar

[PATCH v5 1/2] linux/kernel.h: Add ALIGN_DOWN macro

2017-04-11 Thread Krzysztof Kozlowski
Few parts of kernel define their own macro for aligning down so provide a common define for this, with the same usage and assumptions as existing ALIGN. Convert also three existing implementations to this one. Signed-off-by: Krzysztof Kozlowski <k...@kernel.org> --- The metag

[PATCH v5 0/2] crypto: hw_random - Add new Exynos RNG driver

2017-04-11 Thread Krzysztof Kozlowski
dule. Tested with app [2]. Patches are independent. I will take the defconfig changes (2/3 and 3/3) through samsung-soc tree. Best regards, Krzysztof [1] https://www.spinics.net/lists/arm-kernel/msg569641.html [2] https://www.spinics.net/lists/arm-kernel/msg571184.html Krzysztof Kozlowski (2): l

[PATCH v5 2/2] crypto: hw_random - Add new Exynos RNG driver

2017-04-11 Thread Krzysztof Kozlowski
. This is preferred approach because using runtime PM just to toggle clock is huge overhead. Another difference is reseeding itself with generated random data periodically and during resuming from system suspend (previously driver was re-seeding itself again with jiffies). Signed-off-by: Krzysztof Kozlowski &l

Re: [PATCH v4 2/2] crypto: hw_random - Add new Exynos RNG driver

2017-04-11 Thread Krzysztof Kozlowski
On Mon, Apr 10, 2017 at 12:55 PM, Herbert Xu <herb...@gondor.apana.org.au> wrote: > On Sat, Apr 08, 2017 at 03:32:45PM +0200, Krzysztof Kozlowski wrote: >> >> +static struct rng_alg exynos_rng_alg = { >> + .generate = exynos_r

[PATCH v4 2/2] crypto: hw_random - Add new Exynos RNG driver

2017-04-08 Thread Krzysztof Kozlowski
. This is preferred approach because using runtime PM just to toggle clock is huge overhead. Another difference is reseeding itself with generated random data periodically and during resuming from system suspend (previously driver was re-seeding itself again with jiffies). Signed-off-by: Krzysztof Kozlowski &l

[PATCH v4 0/2] crypto: hw_random - Add new Exynos RNG driver

2017-04-08 Thread Krzysztof Kozlowski
[1] https://www.spinics.net/lists/arm-kernel/msg569641.html [2] https://www.spinics.net/lists/arm-kernel/msg571184.html Krzysztof Kozlowski (2): linux/kernel.h: Add ALIGN_DOWN macro crypto: hw_random - Add new Exynos RNG driver MAINTAINERS | 8 + arch/metag/ker

[PATCH v4 1/2] linux/kernel.h: Add ALIGN_DOWN macro

2017-04-08 Thread Krzysztof Kozlowski
Few parts of kernel define their own macro for aligning down so provide a common define for this, with the same usage and assumptions as existing ALIGN. Convert also three existing implementations to this one. Signed-off-by: Krzysztof Kozlowski <k...@kernel.org> --- The metag

Re: [PATCH v3 1/3] crypto: hw_random - Add new Exynos RNG driver

2017-03-28 Thread Krzysztof Kozlowski
On Tue, Mar 28, 2017 at 07:41:47PM +0200, Stephan Müller wrote: > Am Dienstag, 28. März 2017, 18:48:24 CEST schrieb Krzysztof Kozlowski: > > Hi Krzysztof, > > > I tested a little bit and: > > 1. Seeding with some value > > 2. generating random, > > 3. kcapi_

Re: [PATCH v3 1/3] crypto: hw_random - Add new Exynos RNG driver

2017-03-28 Thread Krzysztof Kozlowski
On Mon, Mar 27, 2017 at 03:53:03PM +0200, Stephan Müller wrote: > Am Montag, 27. März 2017, 06:23:11 CEST schrieb PrasannaKumar Muralidharan: > > Hi PrasannaKumar, > > > > Oh my, if you are right with your first guess, this is a bad DRNG design. > > > > > > Just out of curiousity: what happens

Re: [PATCH v3 1/3] crypto: hw_random - Add new Exynos RNG driver

2017-03-26 Thread Krzysztof Kozlowski
On Sun, Mar 26, 2017 at 07:05:48PM +0200, Stephan Müller wrote: > Am Sonntag, 26. März 2017, 18:46:02 CEST schrieb PrasannaKumar Muralidharan: > > HiKrzysztof, > > > >> > + if (slen < EXYNOS_RNG_SEED_SIZE) { > > >> > + dev_warn(rng->dev, "Seed too short (only %u

Re: [PATCH v3 1/3] crypto: hw_random - Add new Exynos RNG driver

2017-03-26 Thread Krzysztof Kozlowski
On Sun, Mar 26, 2017 at 07:11:28PM +0200, Stephan Müller wrote: > Am Samstag, 25. März 2017, 17:26:52 CEST schrieb Krzysztof Kozlowski: > > +static int exynos_rng_set_seed(struct exynos_rng_dev *rng, > > + const u8 *seed, unsigned int slen) > &g

Re: [PATCH v3 1/3] crypto: hw_random - Add new Exynos RNG driver

2017-03-26 Thread Krzysztof Kozlowski
On Sun, Mar 26, 2017 at 08:50:42PM +0530, PrasannaKumar Muralidharan wrote: > .Have some minor comments. Please feel free to correct if I am wrong. > > On 25 March 2017 at 21:56, Krzysztof Kozlowski <k...@kernel.org> wrote: > > Replace existing hw_ranndom/exynos-rng driver

[PATCH v3 2/3] ARM: exynos_defconfig: Enable Exynos RNG and user-space crypto API

2017-03-25 Thread Krzysztof Kozlowski
Enable the new Exynos pseudo random number generator driver and user-space API to access crypto algorithms and devices (not only RNG). Signed-off-by: Krzysztof Kozlowski <k...@kernel.org> --- arch/arm/configs/exynos_defconfig | 6 ++ 1 file changed, 6 insertions(+) diff --git a/ar

[PATCH v3 0/3] crypto: hw_random - Add new Exynos RNG driver

2017-03-25 Thread Krzysztof Kozlowski
/lists/arm-kernel/msg571184.html Krzysztof Kozlowski (3): crypto: hw_random - Add new Exynos RNG driver ARM: exynos_defconfig: Enable Exynos RNG and user-space crypto API ARM: multi_v7_defconfig: Enable Exynos RNG and user-space crypto API MAINTAINERS | 8 + arch

[PATCH v3 1/3] crypto: hw_random - Add new Exynos RNG driver

2017-03-25 Thread Krzysztof Kozlowski
using runtime PM just to toggle clock is huge overhead. Another difference is reseeding itself with generated random data periodically and during resuming from system suspend (previously driver was re-seeding itself again with jiffies). Signed-off-by: Krzysztof Kozlowski <k...@kernel.

[PATCH v3 3/3] ARM: multi_v7_defconfig: Enable Exynos RNG and user-space crypto API

2017-03-25 Thread Krzysztof Kozlowski
Enable the new Exynos pseudo random number generator driver and user-space API to access crypto algorithms and devices (not only RNG). Signed-off-by: Krzysztof Kozlowski <k...@kernel.org> --- arch/arm/configs/multi_v7_defconfig | 6 ++ 1 file changed, 6 insertions(+) diff --git a/ar

Re: [PATCH v2 1/3] crypto: hw_random - Add new Exynos RNG driver

2017-03-25 Thread Krzysztof Kozlowski
On Fri, Mar 24, 2017 at 09:41:59PM +0100, Stephan Müller wrote: > Am Freitag, 24. März 2017, 19:26:04 CET schrieb Krzysztof Kozlowski: > > Hi Krzysztof, > > > +static unsigned int exynos_rng_copy_random(struct exynos_rng_dev *rng, > > +

[PATCH v2 3/3] ARM: multi_v7_defconfig: Enable Exynos RNG and user-space crypto API

2017-03-24 Thread Krzysztof Kozlowski
Enable the new Exynos pseudo random number generator driver and user-space API to access crypto algorithms and devices (not only RNG). Signed-off-by: Krzysztof Kozlowski <k...@kernel.org> --- arch/arm/configs/multi_v7_defconfig | 6 ++ 1 file changed, 6 insertions(+) diff --git a/ar

[PATCH v2 1/3] crypto: hw_random - Add new Exynos RNG driver

2017-03-24 Thread Krzysztof Kozlowski
using runtime PM just to toggle clock is huge overhead. Another difference is reseeding itself with generated random data periodically and during resuming from system suspend (previously driver was re-seeding itself again with jiffies). Signed-off-by: Krzysztof Kozlowski <k...@kernel.

[PATCH v2 2/3] ARM: exynos_defconfig: Enable Exynos RNG and user-space crypto API

2017-03-24 Thread Krzysztof Kozlowski
Enable the new Exynos pseudo random number generator driver and user-space API to access crypto algorithms and devices (not only RNG). Signed-off-by: Krzysztof Kozlowski <k...@kernel.org> --- arch/arm/configs/exynos_defconfig | 6 ++ 1 file changed, 6 insertions(+) diff --git a/ar

[PATCH v2 0/3] crypto: hw_random - Add new Exynos RNG driver

2017-03-24 Thread Krzysztof Kozlowski
/lists/arm-kernel/msg571184.html Krzysztof Kozlowski (3): crypto: hw_random - Add new Exynos RNG driver ARM: exynos_defconfig: Enable Exynos RNG and user-space crypto API ARM: multi_v7_defconfig: Enable Exynos RNG and user-space crypto API MAINTAINERS | 8 + arch/arm

Re: [PATCH 1/3] crypto: hw_random - Add new Exynos RNG driver

2017-03-24 Thread Krzysztof Kozlowski
On Fri, Mar 24, 2017 at 05:45:41PM +0100, Bartlomiej Zolnierkiewicz wrote: > > > > And I think the probe might be called twice, for example in case of > > > > mistake in DTB. > > > > > > Even if this is possible resource allocation code in the driver will > > > take take care of handling it just

Re: [PATCH 1/3] crypto: hw_random - Add new Exynos RNG driver

2017-03-24 Thread Krzysztof Kozlowski
On Fri, Mar 24, 2017 at 05:11:25PM +0100, Bartlomiej Zolnierkiewicz wrote: > On Friday, March 24, 2017 06:46:00 PM Krzysztof Kozlowski wrote: > > I really do not like global or file-scope variables. I do not like > > drivers using them. Actually I hate them. > > > > Fr

Re: [PATCH 1/3] crypto: hw_random - Add new Exynos RNG driver

2017-03-24 Thread Krzysztof Kozlowski
On Fri, Mar 24, 2017 at 04:26:47PM +0100, Bartlomiej Zolnierkiewicz wrote: > > Hi, > > Firstly, thanks for working on this. > > The patch looks fine overall for me, some review comments below. > > On Friday, March 24, 2017 05:24:44 PM Krzysztof Kozlowski wrote: > &g

Re: [PATCH 1/3] crypto: hw_random - Add new Exynos RNG driver

2017-03-24 Thread Krzysztof Kozlowski
On Fri, Mar 24, 2017 at 03:55:22PM +0100, Stephan Müller wrote: > Am Freitag, 24. März 2017, 15:51:56 CET schrieb Krzysztof Kozlowski: > > Hi Krzysztof, > > > > I'll use the generated random numbers. > > If you do that, may I propse that you update this seed

Re: [PATCH 1/3] crypto: hw_random - Add new Exynos RNG driver

2017-03-24 Thread Krzysztof Kozlowski
On Fri, Mar 24, 2017 at 03:46:44PM +0100, Stephan Müller wrote: > Am Freitag, 24. März 2017, 15:43:48 CET schrieb Krzysztof Kozlowski: > > Hi Krzysztof, > > > On Fri, Mar 24, 2017 at 03:37:59PM +0100, Stephan Müller wrote: > > > Am Freitag, 24. März 2017, 15:24:44 CET

Re: [PATCH 1/3] crypto: hw_random - Add new Exynos RNG driver

2017-03-24 Thread Krzysztof Kozlowski
On Fri, Mar 24, 2017 at 03:37:59PM +0100, Stephan Müller wrote: > Am Freitag, 24. März 2017, 15:24:44 CET schrieb Krzysztof Kozlowski: > > Hi Krzysztof, > > > + > > +static int exynos_rng_set_seed(struct exynos_rng_dev *rng, > > + con

[PATCH 3/3] ARM: multi_v7_defconfig: Enable Exynos RNG and user-space crypto API

2017-03-24 Thread Krzysztof Kozlowski
Enable the new Exynos pseudo random number generator driver and user-space API to access crypto algorithms and devices (not only RNG). Signed-off-by: Krzysztof Kozlowski <k...@kernel.org> --- arch/arm/configs/multi_v7_defconfig | 6 ++ 1 file changed, 6 insertions(+) diff --git a/ar

[PATCH 2/3] ARM: exynos_defconfig: Enable Exynos RNG and user-space crypto API

2017-03-24 Thread Krzysztof Kozlowski
Enable the new Exynos pseudo random number generator driver and user-space API to access crypto algorithms and devices (not only RNG). Signed-off-by: Krzysztof Kozlowski <k...@kernel.org> --- arch/arm/configs/exynos_defconfig | 6 ++ 1 file changed, 6 insertions(+) diff --git a/ar

[PATCH 1/3] crypto: hw_random - Add new Exynos RNG driver

2017-03-24 Thread Krzysztof Kozlowski
using runtime PM just to toggle clock is huge overhead. Another difference is using the same seed after resuming from system suspend (previously driver was re-seeding itself again with jiffies). Signed-off-by: Krzysztof Kozlowski <k...@kernel.org> --- MAINTAINERS

[PATCH 0/3] crypto: hw_random - Add new Exynos RNG driver

2017-03-24 Thread Krzysztof Kozlowski
with app [2]. Patches are independent. I will take the defconfig changes (2/3 and 3/3) through samsung-soc tree. Best regards, Krzysztof [1] https://www.spinics.net/lists/arm-kernel/msg569641.html [2] https://www.spinics.net/lists/arm-kernel/msg571184.html Krzysztof Kozlowski (3): crypto

Re: Question - seeding the hw pseudo random number generator

2017-03-20 Thread Krzysztof Kozlowski
On Mon, Mar 20, 2017 at 09:28:58PM +0800, Herbert Xu wrote: > On Mon, Mar 20, 2017 at 12:19:32PM +0530, PrasannaKumar Muralidharan wrote: > > > > AF_ALG interface for rng does have seeding support. I think hw_random > > does not provide seeding support intentionally as I understand that > > True

Question - seeding the hw pseudo random number generator

2017-03-18 Thread Krzysztof Kozlowski
Hi, I looked at Exynos Pseudo Random Nubmer Generator driver (drivers/char/hw_random/exynos-rng.c) and noticed that it always seeds the device with jiffies. Then I looked at few other drivers and found that they do not seed themself (or at least I couldn't find this). I think the hw_random API

Re: [PATCH 4/4] crypto: s5p-sss - Use mutex instead of spinlock

2017-03-17 Thread Krzysztof Kozlowski
On Fri, Mar 17, 2017 at 06:28:29PM +0100, Bartlomiej Zolnierkiewicz wrote: > > Hi, > > On Friday, March 17, 2017 04:49:22 PM Krzysztof Kozlowski wrote: > > Driver uses threaded interrupt handler so there is no real need for > > using spinlocks for synchronization

[PATCH 2/4] crypto: s5p-sss - Remove unused variant field from state container

2017-03-17 Thread Krzysztof Kozlowski
The driver uses type of device (variant) only during probe so there is no need to store it for later. Signed-off-by: Krzysztof Kozlowski <k...@kernel.org> --- drivers/crypto/s5p-sss.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/crypto/s5p-sss.c b/drivers/crypto/s5p-sss.c

[PATCH 1/4] crypto: s5p-sss - Close possible race for completed requests

2017-03-17 Thread Krzysztof Kozlowski
s - Fix spinlock recursion on LRW(AES)") Signed-off-by: Krzysztof Kozlowski <k...@kernel.org> --- drivers/crypto/s5p-sss.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/crypto/s5p-sss.c b/drivers/crypto/s5p-sss.c index 1b9da3dc799b..6c620487e9c2 100644

[PATCH 0/4] crypto: s5p-sss - Fix and minor improvements

2017-03-17 Thread Krzysztof Kozlowski
Krzysztof Kozlowski (4): crypto: s5p-sss - Close possible race for completed requests crypto: s5p-sss - Remove unused variant field from state container crypto: s5p-sss - Document the struct s5p_aes_dev crypto: s5p-sss - Use mutex instead of spinlock drivers/crypto/s5p-sss.c | 70

[PATCH 4/4] crypto: s5p-sss - Use mutex instead of spinlock

2017-03-17 Thread Krzysztof Kozlowski
Driver uses threaded interrupt handler so there is no real need for using spinlocks for synchronization. Mutexes would do fine and are friendlier for overall system preemptivness and real-time behavior. Signed-off-by: Krzysztof Kozlowski <k...@kernel.org> --- drivers/crypto/s5p-sss.

[PATCH 3/4] crypto: s5p-sss - Document the struct s5p_aes_dev

2017-03-17 Thread Krzysztof Kozlowski
Add kernel-doc to s5p_aes_dev structure. Signed-off-by: Krzysztof Kozlowski <k...@kernel.org> --- drivers/crypto/s5p-sss.c | 27 ++- 1 file changed, 26 insertions(+), 1 deletion(-) diff --git a/drivers/crypto/s5p-sss.c b/drivers/crypto/s5p-sss.c index 35ea84

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

2017-03-13 Thread Krzysztof Kozlowski
On Sun, Mar 12, 2017 at 09:13:22PM +0200, Krzysztof Kozlowski wrote: > On Fri, Mar 10, 2017 at 03:44:45PM -0600, Nathan Royce wrote: > > Sure, I went ahead and rebuilt it just using the bare exynos_defconfig > > and adding XTS and ECB and no other changes. > > > > No

  1   2   >