Re: IRQF_SAMPLE_RANDOM question...

From: Robin Getz
Date: Thu Apr 09 2009 - 09:53:44 EST


On Wed 8 Apr 2009 15:51, Matt Mackall pondered:
> On Tue, 2009-04-07 at 17:44 -0400, Robin Getz wrote:
> > Is that "Everything in general, with a few exceptions", or
> > "__Everything__"?
>
> Everything. We want every input point to better document the type of
> entropy source.

OK - any objections to something like this?

===================================================================
--- Documentation/feature-removal-schedule.txt (revision 6236)
+++ Documentation/feature-removal-schedule.txt (working copy)
@@ -6,6 +6,19 @@

---------------------------

+What: IRQF_SAMPLE_RANDOM
+Check: IRQF_SAMPLE_RANDOM
+When: July 2009
+Why: Many of IRQF_SAMPLE_RANDOM users are technically bogus as entropy
+ sources in the kernel's current entropy model. To resolve this, every
+ input point to the kernel's entropy pool needs to better document the
+ type of entropy source it actually is. This will be replaced with
+ additional add_*_randomness functions in drivers/char/random.c
+
+Who: Robin Getz <rgetz@xxxxxxxxxxxxxxxxxxxx> & Matt Mackall
<mpm@xxxxxxxxxxx>
+
+---------------------------
+

Then if someone attempts to add it, and runs checkpatch, it will generate
something like:

--------
ERROR: Don't use IRQF_SAMPLE_RANDOM(): see
Documentation/feature-removal-schedule.txt
#10: FILE: serial/bfin_5xx.c:650:
+ if (request_irq(uart->port.irq, bfin_serial_rx_int, IRQF_DISABLED |
IRQF_SAMPLE_RANDOM,
--------

My only real question is on the date... In a previous email:

On Mon 6 Apr 2009 15:01, Matt Mackall pondered:
> I'm eventually going to move the RNG away from the strict theoretical
> entropy accounting model to a more pragmatic one which will be much
> happier with iffy entropy sources, but that's a ways off.

I was not sure what "a ways off" was defined as - or are the two (removal of
IRQF_SAMPLE_RANDOM, and the pragmatic entropy accounting model) separate in
your mind? I guess various add_*_randomness functions can be added today, and
change how they are accounted for in the future?

-Robin
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/