From: Alex Bligh - linux-kernel <linux-kernel@alex.org.uk>
To: linux-kernel@vger.kernel.org
Cc: Alex Bligh - linux-kernel <linux-kernel@alex.org.uk>
Subject: Sources of entropy - /dev/random problem for network servers
Date: Sun, 08 Apr 2001 23:46:21 +0100 [thread overview]
Message-ID: <1457842476.986773581@[195.224.237.69]> (raw)
In debugging why my (unloaded) IMAP server takes many seconds
to open folders, I discovered what looks like a problem
in 2.4's feeding of entropy into /dev/random. When there
is insufficient entropy in the random number generator,
reading from /dev/random blocks for several seconds. /dev/random
is used (correctly) for crytographic key verification.
Entropy comes from 4 sources it seems: Keyboard, Mouse, Disk I/O
and IRQs.
The machine in question is locked in a data center (can't be
the only one) and thus sees none of the former two. IDE Entropy
comes from executed IDE commands. The disk is physically largely
inactive due to caching. But there's plenty of network traffic
which should generate IRQs.
However, only 3 drivers in drivers/net actually set
SA_SAMPLE_RANDOM when calling request_irq(). I believe
all of them should. And indeed this fixed the problem for
me using an eepro100().
The following patch fixes eepro100.c - others can be
patched similarly.
--
Alex Bligh
/usr/src/linux# diff -C3 drivers/net/eepro100.c{.keep,}
*** drivers/net/eepro100.c.keep Tue Feb 13 21:15:05 2001
--- drivers/net/eepro100.c Sun Apr 8 22:17:00 2001
***************
*** 923,929 ****
sp->in_interrupt = 0;
/* .. we can safely take handler calls during init. */
! retval = request_irq(dev->irq, &speedo_interrupt, SA_SHIRQ,
dev->name, dev);
if (retval) {
MOD_DEC_USE_COUNT;
return retval;
--- 923,929 ----
sp->in_interrupt = 0;
/* .. we can safely take handler calls during init. */
! retval = request_irq(dev->irq, &speedo_interrupt, SA_SHIRQ |
SA_SAMPLE_RANDOM, dev->name, dev);
if (retval) {
MOD_DEC_USE_COUNT;
return retval;
[ENDS]
next reply other threads:[~2001-04-08 22:46 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-04-08 22:46 Alex Bligh - linux-kernel [this message]
2001-04-08 23:33 ` Jeff Garzik
2001-04-09 7:59 ` Alex Bligh - linux-kernel
2001-04-09 0:15 ` Andi Kleen
2001-04-09 6:17 ` David Wagner
2001-04-09 11:04 Heusden, Folkert van
2001-04-10 5:37 ` idalton
2001-04-10 13:56 Heusden, Folkert van
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='1457842476.986773581@[195.224.237.69]' \
--to=linux-kernel@alex.org.uk \
--cc=linux-kernel@vger.kernel.org \
/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
all inboxes | Powered by JetHome®