linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Theodore Ts'o" <tytso@mit.edu>
To: "Dilger, Andreas" <andreas.dilger@intel.com>
Cc: Greg KH <greg@kroah.com>, Peng Tao <tao.peng@emc.com>,
	"devel@driverdev.osuosl.org" <devel@driverdev.osuosl.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: lustre: why does cfs_get_random_bytes() exist?
Date: Sat, 5 Oct 2013 10:21:21 -0400	[thread overview]
Message-ID: <20131005142121.GA22773@thunk.org> (raw)
In-Reply-To: <CE750681.752DF%andreas.dilger@intel.com>

On Sat, Oct 05, 2013 at 06:10:54AM +0000, Dilger, Andreas wrote:
> >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.

add_device_randomness() is called from __dev_open() and
dev_set_mac_address() in net/core/dev.c.  This is above the ethernet
and infiniband level.  So as long as it looks like a Linux network
device, and they are setting the hardware media access address in the
standard place (dev->dev_addr), it should work fine.

If they don't then they should fix their drivers to call
add_device_randomness(); the answer shouldn't be to make every single
users of the Linux random number generation infrastructure work around
the problem at the subsystem or file system level!

						- Ted

  reply	other threads:[~2013-10-05 14:21 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-10-03 16:39 lustre: why does cfs_get_random_bytes() exist? Theodore Ts'o
2013-10-03 17:26 ` Greg KH
2013-10-03 19:34   ` Theodore Ts'o
2013-10-03 23:06     ` Dilger, Andreas
2013-10-03 23:45       ` Theodore Ts'o
2013-10-05  6:10         ` Dilger, Andreas
2013-10-05 14:21           ` Theodore Ts'o [this message]
2013-10-05 15:51             ` Christoph Hellwig

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20131005142121.GA22773@thunk.org \
    --to=tytso@mit.edu \
    --cc=andreas.dilger@intel.com \
    --cc=devel@driverdev.osuosl.org \
    --cc=greg@kroah.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tao.peng@emc.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).