Hi Corentin,
I have a few minor comments.
On 18 October 2016 at 18:04, Corentin Labbe wrote:
> From: LABBE Corentin
>
> The Security System have a PRNG.
> This patch add support for it as an hwrng.
>
> Signed-off-by: Corentin Labbe
> ---
> drivers/crypto/Kconfig | 8
>
As hw_random core calls ->read with max > 32 or more, make it explicit.
Also remove checks involving 'max' being less than 8.
Signed-off-by: PrasannaKumar Muralidharan
---
drivers/char/hw_random/msm-rng.c | 4
drivers/char/hw_random/pic32-rng.c | 3 ---
drivers/char/h
>> The hwrng interface was always meant to be an interface for real
>> hardware random number generators. People rely on that so we
>> should not provide bogus entropy sources through this interface.
>>
>
> Why not adding a KCONFIG HW_RANDOM_ACCEPT_ALSO_PRNG with big warning ?
> Or a HW_PRNG Kconf
> What do you think about those two solutions ?
I prefer the second solution's idea of using two files (/dev/hwrng and
/dev/hwprng). Upon having a quick glance it looks like (based on
current_rng == prng check) that your current implementation allows
only one rng device to be in use at a time. It
>> I have found two solutions:
>
> No we already have algif_rng so let's not confuse things even
> further by making hwrng take PRNGs.
Even if both the solutions could not be adopted I think there must be
a way for applications to use similar API to get true rng or prng.
Given the case that no use
>> I narrowed it down to commit 6e9b5e76882c ("hwrng: geode - Migrate to
>> managed API") which seems to introduce this. It looks to me like some issue
>> between devres, the Geode hwrng and AES drivers which both use the same PCI
>> device.
>
> It does
>
>> I'm no expert here, but I curious if
On 20 February 2017 at 02:05, Heiner Kallweit wrote:
> Add handling of RNG0 clock to the driver.
>
> Signed-off-by: Heiner Kallweit
> ---
> drivers/char/hw_random/meson-rng.c | 27 ++-
> 1 file changed, 26 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/char/hw_rand
Modify Kconfig help text to reflect the fact that random data from hwrng
is fed into kernel random number generator's entropy pool.
Signed-off-by: PrasannaKumar Muralidharan
---
drivers/char/hw_random/Kconfig | 6 ++
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/drivers
that are present
after the PRNG registers. So instead of reducing the register range,
syscon interface is used to expose a register map that is used by both
CGU driver and this driver. Changes made to jz4740-cgu.c is only compile
tested.
PrasannaKumar Muralidharan (6):
crypto: jz4780-rng
Add devicetree bindings for hardware pseudo random number generator
present in Ingenic JZ4780 SoC.
Signed-off-by: PrasannaKumar Muralidharan
---
.../devicetree/bindings/rng/ingenic,jz4780-rng.txt | 24 ++
1 file changed, 24 insertions(+)
create mode 100644 Documentation
by the PRNG driver.
Signed-off-by: PrasannaKumar Muralidharan
---
arch/mips/boot/dts/ingenic/jz4740.dtsi | 14 +++
arch/mips/boot/dts/ingenic/jz4780.dtsi | 14 +++
drivers/clk/ingenic/cgu.c | 46 +-
drivers/clk/ingenic/cgu.h
JZ4780 SoC pseudo random number generator driver using crypto framework.
Adding a delay before reading RNG data and disabling RNG after reading
data was suggested by Jeffery Walton.
Tested-by: Mathieu Malaterre
Suggested-by: Jeffrey Walton
Signed-off-by: PrasannaKumar Muralidharan
This patch adds RNG node to jz4780.dtsi.
Signed-off-by: PrasannaKumar Muralidharan
---
arch/mips/boot/dts/ingenic/jz4780.dtsi | 4
1 file changed, 4 insertions(+)
diff --git a/arch/mips/boot/dts/ingenic/jz4780.dtsi
b/arch/mips/boot/dts/ingenic/jz4780.dtsi
index 1301694..865b9bf 100644
Enable PRNG driver support in MIPS Creator CI20 default config.
Signed-off-by: PrasannaKumar Muralidharan
---
arch/mips/configs/ci20_defconfig | 5 +
1 file changed, 5 insertions(+)
diff --git a/arch/mips/configs/ci20_defconfig b/arch/mips/configs/ci20_defconfig
index b42cfa7..9f48f2c
Add myself as the maintainer of JZ4780 SoC's PRNG drvier.
Signed-off-by: PrasannaKumar Muralidharan
---
MAINTAINERS | 5 +
1 file changed, 5 insertions(+)
diff --git a/MAINTAINERS b/MAINTAINERS
index 45ec467..ee8c6f6 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -6733,6 +6733,11
Hi Stephan,
On 18 August 2017 at 00:22, Stephan Mueller wrote:
> Am Donnerstag, 17. August 2017, 20:25:17 CEST schrieb PrasannaKumar
> Muralidharan:
>
> Hi PrasannaKumar,
>
>> +
>> +static int jz4780_rng_generate(struct crypto_rng *tfm,
>> +
Hi Paul,
Thanks for your review.
On 19 August 2017 at 02:18, Paul Burton wrote:
> Hi PrasannaKumar,
>
> On Thursday, 17 August 2017 11:25:16 PDT PrasannaKumar Muralidharan wrote:
>> Ingenic PRNG registers are a part of the same hardware block as clock
>> and power stuff.
There is no need to use rng-tools for feeding random data into kernel
entropy pool as hw_random core handles it. Documentation suggested that
rng-tools is required which is incorrect. So remove it.
Signed-off-by: PrasannaKumar Muralidharan
---
Documentation/hw_random.txt | 4
1 file
In read routiene max is always >= 4. The check whether 'max < 4' is not
necessary. Remove it.
Signed-off-by: PrasannaKumar Muralidharan
---
drivers/char/hw_random/timeriomem-rng.c | 7 ---
1 file changed, 7 deletions(-)
diff --git a/drivers/char/hw_random/timeriomem-rng.c
Add RNG node to jz4780 dtsi. This driver uses registers that are part of
the register set used by Ingenic CGU driver. Make RNG node as child of
CGU node.
Signed-off-by: PrasannaKumar Muralidharan
---
Changes in v2:
* Add "syscon" in CGU node's compatible section
* Make RNG ch
Add devicetree bindings for hardware pseudo random number generator
present in Ingenic JZ4780 SoC.
Signed-off-by: PrasannaKumar Muralidharan
---
Changes in v2:
* Add "syscon" in CGU node's compatible section
* Make RNG child node of CGU.
.../bindings/crypto/ingenic
JZ4780 SoC pseudo random number generator driver using crypto framework.
Adding a delay before reading RNG data and disabling RNG after reading
data was suggested by Jeffery Walton.
Tested-by: Mathieu Malaterre
Suggested-by: Jeffrey Walton
Signed-off-by: PrasannaKumar Muralidharan
---
Changes
s. CGU driver is not modified in this patch
set as registers used by CGU driver and this driver are different.
PrasannaKumar Muralidharan (4):
crypto: jz4780-rng: Add JZ4780 PRNG devicetree binding documentation
crypto: jz4780-rng: Add Ingenic JZ4780 hardware PRNG driver
crypto: jz4780-rng: Ad
Enable PRNG driver support in MIPS Creator CI20 default config.
Signed-off-by: PrasannaKumar Muralidharan
---
No changes in v2
arch/mips/configs/ci20_defconfig | 5 +
1 file changed, 5 insertions(+)
diff --git a/arch/mips/configs/ci20_defconfig b/arch/mips/configs/ci20_defconfig
index
Hi Rick,
On 22 August 2017 at 22:23, Rick Altherr wrote:
> On Tue, Aug 22, 2017 at 9:22 AM, PrasannaKumar Muralidharan
> wrote:
>>
>> In read routiene max is always >= 4. The check whether 'max < 4' is not
>> necessary. Remove it.
>
> Missed tha
Hi Harvey,
On 23 August 2017 at 14:39, Harvey Hunt wrote:
> Hi PrasannaKumar,
>
> On 23/08/17 03:57, PrasannaKumar Muralidharan wrote:
>>
>> Enable PRNG driver support in MIPS Creator CI20 default config.
>>
>> Signed-off-by: PrasannaKumar Muralidharan
>&g
Samsung exynos PRNG driver is using crypto framework instead of
hw_random framework. So move the devicetree binding to crypto folder.
Signed-off-by: PrasannaKumar Muralidharan
---
Changes in v2:
* Modify MAINTAINERS file to reflect file rename
.../devicetree/bindings/{rng => crypto}/sams
Hi Harvey,
On 23 August 2017 at 20:21, Harvey Hunt wrote:
> Hi PrasannaKumar,
>
>
> On 23/08/17 15:50, PrasannaKumar Muralidharan wrote:
>>
>> Hi Harvey,
>>
>> On 23 August 2017 at 14:39, Harvey Hunt wrote:
>>>
>>> Hi PrasannaKumar,
>&
Hi Krzysztof,
On 23 August 2017 at 21:42, Krzysztof Kozlowski wrote:
> On Wed, Aug 23, 2017 at 08:34:43PM +0530, PrasannaKumar Muralidharan wrote:
>> Samsung exynos PRNG driver is using crypto framework instead of
>> hw_random framework. So move the devicetree binding t
On 23 August 2017 at 22:24, Krzysztof Kozlowski wrote:
> On Wed, Aug 23, 2017 at 10:14:29PM +0530, PrasannaKumar Muralidharan wrote:
>> Hi Krzysztof,
>>
>> On 23 August 2017 at 21:42, Krzysztof Kozlowski wrote:
>> > On Wed, Aug 23, 2017 at 08:34:43PM +0530, Pr
Hi Rob,
On 26 August 2017 at 03:27, Rob Herring wrote:
> On Wed, Aug 23, 2017 at 08:27:04AM +0530, PrasannaKumar Muralidharan wrote:
>> Add devicetree bindings for hardware pseudo random number generator
>> present in Ingenic JZ4780 SoC.
>>
>> Signed-off-by:
On 23 August 2017 at 08:27, PrasannaKumar Muralidharan
wrote:
> This patch series adds support of pseudo random number generator found
> in Ingenic's JZ4780 and X1000 SoC.
>
> Based on Paul's review comments, add 'syscon' compatible in CGU node in
> jz4780.
Hi Peter,
On 5 September 2017 7:24:02 PM IST, Peter Huewe wrote:
>Hi,
>
>while reading through the analysis of the Linux RNG by the BSI [1][2],
>I was suprised by the lack of reflecting on the usage of HWRNGs except
>RDRAND/RDSEED.
>
>In the paper it was mentioned that if the quality attribute
RNG device is registered as soon as tpm-rng module is loaded even if
there are no TPM chip available. Call hwrng_register once tpm chip has
registered.
Signed-off-by: PrasannaKumar Muralidharan
---
drivers/char/hw_random/tpm-rng.c | 50
drivers/char/tpm
Add devicetree bindings for hardware pseudo random number generator
present in Ingenic JZ4780 SoC.
Signed-off-by: PrasannaKumar Muralidharan
---
Changes in v3:
* Create a cgublock node with "simple-bus" compatible
* Make CGU and RNG node as children of cgublock node.
Cha
CGU driver. Add 'syscon' compatible in
CGU node in jz4780.dtsi. The jz4780-rng driver uses regmap exposed via
syscon interface to access the RNG registers. CGU driver is not
modified in this patch set as registers used by CGU driver and this
driver are different.
PrasannaKumar Muralidharan
JZ4780 SoC pseudo random number generator driver using crypto framework.
Adding a delay before reading RNG data and disabling RNG after reading
data was suggested by Jeffery Walton.
Tested-by: Mathieu Malaterre
Suggested-by: Jeffrey Walton
Signed-off-by: PrasannaKumar Muralidharan
---
Changes
Enable PRNG driver support in MIPS Creator CI20 default config.
Signed-off-by: PrasannaKumar Muralidharan
---
No changes in v3
No changes in v2
arch/mips/configs/ci20_defconfig | 5 +
1 file changed, 5 insertions(+)
diff --git a/arch/mips/configs/ci20_defconfig b/arch/mips/configs
river code.
Signed-off-by: PrasannaKumar Muralidharan
---
Changes in v3:
* Create a cgublock node with "simple-bus" compatible
* Make CGU and RNG node as children of cgublock node.
Changes in v2:
* Add "syscon&
Hi Herbert,
On 22 September 2017 at 14:47, Herbert Xu wrote:
> PrasannaKumar Muralidharan wrote:
>> There is no need to use rng-tools for feeding random data into kernel
>> entropy pool as hw_random core handles it. Documentation suggested that
>> rng-tools is required w
Hi Herbert,
On 7 October 2017 at 09:03, Herbert Xu wrote:
> Mathieu Malaterre wrote:
>> This makes it simplier for driver author to not provide the seed() function
>> in case of a pseudo RNG where the seed operation is a no-op.
>>
>> Document that the seed() function pointer is optional in heade
Hi Herbert,
On 12 October 2017 at 20:00, Herbert Xu wrote:
> On Mon, Sep 18, 2017 at 07:32:37PM +0530, PrasannaKumar Muralidharan wrote:
>> This patch series adds support of pseudo random number generator found
>> in Ingenic's JZ4780 and X1000 SoC.
>>
>> Create
On 24 October 2017 at 21:14, Jarkko Sakkinen
wrote:
> On Mon, Oct 23, 2017 at 10:31:39AM -0600, Jason Gunthorpe wrote:
>> On Mon, Oct 23, 2017 at 10:07:31AM -0400, Stefan Berger wrote:
>>
>> > >-int tpm_pcr_extend(u32 chip_num, int pcr_idx, const u8 *hash)
>> > >+int tpm_pcr_extend(int pcr_idx, co
Hi Jason,
On 24 October 2017 at 21:25, Jason Gunthorpe
wrote:
> On Tue, Oct 24, 2017 at 09:21:15PM +0530, PrasannaKumar Muralidharan wrote:
>
>> Please check the RFC [1]. It does use chip id. The rfc has issues and
>> has to be fixed but still there could be users of the A
On 24 October 2017 at 21:41, Jason Gunthorpe
wrote:
> On Tue, Oct 24, 2017 at 09:37:33PM +0530, PrasannaKumar Muralidharan wrote:
>> Hi Jason,
>>
>> On 24 October 2017 at 21:25, Jason Gunthorpe
>> wrote:
>> > On Tue, Oct 24, 2017 at 09:21:15PM +05
On 24 October 2017 at 21:53, Jarkko Sakkinen
wrote:
> On Tue, Oct 24, 2017 at 09:21:15PM +0530, PrasannaKumar Muralidharan wrote:
>> On 24 October 2017 at 21:14, Jarkko Sakkinen
>> wrote:
>> > On Mon, Oct 23, 2017 at 10:31:39AM -0600, Jason Gunthorpe wrote:
>> &g
On 24 October 2017 at 23:07, Jason Gunthorpe
wrote:
> On Tue, Oct 24, 2017 at 10:02:00AM -0700, Dmitry Torokhov wrote:
>> tpm-rng is abomination that should be kicked out as soon as possible.
>> It wrecks havoc with the power management (TPM chip drivers may go
>> into suspend state, but tpm_rng d
Hi Jason,
On 24 October 2017 at 23:16, Jason Gunthorpe
wrote:
> On Tue, Oct 24, 2017 at 09:44:30PM +0530, PrasannaKumar Muralidharan wrote:
>
>> I am wondering why it is wrong. Isn't the chip id valid till it is
>> unregistered? If so the rfc is correct. Please explain,
d entropy from the TPM when it is plugged in,
> and allow access to the TPM rng via /dev/hwrng.
>
> Signed-off-by: PrasannaKumar Muralidharan
> Signed-off-by: Jason Gunthorpe
> Reviewed-by: Jason Gunthorpe
> ---
> drivers/char/hw_random/Kconfig | 13 ---
> driv
Hi Jarkko,
On 24 October 2017 at 23:52, Jarkko Sakkinen
wrote:
> On Tue, Oct 24, 2017 at 10:05:20PM +0530, PrasannaKumar Muralidharan wrote:
>> > 1. Every user in the kernel is using TPM_ANY_NUM, which means there are
>> >no other users.
>>
>> Completely
Hi Jarkko,
On 25 October 2017 at 17:25, Jarkko Sakkinen
wrote:
> Device number (the character device index) is not a stable identifier
> for a TPM chip. That is the reason why every call site passes
> TPM_ANY_NUM to tpm_chip_find_get().
>
> This commit changes the API in a way that instead a stru
Hi Jason,
On 25 October 2017 at 20:48, Jason Gunthorpe
wrote:
> On Wed, Oct 25, 2017 at 08:15:09PM +0530, PrasannaKumar Muralidharan
> wrote:
>
>> > +static int tpm_add_hwrng(struct tpm_chip *chip)
>> > +{
>> > + if (!IS_ENABLED(CONFIG_HW_RANDOM
Include linux/device.h instead of declaring struct device.
Signed-off-by: PrasannaKumar Muralidharan
---
include/linux/hw_random.h | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/include/linux/hw_random.h b/include/linux/hw_random.h
index bee0827..2ec9af7 100644
--- a
);
> + ret = trusted_tpm_send(tb->data, MAX_BUF_SIZE);
> if (ret < 0) {
> pr_info("trusted_key: authhmac failed (%d)\n", ret);
> return ret;
> @@ -748,7 +747,7 @@ static int getoptions(char *c, struct trusted_key_payload
> *pa
This patch series rearranges functions such that forward declarations
becomes unnecessary. Remove those forward declaration.
This patch series is boot tested without user space in qemu with
CONFIG_HW_RANDOM=y.
PrasannaKumar Muralidharan (4):
hw_random: core: Remove forward declaration by
Rearrange drop_current_rng such that its forward declaration is not
required.
Signed-off-by: PrasannaKumar Muralidharan
---
drivers/char/hw_random/core.c | 23 +++
1 file changed, 11 insertions(+), 12 deletions(-)
diff --git a/drivers/char/hw_random/core.c b/drivers/char
Rearrange start_khwrngd such that its forward declaration is not
required.
Signed-off-by: PrasannaKumar Muralidharan
---
drivers/char/hw_random/core.c | 75 +--
1 file changed, 37 insertions(+), 38 deletions(-)
diff --git a/drivers/char/hw_random/core.c
Rearrange set_current_rng such that hwrng_init's forward declaration can
be removed.
Signed-off-by: PrasannaKumar Muralidharan
---
drivers/char/hw_random/core.c | 34 --
1 file changed, 16 insertions(+), 18 deletions(-)
diff --git a/drivers/char/hw_random/c
Rearrange rng_get_data such that its forward declaration is not
required.
Signed-off-by: PrasannaKumar Muralidharan
---
drivers/char/hw_random/core.c | 41 +++--
1 file changed, 19 insertions(+), 22 deletions(-)
diff --git a/drivers/char/hw_random/core.c b
On 26 October 2017 at 00:41, Jarkko Sakkinen
wrote:
> On Wed, Oct 25, 2017 at 08:21:16PM +0530, PrasannaKumar Muralidharan wrote:
>> >> > 2. Moving struct tpm_rng to the TPM client is architecturally
>> >> >uacceptable.
>> >>
>> >> As t
On 26 October 2017 at 21:39, Jarkko Sakkinen
wrote:
> On Thu, Oct 26, 2017 at 07:40:49PM +0530, PrasannaKumar Muralidharan wrote:
>> Hi Jarkko,
>>
>> On 26 October 2017 at 19:24, Jarkko Sakkinen
>> wrote:
>> > Device number (the character device index) is no
While using MODULE_PARM_DESC there is a new line which is not required.
Remove it.
Signed-off-by: PrasannaKumar Muralidharan
---
drivers/char/hw_random/core.c | 7 +++
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/drivers/char/hw_random/core.c b/drivers/char/hw_random/core.c
Hi David,
On 26 October 2017 at 22:18, David Daney wrote:
> On 10/26/2017 08:34 AM, PrasannaKumar Muralidharan wrote:
>>
>> This patch series rearranges functions such that forward declarations
>> becomes unnecessary. Remove those forward declaration.
>
>
> Why?
&
User is able to select a chosen rng by writing its name to rng_current
but there is no way to reset it without unbinding the rng. Let user
write "" to rng_current and delesect the chosen rng.
Signed-off-by: PrasannaKumar Muralidharan
---
drivers/char/hw_random/c
Hi Harald,
On 30 October 2017 at 13:40, Harald Freudenberger
wrote:
> That's a really good idea. I also thought about something like that.
Do you mind reviewing the code?
Thanks,
PrasannaKumar
Hi Herbert,
On 30 October 2017 at 12:22, Herbert Xu wrote:
> On Thu, Oct 26, 2017 at 07:12:08PM +0530, PrasannaKumar Muralidharan wrote:
>> Include linux/device.h instead of declaring struct device.
>>
>> Signed-off-by: PrasannaKumar Muralidharan
>
> Nack. We shoul
Hi Herbert,
On 30 October 2017 at 12:23, Herbert Xu wrote:
> On Thu, Oct 26, 2017 at 10:00:29PM +0530, PrasannaKumar Muralidharan wrote:
>> While using MODULE_PARM_DESC there is a new line which is not required.
>> Remove it.
>>
>> Signed-off-by: PrasannaKumar Mu
Hi Harald,
On 30 October 2017 at 18:58, Harald Freudenberger
wrote:
> On 10/27/2017 07:04 PM, PrasannaKumar Muralidharan wrote:
>> User is able to select a chosen rng by writing its name to rng_current
>> but there is no way to reset it without unbinding the rng. Let user
Hi Jim,
On 3 November 2017 at 15:27, Jim Quigley wrote:
> The patch for
>
> commit: 5c06273401f2eb7b290cadbae18ee00f8f65e893
> Author: Amit Shah
> Date: Sun Jul 27 07:34:01 2014 +0930
>
> virtio: rng: delay hwrng_register() till driver is ready
>
> moved the call to hwrng_register() out of
Did reply instead of reply all. Forwarding my previous message.
-- Forwarded message --
From: PrasannaKumar Muralidharan
Date: 3 November 2017 at 20:19
Subject: Re: virtio:rng: Virtio RNG devices need to be re-registered
after suspend/resume
To: Jim Quigley
Hi Jim,
On 3
Hi Jim,
Have second thoughts on this.
On 3 November 2017 at 20:55, PrasannaKumar Muralidharan
wrote:
>>
>> It would be cleaner to just get rid of probe_common() altogether in that
>> case, and do whatever
>> needs to be done in virtrng_probe()/virtrng_res
it has no effect.
> + err = hwrng_register(&vi->hwrng);
> + if (!err) {
> + vi->hwrng_register_done = true;
> + vi->hwrng_removed = false;
> + }
> + }
> +
> + return err;
> }
> #endif
>
> --
> 1.8.3.1
>
I am fine with this change as is. Reviewed-by: PrasannaKumar
Muralidharan
Regards,
PrasannaKumar
Hi Herbert,
On 6 November 2017 at 12:39, Herbert Xu wrote:
> On Fri, Nov 03, 2017 at 09:57:21AM +, Jim Quigley wrote:
>> moved the call to hwrng_register() out of the probe routine into the scan
>> routine. We need to call hwrng_register() after a suspend/restore cycle
>> to re-register the d
Hi Jason,
On 6 November 2017 at 07:57, Jason Gunthorpe wrote:
> On Sun, Nov 05, 2017 at 01:05:06PM +0200, Jarkko Sakkinen wrote:
>
>> I asked to create a series for a reason. Now this doesn't apply because I
>> don't have an ancestor in my git history.
>
> It would be unusual for me to put your p
Hi Jason,
On 7 November 2017 at 21:34, Jason Gunthorpe wrote:
> On Tue, Nov 07, 2017 at 08:50:44AM +0530, PrasannaKumar Muralidharan wrote:
>
>> I am assuming you are talking about the following patches - using
>> struct tpm_chip instead of chip number and this patch.
>
Did basic check on tpm rng patch, it works fine. As it depends on this
patch this should be working fine too.
Tested-by: PrasannaKumar Muralidharan
Regards,
PrasannaKumar
Hi Jason,
On 9 November 2017 at 21:59, Jason Gunthorpe wrote:
> On Thu, Nov 09, 2017 at 09:49:33PM +0530, PrasannaKumar Muralidharan wrote:
>> Hi Jason,
>>
>> On 7 November 2017 at 21:34, Jason Gunthorpe wrote:
>> > On Tue, Nov 07, 2017 at 08:50:44AM +0530, Pr
Would you mind sending the patch using 'git send-email'? Kernel
community does not accept attachments.
Regards,
PrasannaKumar
if (crypto_get_default_rng())
> - err = -EFAULT;
> + return -EFAULT;
>
> err = crypto_rng_get_bytes(crypto_default_rng, (u8 *)priv, nbytes);
> crypto_put_default_rng();
> --
> 2.15.0
>
Looks good to me.
Reviewed-by: PrasannaKumar Muralidharan
Regards,
PrasannaKumar
579,7 @@ static int hifn_probe(struct pci_dev *pdev, const
> struct pci_device_id *id)
> for (i = 0; i < 3; ++i)
> if (dev->bar[i])
> iounmap(dev->bar[i]);
> + kfree(dev);
>
> err_out_free_regions:
> pci_release_regions(pdev);
> --
> 2.14.1
>
Nice catch.
Reviewed-by: PrasannaKumar Muralidharan
Regards,
PrasannaKumar
Hi Lukasz,
Some minor comments below.
On 23 November 2017 at 20:39, Łukasz Stelmach wrote:
> Add support for True Random Number Generator found in Samsung Exynos
> 5250+ SoCs.
>
> Signed-off-by: Łukasz Stelmach
> ---
> MAINTAINERS | 7 +
> drivers/char/hw_random/Kcon
On 24 November 2017 at 20:55, PrasannaKumar Muralidharan
wrote:
> Hi Lukasz,
>
> Some minor comments below.
>
> On 23 November 2017 at 20:39, Łukasz Stelmach wrote:
>> Add support for True Random Number Generator found in Samsung Exynos
>> 5250+ SoCs.
>>
Hi Ralf,
On 12 October 2017 at 22:59, PrasannaKumar Muralidharan
wrote:
> Hi Herbert,
>
> On 12 October 2017 at 20:00, Herbert Xu wrote:
>> On Mon, Sep 18, 2017 at 07:32:37PM +0530, PrasannaKumar Muralidharan wrote:
>>> This patch series adds support of pseudo rando
return 0;
> +}
> +
> +static int __maybe_unused exynos_trng_resume(struct device *dev)
> +{
> + int ret;
> +
> + ret = pm_runtime_get_sync(dev);
> + if (ret < 0) {
> + dev_err(dev, "Could not get runtime PM.\n");
> + pm_runtime_put_noidle(dev);
> + return ret;
> + }
> +
> + return 0;
> +}
> +
> +static SIMPLE_DEV_PM_OPS(exynos_trng_pm_ops, exynos_trng_suspend,
> +exynos_trng_resume);
> +
> +static const struct of_device_id exynos_trng_dt_match[] = {
> + {
> + .compatible = "samsung,exynos5250-trng",
> + },
> + { },
> +};
> +MODULE_DEVICE_TABLE(of, exynos_rng_dt_match);
> +
> +static struct platform_driver exynos_trng_driver = {
> + .driver = {
> + .name = "exynos-trng",
> + .pm = &exynos_trng_pm_ops,
> + .of_match_table = exynos_trng_dt_match,
> + },
> + .probe = exynos_trng_probe,
> + .remove = exynos_trng_remove,
> +};
> +
> +module_platform_driver(exynos_trng_driver);
> +MODULE_AUTHOR("Łukasz Stelmach");
> +MODULE_DESCRIPTION("H/W TRNG driver for Exynos chips");
> +MODULE_LICENSE("GPL");
> --
> 2.11.0
>
Reviewed-by: PrasannaKumar Muralidharan
Regards,
PrasannaKumar
Hi Gary,
Some minor comments below.
On 16 December 2017 at 01:25, Gary R Hook wrote:
>
> Commit 142a27f0a731 added support for a "best" RNG, and in doing so
> introduced a hang from rmmod/modprobe -r when the last RNG on the list
> was unloaded.
Nice catch. Thanks for fixing this.
> When the h
On 17 December 2017 at 14:53, PrasannaKumar Muralidharan
wrote:
> Hi Gary,
>
> Some minor comments below.
>
> On 16 December 2017 at 01:25, Gary R Hook wrote:
>>
>> Commit 142a27f0a731 added support for a "best" RNG, and in doing so
>> introduced a ha
Hi Ard,
On 21 December 2017 at 17:52, Ard Biesheuvel wrote:
> On 21 December 2017 at 10:20, Arnd Bergmann wrote:
>> On Wed, Dec 20, 2017 at 10:46 PM, Jakub Jelinek wrote:
>>> On Wed, Dec 20, 2017 at 09:52:05PM +0100, Arnd Bergmann wrote:
diff --git a/crypto/aes_generic.c b/crypto/aes_gener
This patch adds support for hardware random number generator present in
JZ4780 SoC.
Signed-off-by: PrasannaKumar Muralidharan
---
.../devicetree/bindings/rng/ingenic,jz4780-rng.txt | 12 +++
MAINTAINERS| 5 +
arch/mips/boot/dts/ingenic/jz4780.dtsi
On 17 August 2016 at 21:31, Daniel Thompson wrote:
> On 17/08/16 16:35, PrasannaKumar Muralidharan wrote:
>>
>> This patch adds support for hardware random number generator present in
>> JZ4780 SoC.
>>
>> Signed-off-by: PrasannaKumar Muralidharan
>> ---
w_random/jz4780-rng.c
>> @@ -0,0 +1,105 @@
>> +/*
>> + * jz4780-rng.c - Random Number Generator driver for J4780
>> + *
>> + * Copyright 2016 (C) PrasannaKumar Muralidharan
>>
>> + *
>> + * This file is licensed under the terms of the GNU General Public
&g
> Please forgive my ignorance Prasanna...
>
> For the JZ4780 I have, there are two registers in play. The first is
> the control register which enables/disables the RNG. The control
> register is named ERNG. The second register is the data register, and
> it produces the random stream. The data reg
> __ARM_FEATURE_UNALIGNED (cf.,
> http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.dui0774f/chr1383660321827.html)
> . MIPSEL does not define such a macro.
>
> # MIPS ci20 creator with GCC 4.6
> $ gcc -march=native -dM -E - #define __BIGGEST_ALIGNMENT__ 8
>
> If the MIPS CPU
Remove omap3_rom_rng_data_present method as it was returning 1 always.
Use .read callback instead of .data_read callback. This avoids use of
obsolete callbacks.
This patch is not tested with hardware as I don't have access to it.
Signed-off-by: PrasannaKumar Muralidharan
---
drivers
Use devm_ioremap and devm_hwrng_register instead of ioremap and
hwrng_register. This removes unregistering and error handling code.
This patch is not tested with hardware as I don't have access to it.
Signed-off-by: PrasannaKumar Muralidharan
---
drivers/char/hw_random/pasemi-rng.c
> I will propose to use devm_ioremap_resource() instead for removing this
> hardcoded 0x100, but i cannot find any user of this driver in any dts. (And
> so cannot check that this 0x100 is given in any DT resource node)
>
> Is this normal ?
I wanted to use devm_ioremap_resource but could not fin
HW RNG core never asks for data less than 4 bytes. The check whether max
is less than 4 bytes is unnecessary. Remove the check.
Signed-off-by: PrasannaKumar Muralidharan
---
drivers/char/hw_random/meson-rng.c | 3 ---
drivers/char/hw_random/st-rng.c| 3 ---
2 files changed, 6 deletions
Add devicetree bindings for hardware random number generator present in
Ingenic JZ4780 SoC.
Signed-off-by: PrasannaKumar Muralidharan
Acked-by: Rob Herring
---
Documentation/devicetree/bindings/rng/ingenic,jz4780-rng.txt | 12
1 file changed, 12 insertions(+)
create mode 100644
This is the v2 patch series that adds support for random number generator
present in Ingenic JZ4780 SoC.
Patch 1: Add device tree bindings for RNG in JZ4780 SoC.
Patch 2: Add Ingenic JZ4780 hardware RNG driver.
Patch 3: Add RNG to jz4780.dtsi.
Patch 4: Enable RNG in ci20_defconfig
PrasannaKumar
This patch enables the usage of RNG in MIPS Creator CI20 default config.
Signed-off-by: PrasannaKumar Muralidharan
---
arch/mips/configs/ci20_defconfig | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/arch/mips/configs/ci20_defconfig b/arch/mips/configs/ci20_defconfig
This patch adds RNG node to jz4780.dtsi.
Signed-off-by: PrasannaKumar Muralidharan
---
arch/mips/boot/dts/ingenic/jz4780.dtsi | 7 ++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/arch/mips/boot/dts/ingenic/jz4780.dtsi
b/arch/mips/boot/dts/ingenic/jz4780.dtsi
index b868b42
1 - 100 of 153 matches
Mail list logo