Skip to contentSkip to conversation

random-remove-unused-randomize_range.patch removed from -mm tree

merged [email protected] 1 participant 1 message Oct 12, 2016

lore
Share & tools
lore

[email protected]

author tree notice Applied
#0 lore raw

The patch titled
Subject: random: remove unused randomize_range()
has been removed from the -mm tree. Its filename was
random-remove-unused-randomize_range.patch

This patch was dropped because it was merged into mainline or a subsystem tree

------------------------------------------------------
From: Jason Cooper <[email protected]>
Subject: random: remove unused randomize_range()

All call sites for randomize_range have been updated to use the much simpler and more robust randomize_addr(). Remove the now unnecessary code.

---

 drivers/char/random.c  |   19 -------------------
 include/linux/random.h |    1 -
 2 files changed, 20 deletions(-)
drivers/char/random.c renamed from drivers/char/random.c~random-remove-unused-randomize_range +0 -18
diff -puN drivers/char/random.c~random-remove-unused-randomize_range drivers/char/random.c
@@ -2100,25 +2100,6 @@ unsigned long get_random_long(void)
 }
 EXPORT_SYMBOL(get_random_long);
 
-/*
- * randomize_range() returns a start address such that
- *
- *    [...... <range> .....]
- *  start                  end
- *
- * a <range> with size "len" starting at the return value is inside in the
- * area defined by [start, end], but is otherwise randomized.
- */
-unsigned long
-randomize_range(unsigned long start, unsigned long end, unsigned long len)
-{
-	unsigned long range = end - len - start;
-
-	if (end <= start + len)
-		return 0;
-	return PAGE_ALIGN(get_random_int() % range + start);
-}