[withdrawn] randomize_range-use-random-long-instead-of-int.patch removed from -mm tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The patch titled
     Subject: drivers/car/random.c: randomize_range(): use random long instead of int
has been removed from the -mm tree.  Its filename was
     randomize_range-use-random-long-instead-of-int.patch

This patch was dropped because it was withdrawn

------------------------------------------------------
From: William Roberts <william.c.roberts@xxxxxxxxx>
Subject: drivers/car/random.c: randomize_range(): use random long instead of int

Use a long when generating the random range rather than an int.  This will
produce better random distributions as well as matching all the types at
hand.

Link: http://lkml.kernel.org/r/1469471141-25669-1-git-send-email-william.c.roberts@xxxxxxxxx
Signed-off-by: William Roberts <william.c.roberts@xxxxxxxxx>
Acked-by: Kees Cook <keescook@xxxxxxxxxxxx>
Cc: Theodore Ts'o <tytso@xxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
---

 drivers/char/random.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff -puN drivers/char/random.c~randomize_range-use-random-long-instead-of-int drivers/char/random.c
--- a/drivers/char/random.c~randomize_range-use-random-long-instead-of-int
+++ a/drivers/char/random.c
@@ -1837,7 +1837,8 @@ randomize_range(unsigned long start, uns
 
 	if (end <= start + len)
 		return 0;
-	return PAGE_ALIGN(get_random_int() % range + start);
+
+	return PAGE_ALIGN(get_random_long() % range + start);
 }
 
 /* Interface for in-kernel drivers of true hardware RNGs.
_

Patches currently in -mm which might be from william.c.roberts@xxxxxxxxx are


--
To unsubscribe from this list: send the line "unsubscribe mm-commits" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]
  Powered by Linux