summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2022-05-14 13:59:30 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2022-05-30 09:33:45 +0200
commit552ae8e4841ba0550952063922d3b38bcd84ec6e (patch)
tree517168208373e04ec951b4520c0678eadfa80d47 /include/linux
parent5f2a040b2fb47a76b11bc5f46dbdad55f6cdd753 (diff)
random: move randomize_page() into mm where it belongs
commit 5ad7dd882e45d7fe432c32e896e2aaa0b21746ea upstream. randomize_page is an mm function. It is documented like one. It contains the history of one. It has the naming convention of one. It looks just like another very similar function in mm, randomize_stack_top(). And it has always been maintained and updated by mm people. There is no need for it to be in random.c. In the "which shape does not look like the other ones" test, pointing to randomize_page() is correct. So move randomize_page() into mm/util.c, right next to the similar randomize_stack_top() function. This commit contains no actual code changes. Cc: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/mm.h1
-rw-r--r--include/linux/random.h2
2 files changed, 1 insertions, 2 deletions
diff --git a/include/linux/mm.h b/include/linux/mm.h
index 289c26f055cd..5b4d88faf114 100644
--- a/include/linux/mm.h
+++ b/include/linux/mm.h
@@ -2585,6 +2585,7 @@ extern int install_special_mapping(struct mm_struct *mm,
unsigned long flags, struct page **pages);
unsigned long randomize_stack_top(unsigned long stack_top);
+unsigned long randomize_page(unsigned long start, unsigned long range);
extern unsigned long get_unmapped_area(struct file *, unsigned long, unsigned long, unsigned long, unsigned long);
diff --git a/include/linux/random.h b/include/linux/random.h
index d6ef6cf4346a..917470c4490a 100644
--- a/include/linux/random.h
+++ b/include/linux/random.h
@@ -64,8 +64,6 @@ static inline unsigned long get_random_canary(void)
return get_random_long() & CANARY_MASK;
}
-unsigned long randomize_page(unsigned long start, unsigned long range);
-
int __init random_init(const char *command_line);
bool rng_is_initialized(void);
int wait_for_random_bytes(void);