Re: [patch 2/2] ssh-client: add urandom seeding

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 10/12/2012 03:58 AM, Vivek Goyal wrote:

> On Thu, Oct 11, 2012 at 10:16:01AM +0200, Harald Hoyer wrote:
>> Hmm, wouldn't that mean, that the generator is seeded with the _same_ seed on
>> every reboot?
>> How is this different from booting with no seed at all?
> 
> Atleast it can help with kdump where we might regenerate the initramfs
> upon user config change and capture the new seed.
> 
> Also kdump does not happen often on the machine. So I guess for once in 
> a while operation it is still better to use random-seed then not using
> anything at all.


For normal boot case, I think something like
systemd-random-seed-load.service is fine because rootfs is always
mounted in initramfs. But I'm not sure how to handle the mount issue if
/var/lib if mounted to another partition.

Or simply add below to pre-pivot hook:

if [ -f /proc/vmcore ]; then
    cat /var/lib/random-seed > /dev/urandom
else
    if [ -f /sysroot/var/lib/random-seed ]; then
        cat /sysroot/var/lib/random-seed > /dev/urandom
    fi
fi

Harald, what do you think?

> 
> Thanks
> Vivek



-- 
Thanks
Dave
--
To unsubscribe from this list: send the line "unsubscribe initramfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux SCSI]

  Powered by Linux