summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2022-05-14 14:59:30 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2022-06-25 12:46:40 +0300
commit225c0df138c2d54fd0b4a5787fd6cc537962c1a0 (patch)
treee07b7cb12640fa551fe889e8a2c812a212035bf8 /include
parentd77e58eef686f1e3d5ed633f546a3ef927e05ffd (diff)
downloadlinux-225c0df138c2d54fd0b4a5787fd6cc537962c1a0.tar.xz
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')
-rw-r--r--include/linux/mm.h2
-rw-r--r--include/linux/random.h2
2 files changed, 2 insertions, 2 deletions
diff --git a/include/linux/mm.h b/include/linux/mm.h
index 94b138e4c840..794f52e2540e 100644
--- a/include/linux/mm.h
+++ b/include/linux/mm.h
@@ -2164,6 +2164,8 @@ extern int install_special_mapping(struct mm_struct *mm,
unsigned long addr, unsigned long len,
unsigned long flags, struct page **pages);
+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);
extern unsigned long mmap_region(struct file *file, unsigned long addr,
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);