diff options
| author | Arvind Sankar <[email protected]> | 2020-07-28 18:57:17 -0400 |
|---|---|---|
| committer | Ingo Molnar <[email protected]> | 2020-07-31 11:08:17 +0200 |
| commit | eb38be6db516fb72ccf7282628b545a185b3bc7a (patch) | |
| tree | 58a66e171b6ae4fdba562ccc3b26c941fc6e3c6a /tools/testing/selftests/bpf/prog_tests/recursion.c | |
| parent | 46a5b29a4a63a3ba987cbb5467774a4b5787618e (diff) | |
x86/kaslr: Drop unnecessary alignment in find_random_virt_addr()
Drop unnecessary alignment of image_size to CONFIG_PHYSICAL_ALIGN in
find_random_virt_addr, it cannot change the result: the largest valid
slot is the largest n that satisfies
minimum + n * CONFIG_PHYSICAL_ALIGN + image_size <= KERNEL_IMAGE_SIZE
(since minimum is already aligned) and so n is equal to
(KERNEL_IMAGE_SIZE - minimum - image_size) / CONFIG_PHYSICAL_ALIGN
even if image_size is not aligned to CONFIG_PHYSICAL_ALIGN.
Signed-off-by: Arvind Sankar <[email protected]>
Signed-off-by: Ingo Molnar <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Diffstat (limited to 'tools/testing/selftests/bpf/prog_tests/recursion.c')
0 files changed, 0 insertions, 0 deletions