Re: Issues with HW RNG / SSS on Exynos 5422

2015-08-18 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 hkallwe...@gmail.com: Am 15.08.2015 um 13:19 schrieb

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 hkallwe...@gmail.com: 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

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 hkallwe...@gmail.com: 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

Re: Issues with HW RNG / SSS on Exynos 5422

2015-08-17 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 hkallwe...@gmail.com: 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

Re: [PATCH 0/3] ARM: dts: Enable Exynos RNG module

2015-10-29 Thread Krzysztof Kozlowski
On 25.10.2015 08:58, Tobias Jakobi wrote: > Hello Krzysztof, > > > Krzysztof Kozlowski wrote: >> On 20.10.2015 01:11, Tobias Jakobi wrote: >>> Hello Krzysztof, >>> >>> I can confirm that this also works on a Odroid-X2, so I guess it's safe >>&

[PATCH 3/4] hwrng: exynos - Fix missing configuration after suspend to RAM

2015-10-18 Thread Krzysztof Kozlowski
. After each system suspend initialize the seed to fix the error. Signed-off-by: Krzysztof Kozlowski <k.kozlow...@samsung.com> --- drivers/char/hw_random/exynos-rng.c | 42 ++--- 1 file changed, 35 insertions(+), 7 deletions(-) diff --git a/drivers/char/hw_

Re: [PATCH 3/4] hwrng: exynos - Fix missing configuration after suspend to RAM

2015-10-18 Thread Krzysztof Kozlowski
On 19.10.2015 13:37, Krzysztof Kozlowski wrote: > After suspend to RAM the device stopped to work with ETIMEDOUT error: > > $ dd if=/dev/hwrng of=/dev/null bs=1 count=16 > dd: reading `/dev/hwrng': Connection timed out > > In the STATUS register the bits #5

[PATCH 0/4] hwrng: exynos - Add Device Tree support

2015-10-18 Thread Krzysztof Kozlowski
is secured. Best regards, Krzysztof Krzysztof Kozlowski (4): dt-bindings: rng: Describe Exynos4 PRNG bindings hwrng: exynos - Add timeout for waiting on init done hwrng: exynos - Fix missing configuration after suspend to RAM hwrng: exynos - Add Device Tree support .../bindings/rng/samsung

[PATCH 2/3] ARM: dts: Add PRNG module for exynos4

2015-10-18 Thread Krzysztof Kozlowski
Add Pseudo Random Number Generator (PRNG) node of Security Sub System (SSS) to Exynos 4 DTSI. Signed-off-by: Krzysztof Kozlowski <k.kozlow...@samsung.com> --- arch/arm/boot/dts/exynos4.dtsi | 8 1 file changed, 8 insertions(+) diff --git a/arch/arm/boot/dts/exynos4.dtsi b/arch/ar

[PATCH 3/3] ARM: dts: Enable PRNG module on exynos4412-trats2

2015-10-18 Thread Krzysztof Kozlowski
Enable Pseudo Random Number Generator (PRNG) on Trats2 board. This allows using hardware random number generator: $ echo exynos > /sys/class/misc/hw_random/rng_current Signed-off-by: Krzysztof Kozlowski <k.kozlow...@samsung.com> --- arch/arm/boot/dts/exynos4412-trats2.dts | 4 +++

[PATCH 4/4] hwrng: exynos - Add Device Tree support

2015-10-18 Thread Krzysztof Kozlowski
-by: Krzysztof Kozlowski <k.kozlow...@samsung.com> --- drivers/char/hw_random/exynos-rng.c | 9 + 1 file changed, 9 insertions(+) diff --git a/drivers/char/hw_random/exynos-rng.c b/drivers/char/hw_random/exynos-rng.c index 162adbda1b70..7077c7741dae 100644 --- a/drivers/char/hw_random/exynos

[PATCH 1/4] dt-bindings: rng: Describe Exynos4 PRNG bindings

2015-10-18 Thread Krzysztof Kozlowski
Document the bindings used by exynos-rng Pseudo Random Number Generator driver. Signed-off-by: Krzysztof Kozlowski <k.kozlow...@samsung.com> --- .../devicetree/bindings/rng/samsung,exynos-rng4.txt | 17 + 1 file changed, 17 insertions(+) create mode 100644 Documen

[PATCH 2/4] hwrng: exynos - Add timeout for waiting on init done

2015-10-18 Thread Krzysztof Kozlowski
Driver may hang waiting indefinitely for PRNG to finish its initialization stage. Instead of stalling return -ETIMEDOUT error. Signed-off-by: Krzysztof Kozlowski <k.kozlow...@samsung.com> --- drivers/char/hw_random/exynos-rng.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-)

[PATCH 0/3] ARM: dts: Enable Exynos RNG module

2015-10-18 Thread Krzysztof Kozlowski
tof Krzysztof Kozlowski (3): clk: samsung: exynos4: Add SSS gate clock ARM: dts: Add PRNG module for exynos4 ARM: dts: Enable PRNG module on exynos4412-trats2 arch/arm/boot/dts/exynos4.dtsi | 8 arch/arm/boot/dts/exynos4412-trats2.dts | 4 drivers/clk/samsung/clk-exynos

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

2015-10-18 Thread Krzysztof Kozlowski
s way. > > Signed-off-by: Daniel Thompson <daniel.thomp...@linaro.org> > Cc: Kukjin Kim <kg...@kernel.org> > Cc: Krzysztof Kozlowski <k.kozlow...@samsung.com> > --- > > Notes: > Compile tested only (CONFIG_PM=y, CONFIG_HW_RANDOM_EXYNOS=m); I spotted &

Re: [PATCH 0/3] ARM: dts: Enable Exynos RNG module

2015-10-19 Thread Krzysztof Kozlowski
; > Any chance that you might also take a look at the other hwcrypto stuff > on the SoC ('samsung,exynos4210-secss' compatible)? What do you mean? The s5p-sss driver already supports Device Tree. Best regards, Krzysztof > > With best wishes, > Tobias > > > Krzysztof Kozlow

Re: [PATCH 1/3] clk: samsung: exynos4: Add SSS gate clock

2015-10-19 Thread Krzysztof Kozlowski
On 20.10.2015 04:59, Stephen Boyd wrote: > On 10/19, Krzysztof Kozlowski wrote: >> Add a gate clock for controlling all clocks of Security Sub System >> (SSS). >> >> Signed-off-by: Krzysztof Kozlowski <k.kozlow...@samsung.com> >> --- > > The To: l

[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 k.kozlow...@samsung.com --- The coccinelle script which generated the patch was sent here: http://www.spinics.net/lists/kernel/msg2029903.html --- drivers/crypto

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

2016-05-30 Thread Krzysztof Kozlowski
uot;) Cc: <sta...@vger.kernel.org> # 3.16+ Signed-off-by: Krzysztof Kozlowski <k.kozlow...@samsung.com> Tested-by: Marek Szyprowski <m.szyprow...@samsung.com> Signed-off-by: Herbert Xu <herb...@gondor.apana.org.au> [k.kozlowski: Backport to v3.16] --- Backporting to earli

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

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

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

2016-06-28 Thread Krzysztof Kozlowski
; Signed-off-by: Krzysztof Kozlowski <k.kozlow...@samsung.com> --- 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/

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

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

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

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

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

[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 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 <k.kozlow...@samsung.com> --- drivers/char/hw_random/exynos-rng.c | 10 -- 1 file changed, 4 insertions

[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 <k.kozlow...@samsung.com> --- drivers/char/hw_random/exynos-rng.c | 7

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

2016-03-10 Thread Krzysztof Kozlowski
l.org> # v4.4+ Signed-off-by: Krzysztof Kozlowski <k.kozlow...@samsung.com> --- drivers/char/hw_random/exynos-rng.c | 10 +++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/drivers/char/hw_random/exynos-rng.c b/drivers/char/hw_random/exynos-rng.c index d1fd21e9936

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

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 <k.kozlow...@samsung.com>: > 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 us

[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 <k.kozlow...@samsung.com> --- Changes since v1: 1. None. --- drivers/char/hw_random/exynos-rng.c | 3 ++- 1 file changed, 2 insertions(+), 1 de

[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 <k.kozlow...@samsung.com> --- Changes since

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

2016-03-13 Thread Krzysztof Kozlowski
l.org> # v4.4+ Signed-off-by: Krzysztof Kozlowski <k.kozlow...@samsung.com> --- Changes since v1: 1. None. --- drivers/char/hw_random/exynos-rng.c | 10 +++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/drivers/char/hw_random/exynos-rng.c b/drivers/char/hw_ran

[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] 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 <k.kozlow...@samsung.com> --- Compile-tested on x86, x86_64, ppc64, arm, arm64 an

[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 <k.kozlow...@samsung.com> --- Compile-tested on x86, x86_64, ppc64, arm, arm64 and mips. --- d

[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 <k.kozlow...@samsung.com> --- drivers/char/hw_random/exynos-rng.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/char/hw_

[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 <v...@mleia.com> Signed-off-by: Krzysztof Kozlowski <k.kozlow...@samsung.com> --- Changes since v1: 1. New patch. My email differs from one used in previous pat

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

2016-03-09 Thread Krzysztof Kozlowski
From: Krzysztof Kozlowski <k...@kernel.org> Remove unneeded inclusion of delay.h and get rid of indentation from labels. Signed-off-by: Krzysztof Kozlowski <k...@kernel.org> Acked-by: Vladimir Zapolskiy <v...@mleia.com> --- Changes since v1: 1. Add Vladimir's acked-by. ---

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

2016-03-09 Thread Krzysztof Kozlowski
From: Krzysztof Kozlowski <k...@kernel.org> 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 suc

[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 <v...@mleia.com> Signed-off-by: Krzysztof Kozlowski <k.kozlow...@samsung.com> Acked-by: Vladimir Zapolskiy <v...@mleia.com> --- Changes since v2: 1. Ad

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

2016-03-21 Thread Krzysztof Kozlowski
From: Krzysztof Kozlowski <k...@kernel.org> 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 suc

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

2016-03-21 Thread Krzysztof Kozlowski
From: Krzysztof Kozlowski <k...@kernel.org> Remove unneeded inclusion of delay.h and get rid of indentation from labels. Signed-off-by: Krzysztof Kozlowski <k...@kernel.org> Acked-by: Vladimir Zapolskiy <v...@mleia.com> --- Changes since v2: 1. None. Changes since v1: 1. Ad

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

2016-03-06 Thread Krzysztof Kozlowski
space. Signed-off-by: Krzysztof Kozlowski <k...@kernel.org> --- 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..bac1f4

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

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

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

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

[PATCH] hwrng: exynos - Fix misspelled Samsung address

2016-04-04 Thread Krzysztof Kozlowski
Correct smasung.com into samsung.com. Signed-off-by: Krzysztof Kozlowski <k.kozlow...@samsung.com> --- 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

[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: <sta...@vger.kernel.org> Signed-off-by: Krzys

[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 <k.kozlow...@samsung.com> --- drivers/crypto/s5p-sss.c | 95 1 file changed, 47 insertions(+), 48 deletions(-)

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

2016-04-26 Thread Krzysztof Kozlowski
+--- > 1 file changed, 3 insertions(+), 3 deletions(-) Reviewed-by: Krzysztof Kozlowski <k.kozlow...@samsung.com> Best regards, Krzysztof -- To unsubscribe from this list: send the line "unsubscribe linux-crypto" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

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

2016-04-19 Thread Krzysztof Kozlowski
to remove the hash interrupt related code and to not require the interrupt in Device Tree. Signed-off-by: Krzysztof Kozlowski <k.kozlow...@samsung.com> --- .../devicetree/bindings/crypto/samsung-sss.txt | 6 ++-- drivers/crypto/s5p-sss.c | 34 ---

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

2016-04-19 Thread Krzysztof Kozlowski
will be freed by s5p_aes_complete(). Fixes: 9e4a1100a445 ("crypto: s5p-sss - Handle unaligned buffers") Signed-off-by: Krzysztof Kozlowski <k.kozlow...@samsung.com> --- drivers/crypto/s5p-sss.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/crypto/s5p-sss.c b/drivers/crypto

[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

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

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

[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

[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

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

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

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_

[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

[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

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

[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

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

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

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

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

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

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

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

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

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

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

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

2017-03-12 Thread Krzysztof Kozlowski
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 flags were used. No patches were used other than the 2 you > provided. Just the barest of bears, the barest

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

2017-03-10 Thread Krzysztof Kozlowski
On Thu, Mar 09, 2017 at 05:16:35AM -0600, Nathan Royce wrote: > Gave it a try on 4.10.1, but still to no avail: (...) > Also for the sake of testing, I did not add any FLAGS for compilation this > time. Damn, I am fixing bugs around but not the one you are hitting. Can you also check if

[PATCH] MAINTAINERS: Add Krzysztof Kozlowski as maintainer of crypto/s5p-sss

2017-03-10 Thread Krzysztof Kozlowski
Beside developing of this driver recently, I handle also reviews and bug reports from users so having a maintainer entry will ensure that I will be CC-ed on important emails. Cc: Vladimir Zapolskiy <v...@mleia.com> Cc: Herbert Xu <herb...@gondor.apana.org.au> Signed-off-by: Krzysztof

Re: [PATCH] MAINTAINERS: Add Krzysztof Kozlowski as maintainer of crypto/s5p-sss

2017-03-10 Thread Krzysztof Kozlowski
On Fri, Mar 10, 2017 at 11:18:13PM +0200, Vladimir Zapolskiy wrote: > Hi Krzysztof, > > On 03/10/2017 09:10 PM, Krzysztof Kozlowski wrote: > > Beside developing of this driver recently, I handle also reviews and > > bug reports from users so having a maintainer ent

  1   2   >