Re: [PATCH] s390/crypto: initialize ret to zero to avoid returning garbage value

2016-09-06 Thread Martin Schwidefsky
On Mon, 5 Sep 2016 17:21:18 +0100 Colin King wrote: > From: Colin Ian King > > static analysis with cppcheck detected that ret is not initialized > and hence garbage is potentially being returned in the case where > prng_data->ppnows.reseed_counter <= prng_reseed_limit. > > Signed-off-by: Col

[PATCH][V2] s390/crypto: initialize ret to nbytes to avoid returning garbage value

2016-09-06 Thread Colin King
From: Colin Ian King Static analysis with cppcheck detected that ret is not initialized and hence garbage is potentially being returned in the case where prng_data->ppnows.reseed_counter <= prng_reseed_limit. Thanks to Martin Schwidefsky for spotting a mistake in my original fix. Fixes: 0177db0

[PATCH] hwrng: pasemi-rng - Use linux/io.h instead of asm/io.h

2016-09-06 Thread PrasannaKumar Muralidharan
Checkpatch.pl warns about usage of asm/io.h. Use linux/io.h instead. Signed-off-by: PrasannaKumar Muralidharan --- drivers/char/hw_random/pasemi-rng.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/char/hw_random/pasemi-rng.c b/drivers/char/hw_random/pasemi-rng.c in

Re: [PATCH v2 2/2] crypto: qat - fix resource release omissions

2016-09-06 Thread Giovanni Cabiddu
Hi Lambert, On Fri, Sep 02, 2016 at 04:47:53PM +0200, Quentin Lambert wrote: > In certain cases qat_uclo_parse_uof_obj used to return with an error code > before releasing all resources. This patch add a jump to the appropriate label > ensuring that the resources are properly released before retur

echainiv not working as supposed to be?

2016-09-06 Thread Mathias Krause
Hi Herbert, I'm a little bit confused on how echainiv is supposed to work. I think it's doing a few things wrongly, I just can't decide what's actually wrong as the intended mode of operation is unclear to me. At least, as-is, the code isn't quite operating as advertised in the comment at the top

[PATCH 2/9] dt-bindings: omap-rng: Document SafeXcel IP-76 device variant

2016-09-06 Thread Romain Perier
This commits add missing fields in the documentation that are used by the new device variant. It also includes DT example to show how the variant should be used. Signed-off-by: Romain Perier --- Documentation/devicetree/bindings/rng/omap_rng.txt | 14 -- 1 file changed, 12 insertions

[PATCH 0/9] Add support for SafeXcel IP-76 to OMAP RNG

2016-09-06 Thread Romain Perier
The driver omap-rng has a lot of similarity with the IP block SafeXcel IP-76. A lot of registers are the same and the way that the driver works is very closed the description of the TRNG EIP76 in its datasheet. This series refactorize the driver, add support for generating bigger output random dat

[PATCH 4/9] hwrng: omap - Use the managed device resource API for registration

2016-09-06 Thread Romain Perier
Use devm_hwrng_register instead of hwrng_register. It avoids the need to handle unregistration explicitly from the remove function. Signed-off-by: Romain Perier --- drivers/char/hw_random/omap-rng.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/char/hw_random/oma

[PATCH 5/9] hwrng: omap - Remove global definition of hwrng

2016-09-06 Thread Romain Perier
The omap-rng driver currently assumes that there will only ever be a single instance of an RNG device. For this reason, there is a statically allocated struct hwrng, with a fixed name. However, registering two struct hwrng with the same isn't accepted by the RNG framework, so we need to switch to a

[PATCH 1/9] dt-bindings: Add vendor prefix for INSIDE Secure

2016-09-06 Thread Romain Perier
This commits adds a vendor for the company INSIDE Secure. See https://www.insidesecure.com, for more details. Signed-off-by: Romain Perier --- Documentation/devicetree/bindings/vendor-prefixes.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/devicetree/bindings/vendor-prefix

[PATCH 3/9] hwrng: omap - Switch to non-obsolete read API implementation

2016-09-06 Thread Romain Perier
The ".data_present" and ".data_read" operations are marked as OBSOLETE in the hwrng API. We have to use the ".read" operation instead. It makes the driver simpler and removes the need to do a busy loop to wait until enough data is generated by the IP. We simplify this step by only checking the stat

[PATCH 9/9] arm64: dts: marvell: add TRNG description for Armada 8K CP

2016-09-06 Thread Romain Perier
This commits adds the devicetree description of the SafeXcel IP-76 TRNG found in the two Armada CP110. Signed-off-by: Romain Perier --- arch/arm64/boot/dts/marvell/armada-cp110-master.dtsi | 8 arch/arm64/boot/dts/marvell/armada-cp110-slave.dtsi | 8 2 files changed, 16 insert

[PATCH 7/9] hwrng: omap - Don't prefix the probe message with OMAP

2016-09-06 Thread Romain Perier
So far, this driver was only used for OMAP SoCs. However, if a device variant is added for an IP block that has nothing to do with the OMAP platform, the message "OMAP Random Number Generator Ver" is displayed anyway. Instead of hardcoding "OMAP" into this message, we decide to only display "Random

[PATCH 6/9] hwrng: omap - Add support for 128-bit output of data

2016-09-06 Thread Romain Perier
So far, this driver only supports up to 64 bits of output data generated by an RNG. Some IP blocks, like the SafeXcel IP-76 supports up to 128 bits of output data. This commits renames registers descriptions OUTPUT_L_REG and OUTPUT_H_REG to OUTPUT_0_REG and OUPUT_1_REG, respectively. It also adds t

[PATCH 8/9] hwrng: omap - Add device variant for SafeXcel IP-76 found in Armada 8K

2016-09-06 Thread Romain Perier
This commits adds a device variant for Safexcel,EIP76 found in Marvell Armada 8k. It defines registers mapping with the good offset and add a specific initialization function. Signed-off-by: Romain Perier --- drivers/char/hw_random/Kconfig| 2 +- drivers/char/hw_random/omap-rng.c | 85 +

Re: echainiv not working as supposed to be?

2016-09-06 Thread Herbert Xu
On Tue, Sep 06, 2016 at 02:24:59PM +0200, Mathias Krause wrote: > > For each request it XORs the salt into the provided IV (req->iv). For > ESP the provided IV is the sequence number or, at least, parts of it. > The thus modified IV gets written into the *destination* buffer > (req->dst) which mig

Re: [PATCH 4/9] hwrng: omap - Use the managed device resource API for registration

2016-09-06 Thread PrasannaKumar Muralidharan
> Use devm_hwrng_register instead of hwrng_register. It avoids the need > to handle unregistration explicitly from the remove function. > > Signed-off-by: Romain Perier > --- > drivers/char/hw_random/omap-rng.c | 4 +--- > 1 file changed, 1 insertion(+), 3 deletions(-) > > diff --git a/drivers/ch

[PATCH 13/21] padata: Convert to hotplug state machine

2016-09-06 Thread Sebastian Andrzej Siewior
Install the callbacks via the state machine. CPU-hotplug multinstance support is used with the nocalls() version. Maybe parts of padata_alloc() could be moved into the online callback so that we could invoke ->startup callback for instance and drop get_online_cpus(). Cc: Steffen Klassert Cc: linu

linux 3.10 crash with crypto hardware assist,

2016-09-06 Thread Hsieh, Che-Min
Has anyone seen the following problem on Linux 3.10, or later Linux? If it is fixed, can anyone point out where the fix is? Thanks. Chemin We are running Android, based on Linux3.10. With our crypto hardware accelerator, and driver, algorithm of "authenc(hmac(sha1),cbc(aes))" is running well. Wit