mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Alex Bligh - linux-kernel <linux-kernel@alex.org.uk>
To: Robert Love <rml@tech9.net>,
	Alex Bligh - linux-kernel <linux-kernel@alex.org.uk>
Cc: Steve Hill <steve@navaho.co.uk>,
	linux-kernel@vger.kernel.org,
	Alex Bligh - linux-kernel <linux-kernel@alex.org.uk>
Subject: Re: /dev/random in 2.4.6
Date: Wed, 15 Aug 2001 22:27:55 +0100	[thread overview]
Message-ID: <133218293.997914475@[169.254.45.213]> (raw)
In-Reply-To: <997908956.733.102.camel@phantasy>
In-Reply-To: <997908956.733.102.camel@phantasy>

Robert,

> Method one, your idea, would have us add SA_SAMPLE_NET_RANDOM to each
> NIC's request_irq call.  The random gatherer would then need to be made
> aware of the sysctl and check and add/remove interripts derived from
> NICs as needed.  This would require a bit of recoding (take a look at
> request_irq and random.c)

Hardly any - apart from adding a (new) SA_SAMPLE_NET_RANDOM to request_irq
in each drivers/net/*.c, you just need (manual diff) in handle_IRQ_event:

         } while (action);
-        if (status & SA_SAMPLE_RANDOM)
+        if ((status & SA_SAMPLE_RANDOM) ||
+            (entropy_from_net &&
+            (status & SA_SAMPLE_NET_RANDOM)))
                 add_interrupt_randomness(irq);
         __cli();

and then the completely trivial /proc (and/or sysctl if that's
really necessary) code for twiddling
/proc/driver/entropy_from_net (or whatever it's called).

+	int sysctl_entropy_from_net
...
+        {DR_RANDOM_ENTROPYNET, "entropy_from_net",
+         &sysctl_entropy_from_net,
+         sizeof(sysctl_entropy_from_net), 0644, NULL, &proc_dointvec},

in somewhere where it gets into dev_table in sysctl.c -
and that's about it.

Given distributions normally have installers with 'hints' as
to whether they are running headless or not, this could
via some rc script write a '1' here if the machine was
perceived as headless, or leave it default (0) otherwise.

--
Alex Bligh

      reply	other threads:[~2001-08-15 21:28 UTC|newest]

Thread overview: 59+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-08-15 15:07 Steve Hill
2001-08-15 15:21 ` Richard B. Johnson
2001-08-15 15:27   ` Steve Hill
2001-08-15 15:42     ` Richard B. Johnson
2001-08-15 16:29       ` Tim Walberg
2001-08-15 17:13     ` Andreas Dilger
2001-08-16  8:37       ` Steve Hill
2001-08-16 19:11         ` Andreas Dilger
2001-08-16 19:35           ` Alex Bligh - linux-kernel
2001-08-16 20:30             ` Andreas Dilger
2001-08-17  1:05           ` Robert Love
2001-08-17  0:49         ` Robert Love
2001-08-19 17:29           ` David Wagner
2001-08-17 21:18       ` Theodore Tso
2001-08-17 22:05         ` David Schwartz
2001-08-19 15:13           ` Theodore Tso
2001-08-19 15:33             ` Rob Radez
2001-08-19 17:32             ` David Wagner
2001-08-19 23:32             ` Oliver Xymoron
2001-08-20  7:40               ` Helge Hafting
2001-08-20 14:01                 ` Oliver Xymoron
2001-08-20 13:37               ` Alex Bligh - linux-kernel
2001-08-20 14:12                 ` Oliver Xymoron
2001-08-20 14:40                   ` Alex Bligh - linux-kernel
2001-08-20 14:55                     ` Chris Friesen
2001-08-20 15:22                       ` Oliver Xymoron
2001-08-20 15:25                       ` Doug McNaught
2001-08-20 15:42                         ` Chris Friesen
2001-08-21 10:03                           ` Steve Hill
2001-08-21 18:14                             ` David Wagner
2001-08-20 16:01                       ` David Wagner
2001-08-20 19:30                       ` Gérard Roudier
2001-08-20 15:07                     ` Oliver Xymoron
2001-08-21  8:33                       ` Alex Bligh - linux-kernel
2001-08-21 16:13                         ` Oliver Xymoron
2001-08-21 17:44                           ` Alex Bligh - linux-kernel
2001-08-21 18:24                             ` David Wagner
2001-08-21 18:49                               ` Alex Bligh - linux-kernel
2001-08-21 19:04                             ` Oliver Xymoron
2001-08-21 19:20                               ` Alex Bligh - linux-kernel
2001-08-21 21:44                               ` Robert Love
2001-08-21 18:19                         ` David Wagner
2001-08-20 16:00                     ` David Wagner
2001-08-21  1:20                       ` Theodore Tso
2001-08-21  8:39                       ` Alex Bligh - linux-kernel
2001-08-21 10:46                         ` Marco Colombo
2001-08-21 12:40                           ` Alex Bligh - linux-kernel
2001-08-21 17:06                           ` cfs+linux-kernel
2001-08-21 17:48                             ` Alex Bligh - linux-kernel
2001-08-21 18:27                           ` David Wagner
2001-08-21 18:25                         ` David Wagner
2001-08-20 22:55                     ` D. Stimits
2001-08-21  1:06                       ` David Schwartz
2001-08-19 17:31         ` David Wagner
2001-08-19 17:27     ` David Wagner
2001-08-15 19:25 ` Alex Bligh - linux-kernel
2001-08-16  8:55   ` Steve Hill
2001-08-15 20:55 ` Robert Love
2001-08-15 21:27   ` Alex Bligh - linux-kernel [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='133218293.997914475@[169.254.45.213]' \
    --to=linux-kernel@alex.org.uk \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rml@tech9.net \
    --cc=steve@navaho.co.uk \
    /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®