diff options
author | Jason A. Donenfeld <Jason@zx2c4.com> | 2022-05-14 13:59:30 +0200 |
---|---|---|
committer | Jason A. Donenfeld <Jason@zx2c4.com> | 2022-05-19 16:54:15 +0200 |
commit | 5ad7dd882e45d7fe432c32e896e2aaa0b21746ea (patch) | |
tree | 9ac29fcb3781ee8e93b55e1aad19722c7f2241a2 /include/linux/mm.h | |
parent | 6701de6c51c172b5de5633374479503c81fefc0b (diff) | |
download | lwn-5ad7dd882e45d7fe432c32e896e2aaa0b21746ea.tar.gz lwn-5ad7dd882e45d7fe432c32e896e2aaa0b21746ea.zip |
random: move randomize_page() into mm where it belongs
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>
Diffstat (limited to 'include/linux/mm.h')
-rw-r--r-- | include/linux/mm.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/mm.h b/include/linux/mm.h index 9f44254af8ce..b0183450e484 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h @@ -2677,6 +2677,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); |