public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Matt Mackall <mpm@selenic.com>
To: "Bob O'Neill" <rmoneill@gmail.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: reading the same entropy twice
Date: Tue, 22 Feb 2005 22:39:41 -0800	[thread overview]
Message-ID: <20050223063940.GD3163@waste.org> (raw)
In-Reply-To: <4b325ef050222135529a2584a@mail.gmail.com>

On Tue, Feb 22, 2005 at 04:55:39PM -0500, Bob O'Neill wrote:
> Hello.
> 
> I have noticed that it is possible on an SMP box for two processes to
> simultaneously read the same entropy out of /dev/urandom.  This
> doesn't seem right to me.  I was using the entropy value to generate a
> random number to use as a session ID, so occasionally there would be a
> collision on session IDs, causing a login failure as session IDs are
> required to be unique.  This issue does not appear to be related to
> entropy depletion.
> 
> Could you provide me with some insight into why this is the case, if
> it is intentional?  It seems like it could be addressed with a
> spinlock.

This should be fixed in current kernels.

-- 
Mathematics is the supreme nostalgia of our time.

      parent reply	other threads:[~2005-02-23  6:39 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-02-22 21:55 reading the same entropy twice Bob O'Neill
2005-02-22 22:08 ` Lee Revell
2005-02-23  6:39 ` Matt Mackall [this message]

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=20050223063940.GD3163@waste.org \
    --to=mpm@selenic.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rmoneill@gmail.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