Skip to contentSkip to conversation

update maintainer for /dev/random

PATCH New Matt Mackall 3 participants 4 messages Apr 7, 2005 – Jul 30, 2005 Random number driver

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 update maintainer for /dev/random

Ted has agreed to let me take over as maintainer of /dev/random and friends. I've gone ahead and added a line to his entry in CREDITS.

drivers/char/random.c +1 -1
Index: mm/drivers/char/random.c
===================================================================
@@ -1,7 +1,7 @@
 /*
  * random.c -- A strong random number generator
  *
- * Version 1.89, last modified 19-Sep-99
+ * Copyright Matt Mackall <[email protected]>, 2003, 2004, 2005
  *
  * Copyright Theodore Ts'o, 1994, 1995, 1996, 1997, 1998, 1999.  All
  * rights reserved.
MAINTAINERS +5 -0
Index: mm/MAINTAINERS
===================================================================
@@ -1914,6 +1914,11 @@ M:	[email protected]
 L:	[email protected]
 S:	Maintained
 
+RANDOM NUMBER DRIVER
+P:	Matt Mackall
+M:	[email protected]
+S:	Maintained
+
 REAL TIME CLOCK DRIVER
 P:	Paul Gortmaker
 M:	[email protected]
CREDITS +1 -0
Index: mm/CREDITS
===================================================================
@@ -3299,6 +3299,7 @@ D: Author of the new e2fsck
 D: Author of job control and system call restart code
 D: Author of ramdisk device driver
 D: Author of loopback device driver
+D: Author of /dev/random driver
 S: MIT Room E40-343
 S: 1 Amherst Street
 S: Cambridge, Massachusetts 02139
Signature · 1 line
Mathematics is the supreme nostalgia of our time.
#1 lore raw

PATCH 1/1 random : prefetch the whole pool, not 1/4 of it

Hi Matt

Could you check this patch and apply it ?

Thank you

Eric

[RANDOM] : prefetch the whole pool, not 1/4 of it,
(pool contains u32 words, not bytes)

drivers/char/random.c +1 -1
@@ -469,7 +469,7 @@
 	next_w = *in++;
 
 	spin_lock_irqsave(&r->lock, flags);
-	prefetch_range(r->pool, wordmask);
+	prefetch_range(r->pool, wordmask*4);
 	input_rotate = r->input_rotate;
 	add_ptr = r->add_ptr;
 
#2 lore raw

Re: [PATCH] random : prefetch the whole pool, not 1/4 of it

Quoted 10 lines · Eric Dumazet

Hi Matt

Could you check this patch and apply it ?

Thank you

Eric

[RANDOM] : prefetch the whole pool, not 1/4 of it,
(pool contains u32 words, not bytes)

You probably want r->poolinfo->poolwords as wordmask is off by one? Please use "x * 4" rather than "x*4" too.

Quoted 11 lines
drivers/char/random.c +1 -1
@@ -469,7 +469,7 @@
 	next_w = *in++;
 
 	spin_lock_irqsave(&r->lock, flags);
-	prefetch_range(r->pool, wordmask);
+	prefetch_range(r->pool, wordmask*4);
 	input_rotate = r->input_rotate;
 	add_ptr = r->add_ptr;
 
Signature · 1 line
Mathematics is the supreme nostalgia of our time.
#3 lore raw

Re: [PATCH] random : prefetch the whole pool, not 1/4 of it

In reply to Eric Dumazet

drivers/char/random.c line 472

Quoted 13 lines

Could you check this patch and apply it ? [RANDOM] : prefetch the whole pool, not 1/4 of it,
(pool contains u32 words, not bytes)

drivers/char/random.c +1 -1
@@ -469,7 +469,7 @@
 	next_w = *in++;
 
 	spin_lock_irqsave(&r->lock, flags);
-	prefetch_range(r->pool, wordmask);
+	prefetch_range(r->pool, wordmask*4);

Isn't it cleaner to replace the line above with:
+ prefetch_range(r->pool, wordmask * sizeof(__u32));
as the pool contains u32 words?

drivers/char/random.c line 475

Quoted 3 lines
drivers/char/random.c +0 -0
 	input_rotate = r->input_rotate;
 	add_ptr = r->add_ptr;
 

Folkert van Heusden

Signature · 5 lines
Auto te koop, zie: http://www.vanheusden.com/daihatsu.php
--------------------------------------------------------------------
Get your PGP/GPG key signed at www.biglumber.com!
--------------------------------------------------------------------
Phone: +31-6-41278122, PGP-key: 1F28D8AE