summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/export-to-sqlite.py
diff options
context:
space:
mode:
authorArvind Sankar <nivedita@alum.mit.edu>2020-07-28 02:07:57 +0300
committerIngo Molnar <mingo@kernel.org>2020-07-31 12:08:17 +0300
commit451286940d95778e83fa7f97006316d995b4c4a8 (patch)
tree2ebe563cfb05f8feeebb09720aa11c96b447989b /tools/perf/scripts/python/export-to-sqlite.py
parent08705365560a352d3f5b4f1f52270b4d4ff7911e (diff)
downloadlinux-451286940d95778e83fa7f97006316d995b4c4a8.tar.xz
x86/kaslr: Initialize mem_limit to the real maximum address
On 64-bit, the kernel must be placed below MAXMEM (64TiB with 4-level paging or 4PiB with 5-level paging). This is currently not enforced by KASLR, which thus implicitly relies on physical memory being limited to less than 64TiB. On 32-bit, the limit is KERNEL_IMAGE_SIZE (512MiB). This is enforced by special checks in __process_mem_region(). Initialize mem_limit to the maximum (depending on architecture), instead of ULLONG_MAX, and make sure the command-line arguments can only decrease it. This makes the enforcement explicit on 64-bit, and eliminates the 32-bit specific checks to keep the kernel below 512M. Check upfront to make sure the minimum address is below the limit before doing any work. Signed-off-by: Arvind Sankar <nivedita@alum.mit.edu> Signed-off-by: Ingo Molnar <mingo@kernel.org> Acked-by: Kees Cook <keescook@chromium.org> Link: https://lore.kernel.org/r/20200727230801.3468620-5-nivedita@alum.mit.edu
Diffstat (limited to 'tools/perf/scripts/python/export-to-sqlite.py')
0 files changed, 0 insertions, 0 deletions