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

2015-10-18 Thread Krzysztof Kozlowski
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 4/4] hwrng: exynos - Add Device Tree support

2015-10-18 Thread Krzysztof Kozlowski
: Krzysztof Kozlowski --- 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-rng.c +++ b/drivers/char

[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 --- .../devicetree/bindings/rng/samsung,exynos-rng4.txt | 17 + 1 file changed, 17 insertions(+) create mode 100644 Documentation/devicetree/bindings/rng

[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 --- drivers/char/hw_random/exynos-rng.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/char

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

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

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

2015-10-18 Thread Krzysztof Kozlowski
, Krzysztof 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/cl

[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 --- arch/arm/boot/dts/exynos4412-trats2.dts | 4 1 file changed, 4 insertions(+) d

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

2015-10-18 Thread Krzysztof Kozlowski
Add a gate clock for controlling all clocks of Security Sub System (SSS). Signed-off-by: Krzysztof Kozlowski --- drivers/clk/samsung/clk-exynos4.c | 1 + include/dt-bindings/clock/exynos4.h | 1 + 2 files changed, 2 insertions(+) diff --git a/drivers/clk/samsung/clk-exynos4.c b/drivers/clk

[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 --- arch/arm/boot/dts/exynos4.dtsi | 8 1 file changed, 8 insertions(+) diff --git a/arch/arm/boot/dts/exynos4.dtsi b/arch/arm/boot/dts/exynos4.dtsi index

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 bit

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

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 >> --- > > The To: list is huge, so I have no idea if y

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

2015-10-28 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 >

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 exynos_

[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 Cc: Herbert Xu Signed-off-by: Krzysztof Kozlowski --- MAINTAINERS | 7 +++ 1 file changed

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 entry will e

[PATCH v2] MAINTAINERS: Add maintianer entry for crypto/s5p-sss

2017-03-10 Thread Krzysztof Kozlowski
Add Krzysztof Kozlowski and Vladimir Zapolskiy as maintainers of s5p-sss driver for handling reviews, testing and getting bug reports from the users. Cc: Vladimir Zapolskiy Cc: Herbert Xu Signed-off-by: Krzysztof Kozlowski --- Changes since v1: 1. Add also Vladimir --- MAINTAINERS | 8

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 o

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

[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 --- 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 35ea84b7d775..7ac657f46d15 100644

[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 --- drivers/crypto/s5p-sss.c | 35

[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 1/4] crypto: s5p-sss - Close possible race for completed requests

2017-03-17 Thread Krzysztof Kozlowski
out of a lock protected critical section. This might lead to potential race between completing current request and scheduling a new one. Effectively the request completion might try to operate on new crypto request. Cc: # v4.10.x Fixes: 28b62b145868 ("crypto: s5p-sss - Fix spinlock recursion on

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

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

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 d

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 RN

[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 --- arch/arm/configs/exynos_defconfig | 6 ++ 1 file changed, 6 insertions(+) diff --git a/arch/arm/configs

[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 --- MAINTAINERS | 8 + drivers/char

[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 --- arch/arm/configs/multi_v7_defconfig | 6 ++ 1 file changed, 6 insertions(+) diff --git a/arch/arm/configs

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

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

[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 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 --- arch/arm/configs/exynos_defconfig | 6 ++ 1 file changed, 6 insertions(+) diff --git a/arch/arm/configs

[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 --- The resume path is

[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 --- arch/arm/configs/multi_v7_defconfig | 6 ++ 1 file changed, 6 insertions(+) diff --git a/arch/arm/configs

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 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 --- arch/arm/configs/multi_v7_defconfig | 6 ++ 1 file changed, 6 insertions(+) diff --git a/arch/arm/configs

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

[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 --- arch/arm/configs/exynos_defconfig | 6 ++ 1 file changed, 6 insertions(+) diff --git a/arch/arm/configs

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 wrote: > > Replace existing hw_ranndom/exynos-rng driver with a new, reworked one

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 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 bytes)\n",

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 i

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_rn

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

2017-04-08 Thread Krzysztof Kozlowski
On Sat, Apr 08, 2017 at 10:02:46AM +0800, Herbert Xu wrote: > On Thu, Apr 06, 2017 at 05:54:14PM +0800, Herbert Xu wrote: > > On Mon, Mar 13, 2017 at 07:06:01PM +0200, Krzysztof Kozlowski wrote: > > > > > > I bisected this to commit f1c131b45410 ("crypto: xts - Conv

[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 --- The metag change was not even compiled due

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

2017-04-08 Thread Krzysztof Kozlowski
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

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

2017-04-08 Thread Krzysztof Kozlowski
Krzysztof [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

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 wrote: > On Sat, Apr 08, 2017 at 03:32:45PM +0200, Krzysztof Kozlowski wrote: >> >> +static struct rng_alg exynos_rng_alg = { >> + .generate = exynos_rng_generate, >> + .seed = exynos_r

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

2017-04-11 Thread Krzysztof Kozlowski
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

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

2017-04-11 Thread Krzysztof Kozlowski
om TRNG module. 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 Koz

[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 --- The metag change was not even compiled due

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

2017-05-20 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 Muralidharan > --- > drivers

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 wrote: > Hi Krzysztof > > On 21 May 2017 at 11:56, Krzysztof Kozlowski wrote: >> On Sun, May 21, 2017 at 8:09 AM, PrasannaKumar Muralidharan >> wrote: >>> As cra_ctxsize is set but the allocated space is

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 this step then please mark the p

[PATCH] KEYS: asymmetric: Fix kerneldoc

2020-07-28 Thread Krzysztof Kozlowski
eter 'kid_2' description in 'asymmetric_key_id_same' Signed-off-by: Krzysztof Kozlowski --- crypto/asymmetric_keys/asymmetric_type.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/crypto/asymmetric_keys/asymmetric_type.c b/crypto/asymme

[RESEND PATCH] KEYS: asymmetric: Fix kerneldoc

2020-08-19 Thread Krzysztof Kozlowski
eter 'kid_2' description in 'asymmetric_key_id_same' Signed-off-by: Krzysztof Kozlowski --- crypto/asymmetric_keys/asymmetric_type.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/crypto/asymmetric_keys/asymmetric_type.c b/crypto/asymme

[PATCH] hwrng: cctrn - Simplify with dev_err_probe()

2020-08-26 Thread Krzysztof Kozlowski
Common pattern of handling deferred probe can be simplified with dev_err_probe(). Less code and also it prints the error value. Signed-off-by: Krzysztof Kozlowski --- drivers/char/hw_random/cctrng.c | 9 - 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/drivers/char

[PATCH 3/3] crypto: ccree - Simplify with dev_err_probe()

2020-08-26 Thread Krzysztof Kozlowski
Common pattern of handling deferred probe can be simplified with dev_err_probe(). Less code and also it prints the error value. Signed-off-by: Krzysztof Kozlowski --- drivers/crypto/ccree/cc_driver.c | 7 ++- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/drivers/crypto

[PATCH 2/3] crypto: sa2ul - Simplify with dev_err_probe()

2020-08-26 Thread Krzysztof Kozlowski
Common pattern of handling deferred probe can be simplified with dev_err_probe(). Less code and also it prints the error value. Signed-off-by: Krzysztof Kozlowski --- drivers/crypto/sa2ul.c | 18 +++--- 1 file changed, 7 insertions(+), 11 deletions(-) diff --git a/drivers/crypto

[PATCH 1/3] crypto: sa2ul - Hide pointer and fix -Wpointer-to-int-cast in dev_dbg()

2020-08-26 Thread Krzysztof Kozlowski
-to-int-cast] Signed-off-by: Krzysztof Kozlowski --- drivers/crypto/sa2ul.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/crypto/sa2ul.c b/drivers/crypto/sa2ul.c index 5bc099052bd2..4a950437bf44 100644 --- a/drivers/crypto/sa2ul.c +++ b/drivers/crypto/sa2ul.c

Re: [RESEND PATCH] KEYS: asymmetric: Fix kerneldoc

2020-08-30 Thread Krzysztof Kozlowski
On Wed, Aug 19, 2020 at 07:52:12PM +0200, Krzysztof Kozlowski wrote: > Fix W=1 compile warnings (invalid kerneldoc): > > crypto/asymmetric_keys/asymmetric_type.c:160: warning: Function parameter > or member 'kid1' not described in 'asymmetric_key_id_same&#x

[PATCH 3/4] crypto: stm32-hash - Simplify with dev_err_probe()

2020-09-02 Thread Krzysztof Kozlowski
Common pattern of handling deferred probe can be simplified with dev_err_probe(). Less code and the error value gets printed. Signed-off-by: Krzysztof Kozlowski --- drivers/crypto/stm32/stm32-hash.c | 11 +++ 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/drivers/crypto

[PATCH 4/4] crypto: allwinner/sun8i - Simplify with dev_err_probe()

2020-09-02 Thread Krzysztof Kozlowski
Common pattern of handling deferred probe can be simplified with dev_err_probe(). Less code and the error value gets printed. Signed-off-by: Krzysztof Kozlowski --- drivers/crypto/allwinner/sun8i-ce/sun8i-ce-core.c | 9 +++-- drivers/crypto/allwinner/sun8i-ss/sun8i-ss-core.c | 9

[PATCH 2/4] crypto: caam - Simplify with dev_err_probe()

2020-09-02 Thread Krzysztof Kozlowski
Common pattern of handling deferred probe can be simplified with dev_err_probe(). Less code and the error value gets printed. Signed-off-by: Krzysztof Kozlowski --- drivers/crypto/caam/caamalg_qi2.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/crypto/caam

[PATCH 1/4] crypto: caam - Fix kerneldoc

2020-09-02 Thread Krzysztof Kozlowski
Fix kerneldoc warnings: drivers/crypto/caam/caamalg_qi2.c:73: warning: cannot understand function prototype: 'struct caam_ctx ' drivers/crypto/caam/caamalg_qi2.c:2962: warning: cannot understand function prototype: 'struct caam_hash_ctx ' Signed-off-by: Krzysztof Koz

Re: [PATCH] crypto: s5p-sss: remove redundant null check

2020-09-03 Thread Krzysztof Kozlowski
changed, 2 insertions(+), 4 deletions(-) Reviewed-by: Krzysztof Kozlowski Best regards, Krzysztof

Re: [PATCH 1/4] crypto: caam - Fix kerneldoc

2020-09-03 Thread Krzysztof Kozlowski
On Thu, 3 Sep 2020 at 14:08, Iuliana Prodan wrote: > > On 9/2/2020 6:05 PM, Krzysztof Kozlowski wrote: > > Fix kerneldoc warnings: > > > >drivers/crypto/caam/caamalg_qi2.c:73: warning: cannot understand > > function prototype: 'struct caam_ctx ' >

[PATCH 1/3] dt-bindings: crypto: slimsss: Correct a typo in compatible

2020-09-03 Thread Krzysztof Kozlowski
Correct a typo in the compatible - missing trailing 's'. Signed-off-by: Krzysztof Kozlowski --- Documentation/devicetree/bindings/crypto/samsung-slimsss.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Documentation/devicetree/bindings/crypto/samsung-slims

[PATCH 2/3] crypto: s5p-sss - Add and fix kerneldoc

2020-09-03 Thread Krzysztof Kozlowski
x27; drivers/crypto/s5p-sss.c:1143: warning: Excess function parameter 'nbytes' description in 's5p_hash_prepare_sgs' Signed-off-by: Krzysztof Kozlowski --- drivers/crypto/s5p-sss.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/drivers/crypto/s

[PATCH 3/3] crypto: s5p-sss - Pass error from clk_get and reduce verbosity on deferral

2020-09-03 Thread Krzysztof Kozlowski
Pass the error directly from devm_clk_get() to describe the real reason, instead of fixed ENOENT. Do not print error messages on deferred probe. Signed-off-by: Krzysztof Kozlowski --- drivers/crypto/s5p-sss.c | 15 +++ 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a

Re: [PATCH 1/3] dt-bindings: crypto: slimsss: Correct a typo in compatible

2020-09-04 Thread Krzysztof Kozlowski
On Fri, 4 Sep 2020 at 11:07, Kamil Konieczny wrote: > > > > On 9/3/20 8:03 PM, Krzysztof Kozlowski wrote: > > Correct a typo in the compatible - missing trailing 's'. > > > > Signed-off-by: Krzysztof Kozlowski > > --- > > Documentation

[PATCH v2 1/4] crypto: caam - Fix kerneldoc

2020-09-10 Thread Krzysztof Kozlowski
/ctrl.c:449: warning: Function parameter or member 'ctrl' not described in 'caam_get_era' Signed-off-by: Krzysztof Kozlowski --- Changes since v1: 1. Fix more warnings --- drivers/crypto/caam/caamalg_desc.c | 1 + drivers/crypto/caam/caamalg_qi2.c | 4 ++-- drivers/crypto/caam/

[PATCH v2 4/4] crypto: allwinner/sun8i - Simplify with dev_err_probe()

2020-09-10 Thread Krzysztof Kozlowski
Common pattern of handling deferred probe can be simplified with dev_err_probe(). Less code and the error value gets printed. Signed-off-by: Krzysztof Kozlowski --- Changes since v1: 1. None --- drivers/crypto/allwinner/sun8i-ce/sun8i-ce-core.c | 9 +++-- drivers/crypto/allwinner/sun8i

[PATCH v2 2/4] crypto: caam - Simplify with dev_err_probe()

2020-09-10 Thread Krzysztof Kozlowski
Common pattern of handling deferred probe can be simplified with dev_err_probe(). Less code and the error value gets printed. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Iuliana Prodan --- Changes since v1: 1. Add Reviewed-by --- drivers/crypto/caam/caamalg_qi2.c | 3 +-- 1 file changed

[PATCH v2 3/4] crypto: stm32-hash - Simplify with dev_err_probe()

2020-09-10 Thread Krzysztof Kozlowski
Common pattern of handling deferred probe can be simplified with dev_err_probe(). Less code and the error value gets printed. Signed-off-by: Krzysztof Kozlowski --- Changes since v1: 1. None --- drivers/crypto/stm32/stm32-hash.c | 11 +++ 1 file changed, 3 insertions(+), 8 deletions

[RESEND PATCH] KEYS: asymmetric: Fix kerneldoc

2020-10-29 Thread Krzysztof Kozlowski
eter 'kid_2' description in 'asymmetric_key_id_same' Signed-off-by: Krzysztof Kozlowski Acked-by: Randy Dunlap --- crypto/asymmetric_keys/asymmetric_type.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/crypto/asymmetric_keys/asymmetric_type.c b/

[PATCH] dt-bindings: rng: exynos4-rng: Convert Exynos PRNG bindings to json-schema

2019-09-07 Thread Krzysztof Kozlowski
Convert Samsung Exynos Pseudo Random Number Generator bindings to DT schema format using json-schema. Signed-off-by: Krzysztof Kozlowski --- .../bindings/rng/samsung,exynos4-rng.txt | 19 - .../bindings/rng/samsung,exynos4-rng.yaml | 41 +++ MAINTAINERS

[PATCH] dt-bindings: crypto: samsung: Convert SSS and SlimSSS bindings to json-schema

2019-09-07 Thread Krzysztof Kozlowski
Convert Samsung Exynos Security SubSystem (SSS) and SlimSSS hardware crypto accelerator bindings to DT schema format using json-schema. Signed-off-by: Krzysztof Kozlowski --- Rebased on linux-next due to conflicting change in MAINTAINERS file coming through arm-soc tree. --- .../bindings

[PATCH v2] dt-bindings: crypto: samsung: Convert SSS and SlimSSS bindings to json-schema

2019-09-20 Thread Krzysztof Kozlowski
Convert Samsung Exynos Security SubSystem (SSS) and SlimSSS hardware crypto accelerator bindings to DT schema format using json-schema. Signed-off-by: Krzysztof Kozlowski --- Rebased on linux-next due to conflicting change in MAINTAINERS file coming through arm-soc tree. Changes since v1: 1

[PATCH v3] dt-bindings: rng: exynos4-rng: Convert Exynos PRNG bindings to json-schema

2019-10-02 Thread Krzysztof Kozlowski
Convert Samsung Exynos Pseudo Random Number Generator bindings to DT schema format using json-schema. Signed-off-by: Krzysztof Kozlowski --- Changes since v2: 1. Add additionalProperties false, 2. Include clock header and use defines instead of clock numbers. Changes since v1: 1. Indent

Re: [PATCH 07/25] crypto: s5p - switch to skcipher API

2019-10-21 Thread Krzysztof Kozlowski
finally drop the > blkcipher code in the near future. > > Cc: Krzysztof Kozlowski > Cc: Vladimir Zapolskiy > Cc: Kamil Konieczny > Cc: linux-samsung-...@vger.kernel.org > Signed-off-by: Ard Biesheuvel > --- > drivers/crypto/s5p-sss.c | 191 ++-- &g

Re: [PATCH 1/9] crypt: Add diskcipher

2019-08-22 Thread Krzysztof Kozlowski
On Wed, 21 Aug 2019 at 08:42, boojin.kim wrote: > > Diskcipher supports cryptographic operations of inline crypto engines like > FMP. Inline crypto engine refers to hardware and solutions implemented > to encrypt data stored in storage device. > > When encrypting using the FMP, Additional control

Re: [PATCH 11/20] crypto: s5p-sss - use crypto_shash_tfm_digest()

2020-05-05 Thread Krzysztof Kozlowski
does this for us. > > Cc: Krzysztof Kozlowski > Cc: Vladimir Zapolskiy > Cc: Kamil Konieczny > Signed-off-by: Eric Biggers > --- > drivers/crypto/s5p-sss.c | 39 ++- > 1 file changed, 6 insertions(+), 33 deletions(-) Acked-by: Krzysztof Kozlowski Best regards, Krzysztof

Re: [PATCH v2 1/2] hwrng: iproc-rng200 - Set the quality value

2020-05-20 Thread Krzysztof Kozlowski
On Wed, 20 May 2020 at 13:53, Stephan Mueller wrote: > > > That said, the illustrated example is typical for hardware RNGs. Yet > > > it is never guaranteed to work that way. Thus, if you can point to > > > architecture documentation of your specific hardware RNGs showing that > > > the data read

Re: [PATCH] char: hw_random: Fix a reference count leak.

2020-06-14 Thread Krzysztof Kozlowski
(no need for end stop) With these changes: Reviewed-by: Krzysztof Kozlowski Best regards, Krzysztof

[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 --- 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-sss.c index

[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 --- 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 index 451620b475a0

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

2018-01-10 Thread Krzysztof Kozlowski
, 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 Best regards, Krzysztof

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

2018-01-10 Thread Krzysztof Kozlowski
> 1 file changed, 1 insertion(+), 3 deletions(-) Reviewed-by: Krzysztof Kozlowski Best regards, Krzysztof

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 less than zero. Fix this by changing > val to an int s

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 am using. https://pastebi

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

2018-02-06 Thread Krzysztof Kozlowski
+0x19c/0x328 > > drivers/crypto/s5p-sss.c | 12 +--- > 1 file changed, 9 insertions(+), 3 deletions(-) Fixes and cc-stable? Reviewed-by: Krzysztof Kozlowski Best regards, Krzysztof

<    1   2   3   >