[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CE750681.752DF%andreas.dilger@intel.com>
Date: Sat, 5 Oct 2013 06:10:54 +0000
From: "Dilger, Andreas" <andreas.dilger@...el.com>
To: Theodore Ts'o <tytso@....edu>
CC: Greg KH <greg@...ah.com>, Peng Tao <tao.peng@....com>,
"devel@...verdev.osuosl.org" <devel@...verdev.osuosl.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: lustre: why does cfs_get_random_bytes() exist?
On 2013/10/03 5:45 PM, "Theodore Ts'o" <tytso@....edu> wrote:
>On Thu, Oct 03, 2013 at 11:06:58PM +0000, Dilger, Andreas wrote:
>>
>> The Lustre cfs_get_random_bytes() incorporates (via cfs_rand()) a seed
>> which also hashes in the addresses from any network interfaces that are
>> configured.
>> Conversely, cfs_rand() also is seeded at startup from
>>get_random_bytes() in
>> case a hardware RNG is available. This ensures even with identical
>>initial
>> conditions cfs_get_random_bytes() gets a different random stream on each
>> node.
>
>With modern kernels, the /dev/random driver has the
>add_device_randomness() interface which is used to mix in
>personalization information, which includes the network MAC address.
>So that particular concern should be covered without the hack of
>mixing in cfs_rand().
I think that depends on the network driver. The Cray systems have some
very strange networking hardware that is beyond our control - definitely
not ethernet or Infiniband.
I'll have to ask the Cray folks if their network drivers do this today.
>> I'm not against cleaning this up, if there is some mechanism for the
>> startup code to add in the node interface addresses into the entropy
>> pool, and this is also used to perturb the prandom_u32() sequence
>> after that point.
>
>That's handled too, via the late initcall prandom_reseed().
>
>Cheers,
>
> - Ted
>
Cheers, Andreas
--
Andreas Dilger
Lustre Software Architect
Intel High Performance Data Division
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists