diff options
author | 2021-03-02 12:04:05 +0200 | |
---|---|---|
committer | 2021-03-23 17:13:17 +0100 | |
commit | a799c2bd29d19c565f37fa038b31a0a1d44d0e4d (patch) | |
tree | 4f83ab3aa674911e59615c5378f46b8c6c68c224 /tools/perf/scripts/python/exported-sql-viewer.py | |
parent | x86/boot/compressed: Avoid gcc-11 -Wstringop-overread warning (diff) | |
download | wireguard-linux-a799c2bd29d19c565f37fa038b31a0a1d44d0e4d.tar.xz wireguard-linux-a799c2bd29d19c565f37fa038b31a0a1d44d0e4d.zip |
x86/setup: Consolidate early memory reservations
The early reservations of memory areas used by the firmware, bootloader,
kernel text and data are spread over setup_arch(). Moreover, some of them
happen *after* memblock allocations, e.g trim_platform_memory_ranges() and
trim_low_memory_range() are called after reserve_real_mode() that allocates
memory.
There was no corruption of these memory regions because memblock always
allocates memory either from the end of memory (in top-down mode) or above
the kernel image (in bottom-up mode). However, the bottom up mode is going
to be updated to span the entire memory [1] to avoid limitations caused by
KASLR.
Consolidate early memory reservations in a dedicated function to improve
robustness against future changes. Having the early reservations in one
place also makes it clearer what memory must be reserved before memblock
allocations are allowed.
Signed-off-by: Mike Rapoport <rppt@linux.ibm.com>
Signed-off-by: Borislav Petkov <bp@suse.de>
Reviewed-by: Baoquan He <bhe@redhat.com>
Acked-by: Borislav Petkov <bp@suse.de>
Acked-by: David Hildenbrand <david@redhat.com>
Link: [1] https://lore.kernel.org/lkml/20201217201214.3414100-2-guro@fb.com
Link: https://lkml.kernel.org/r/20210302100406.22059-2-rppt@kernel.org
Diffstat (limited to 'tools/perf/scripts/python/exported-sql-viewer.py')
0 files changed, 0 insertions, 0 deletions