search for: rng_seed_kernel

Displaying 7 results from an estimated 7 matches for "rng_seed_kernel".

2014 Jul 11
1
[RFC PATCH] hwrng: sysfs entry rng_seed_kernel, was: "Re: [PATCH v2 1/2] hwrng: fetch randomness only after device init"
...> > > The advantage is that users don't need to have rngd installed and > > running on the system in order to jump-start the entropy pool. > > ... so a udev rule that looks for the new sysfs file, and asks the > kernel to do its thing? Or, as simple as: [ -e /sys/.../rng_seed_kernel ] && echo "0" >/sys/.../rng_seed_kernel in the initrd. It needs to run *before* any init scripts which may create keys. > And maybe even a patch to rngd that looks for this file and does a > similar thing? I'm not opposed to that, but it doesn't fit the proble...
2014 Jul 11
1
[RFC PATCH] hwrng: sysfs entry rng_seed_kernel, was: "Re: [PATCH v2 1/2] hwrng: fetch randomness only after device init"
...> > > The advantage is that users don't need to have rngd installed and > > running on the system in order to jump-start the entropy pool. > > ... so a udev rule that looks for the new sysfs file, and asks the > kernel to do its thing? Or, as simple as: [ -e /sys/.../rng_seed_kernel ] && echo "0" >/sys/.../rng_seed_kernel in the initrd. It needs to run *before* any init scripts which may create keys. > And maybe even a patch to rngd that looks for this file and does a > similar thing? I'm not opposed to that, but it doesn't fit the proble...
2014 Jul 09
2
[RFC PATCH] hwrng: sysfs entry rng_seed_kernel, was: "Re: [PATCH v2 1/2] hwrng: fetch randomness only after device init"
...return ret; - add_early_randomness(rng); + add_early_randomness(rng, 0); return ret; } @@ -281,18 +292,54 @@ static ssize_t hwrng_attr_available_show(struct device *dev, return ret; } +/* + * seed the kernel's entropy pool from the current hwrng. + * + * 'echo "n" >rng_seed_kernel', where n >= 0. + * n = 0: default size added (16 bytes) + * 0 < n <= 256: n bytes added. + * n > 256: 256 bytes added. + */ +static ssize_t hwrng_attr_seed_store(struct device *dev, + struct device_attribute *attr, + const char *buf, size_t len) +{ + int err;...
2014 Jul 09
2
[RFC PATCH] hwrng: sysfs entry rng_seed_kernel, was: "Re: [PATCH v2 1/2] hwrng: fetch randomness only after device init"
...return ret; - add_early_randomness(rng); + add_early_randomness(rng, 0); return ret; } @@ -281,18 +292,54 @@ static ssize_t hwrng_attr_available_show(struct device *dev, return ret; } +/* + * seed the kernel's entropy pool from the current hwrng. + * + * 'echo "n" >rng_seed_kernel', where n >= 0. + * n = 0: default size added (16 bytes) + * 0 < n <= 256: n bytes added. + * n > 256: 256 bytes added. + */ +static ssize_t hwrng_attr_seed_store(struct device *dev, + struct device_attribute *attr, + const char *buf, size_t len) +{ + int err;...
2014 Jul 11
0
[RFC PATCH] hwrng: sysfs entry rng_seed_kernel, was: "Re: [PATCH v2 1/2] hwrng: fetch randomness only after device init"
On (Wed) 09 Jul 2014 [12:07:25], Jason Cooper wrote: > Amit, Kees, (snip) > I'm cooling to the idea of the init function for virtio-rng, and it > might be best just to admit that there's no way to seed the entropy pool > from the virtio-rng at probe time. After all, once userspace is up, the > system should take advantage of /dev/hwrng for the generation of > long-term
2014 Jul 09
2
[PATCH v2 1/2] hwrng: fetch randomness only after device init
On Wed, Jul 09, 2014 at 06:38:22PM +0530, Amit Shah wrote: > On (Wed) 09 Jul 2014 [07:53:17], Jason Cooper wrote: > > On Sat, Jul 05, 2014 at 11:04:52AM +0530, Amit Shah wrote: > > > Commit d9e7972619334 "hwrng: add randomness to system from rng sources" > > > added a call to rng_get_data() from the hwrng_register() function. > > > However, some rng
2014 Jul 09
2
[PATCH v2 1/2] hwrng: fetch randomness only after device init
On Wed, Jul 09, 2014 at 06:38:22PM +0530, Amit Shah wrote: > On (Wed) 09 Jul 2014 [07:53:17], Jason Cooper wrote: > > On Sat, Jul 05, 2014 at 11:04:52AM +0530, Amit Shah wrote: > > > Commit d9e7972619334 "hwrng: add randomness to system from rng sources" > > > added a call to rng_get_data() from the hwrng_register() function. > > > However, some rng