diff options
| author | Ard Biesheuvel <[email protected]> | 2023-12-13 08:40:32 +0000 |
|---|---|---|
| committer | Catalin Marinas <[email protected]> | 2024-02-09 10:56:12 +0000 |
| commit | 3567fa63cb5680d3e1e8375c547a0e305c8a0ff5 (patch) | |
| tree | 3f212eb24c06bac296572694e80943bbd462f0dc /scripts/generate_rust_target.rs | |
| parent | arm64: mm: Reclaim unused vmemmap region for vmalloc use (diff) | |
| download | kernel-3567fa63cb5680d3e1e8375c547a0e305c8a0ff5.tar.gz kernel-3567fa63cb5680d3e1e8375c547a0e305c8a0ff5.zip | |
arm64: kaslr: Adjust randomization range dynamically
Currently, we base the KASLR randomization range on a rough estimate of
the available space in the upper VA region: the lower 1/4th has the
module region and the upper 1/4th has the fixmap, vmemmap and PCI I/O
ranges, and so we pick a random location in the remaining space in the
middle.
Once we enable support for 5-level paging with 4k pages, this no longer
works: the vmemmap region, being dimensioned to cover a 52-bit linear
region, takes up so much space in the upper VA region (the size of which
is based on a 48-bit VA space for compatibility with non-LVA hardware)
that the region above the vmalloc region takes up more than a quarter of
the available space.
So instead of a heuristic, let's derive the randomization range from the
actual boundaries of the vmalloc region.
Signed-off-by: Ard Biesheuvel <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Catalin Marinas <[email protected]>
Acked-by: Mark Rutland <[email protected]>
Diffstat (limited to 'scripts/generate_rust_target.rs')
0 files changed, 0 insertions, 0 deletions
