From: Javier Villavicencio <javierv@migraciones.gov.ar>
To: Linux Kernel <linux-kernel@vger.kernel.org>
Subject: no entropy and no output at /dev/random (quick question)
Date: Fri, 26 Nov 2004 23:59:45 -0300 [thread overview]
Message-ID: <41A7EDA1.5000609@migraciones.gov.ar> (raw)
Hi, i've just suscribed from work to the list (now my boss will have to
buy a new server :+)
The quick question/problem follows:
I have a server that runs kernel 2.6.9, some web and monitoring
services, it's connected to two different networks with two different
network cards, and somehow a php developer discovered that /dev/random
wasn't giving any entropy to him (O_O) so i checked it out...
the (BUG??) follows:
(via ssh, i have no keyboard there)
# cat /dev/random (5 minutes, the server working, nothing)
ctrl+c
# cat /dev/urandom
<snip> (lots of randomness)
then I went to /proc/sys/kernel/random
# /proc/sys/kernel/random
# cat entropy_avail
0
# OMG!
-bash: OMG1: command not found
O_O. No entropy available. WTF??
Then i did a little search in the whole source directory of the kernel
(looking for entropy sources) and I've found that NONE OF MY (interrupts
generating) HARDWARE was (contributing??) helping with the entropy.
This is the (little) summary of the "working" stuff.
* 3Com Corporation 3c905B 100BaseTX (driver 3c59x.c doesn't give any
entropy).
* Intel Corp. 82557/8/9 [Ethernet Pro 100] (driver eepro100.c o_O)
* Mylex Corporation DAC960PRL (driver DAC960.c neither)
So and this is the /proc/interrupts output:
0: 2991777 15 IO-APIC-edge timer
2: 0 0 XT-PIC cascade
5: 434913 1 IO-APIC-level eth0
8: 2 0 IO-APIC-edge rtc
9: 383701 0 IO-APIC-level eth1
10: 101 0 IO-APIC-level sym53c8xx
11: 0 0 IO-APIC-level uhci_hcd
15: 14543 1 IO-APIC-level Mylex DAC960PG
As you may see my only sources of entropy where the timer, eth0, eth1
and the DAC960.
So I patched my 3 drivers (near request_irq, sending SA_SAMPLE_RANDOM |
SA_SHIRQ in the call).
Now I have entropy :+):
# cat /proc/sys/kernel/random/entropy_avail
4096
The quick question (at last), is this "right?" I mean, everything works
as before, no problems (so far) and the php developer is happy. It is
"risky" to put this in the DAC960 driver? (seems pretty much complicated
compared with others i've touched in my life)
Thanks for any advice.
next reply other threads:[~2004-11-27 3:01 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-11-27 2:59 Javier Villavicencio [this message]
2004-11-27 4:38 ` no entropy and no output at /dev/random (quick question) Javier Villavicencio
2004-11-27 19:20 ` David Wagner
2004-11-28 6:29 ` Herbert Xu
2004-11-29 15:32 ` Theodore Ts'o
2004-11-30 12:49 ` Horst von Brand
2004-11-30 16:48 ` Javier Villavicencio
2005-01-07 19:17 ` Denis Vlasenko
2004-11-27 19:24 ` Jan Engelhardt
2004-11-27 19:22 ` Jan Engelhardt
2004-11-27 19:42 ` Andreas Steinmetz
2004-11-27 21:35 ` David Schwartz
2004-11-27 21:44 ` Jan Engelhardt
2004-11-29 22:47 ` Javier Villavicencio
2004-11-29 22:51 ` Javier Villavicencio
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=41A7EDA1.5000609@migraciones.gov.ar \
--to=javierv@migraciones.gov.ar \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.