[PATCH v6 1/6] hwrng: remove msm hw_random driver

2018-07-15 Thread Vinod Koul
This driver is for a psedo-rng so should not be added in hwrng. Remove it so that it's replacement can be added. Signed-off-by: Vinod Koul --- drivers/char/hw_random/Kconfig | 13 --- drivers/char/hw_random/Makefile | 1 - drivers/char/hw_random/msm-rng.c | 183

[PATCH v6 4/6] dt-bindings: crypto: Add new compatible qcom,prng-ee

2018-07-15 Thread Vinod Koul
Later qcom chips support v2 of the prng, which exposes an EE (Execution Environment) for OS to use so add new compatible qcom,prng-ee for this. Signed-off-by: Vinod Koul --- Documentation/devicetree/bindings/crypto/qcom,prng.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --gi

[PATCH v6 5/6] crypto: qcom: Add support for prng-ee

2018-07-15 Thread Vinod Koul
Qcom 8996 and later chips features multiple Execution Environments (EE) and secure world is typically responsible for configuring the prng. Add driver data for qcom,prng as 0 and qcom,prng-ee as 1 and use that to skip initialization routine. Signed-off-by: Vinod Koul --- drivers/crypto/qcom-rng

[PATCH v6 3/6] crypto: Add Qcom prng driver

2018-07-15 Thread Vinod Koul
This ports the Qcom prng from older hw_random driver. No change of functionality and move from hw_random to crypto APIs is done. Reviewed-by: Linus Walleij Signed-off-by: Vinod Koul --- drivers/crypto/Kconfig| 11 +++ drivers/crypto/Makefile | 1 + drivers/crypto/qcom-rng.c | 208

[PATCH v6 6/6] crypto: qcom: Add ACPI support

2018-07-15 Thread Vinod Koul
From: Timur Tabi Add support for probing on ACPI systems, with ACPI HID QCOM8160. On ACPI systems, clocks are always enabled, the PRNG should already be enabled, and the register region is read-only. The driver only verifies that the hardware is already enabled never tries to disable or configur

[PATCH v6 0/6] crypto: Add Qcom PRNG support

2018-07-15 Thread Vinod Koul
This series removes the hwrng qcom driver and replaces it with crypto qcom driver and then adds support for Execution Environment (EE) found in v2 version of the hardware and ACPI support for these Changes in v6: - Fix a typo in kconfig. Remove of_device.h and add of.h header - Add review and te

[PATCH v6 2/6] dt-bindings: crypto: Move prng binding to crypto

2018-07-15 Thread Vinod Koul
Now that we are adding new driver for prng in crypto, move the binding as well. Signed-off-by: Vinod Koul --- Documentation/devicetree/bindings/{rng => crypto}/qcom,prng.txt | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename Documentation/devicetree/bindings/{rng => crypto}/qcom,prng.t

Re: [PATCH v5 3/6] crypto: Add Qcom prng driver

2018-07-15 Thread Vinod
On 16-07-18, 09:45, Vinod wrote: > On 14-07-18, 12:16, Linus Walleij wrote: > > On Mon, Jul 9, 2018 at 8:20 AM Vinod Koul wrote: > > > > +#include > > > > Do you need this? It seems like a platform device fair and square. > > It was required for of_device_get_match_data() but then the change i

Re: [PATCH v5 3/6] crypto: Add Qcom prng driver

2018-07-15 Thread Vinod
On 14-07-18, 12:16, Linus Walleij wrote: > On Mon, Jul 9, 2018 at 8:20 AM Vinod Koul wrote: > > > This ports the Qcom prng from older hw_random driver. > > > > No change of functionality and move from hw_random to crypto > > APIs is done. > > > > Signed-off-by: Vinod Koul > > FWIW: > Reviewed-b

Re: [PATCH v4 11/14] treewide: Prepare to remove VLA usage for AHASH_REQUEST_ON_STACK

2018-07-15 Thread Kees Cook
On Sun, Jul 15, 2018 at 5:01 PM, Herbert Xu wrote: > On Sat, Jul 14, 2018 at 07:59:09PM -0700, Kees Cook wrote: >> On Sat, Jul 14, 2018 at 7:44 PM, Herbert Xu >> wrote: >> > On Fri, Jul 13, 2018 at 08:07:10PM -0700, Kees Cook wrote: >> >> >> >> On a plane today I started converting all these to

Re: [PATCH v4 11/14] treewide: Prepare to remove VLA usage for AHASH_REQUEST_ON_STACK

2018-07-15 Thread Herbert Xu
On Sat, Jul 14, 2018 at 07:59:09PM -0700, Kees Cook wrote: > On Sat, Jul 14, 2018 at 7:44 PM, Herbert Xu > wrote: > > On Fri, Jul 13, 2018 at 08:07:10PM -0700, Kees Cook wrote: > >> > >> On a plane today I started converting all these to shash. IIUC, it > >> just looks like this (apologies for wh

Re: [PATCH] crypto: Add 0 walk-offset check in scatterwalk_pagedone()

2018-07-15 Thread Eric Biggers
Hi Liu, On Mon, Jul 09, 2018 at 05:10:19PM +0800, Liu Chao wrote: > From: Luo Xinqiang > > In function scatterwalk_pagedone(), a kernel panic of invalid > page will occur if walk->offset equals 0. This patch fixes the > problem by setting the page addresswith sg_page(walk->sg) > directly if walk