mirror of
https://github.com/Atmosphere-NX/Atmosphere.git
synced 2024-12-25 03:36:02 +00:00
kldr: update for 11.0.0
This commit is contained in:
parent
1365814b8d
commit
4c581d21f6
1 changed files with 3 additions and 3 deletions
|
@ -207,9 +207,9 @@ namespace ams::kern::init::loader {
|
||||||
|
|
||||||
/* Repeatedly generate a random virtual address until we get one that's unmapped in the destination page table. */
|
/* Repeatedly generate a random virtual address until we get one that's unmapped in the destination page table. */
|
||||||
while (true) {
|
while (true) {
|
||||||
const KVirtualAddress random_kaslr_slide = KSystemControl::Init::GenerateRandomRange(KernelBaseRangeMin, KernelBaseRangeEnd);
|
const uintptr_t random_kaslr_slide = KSystemControl::Init::GenerateRandomRange(KernelBaseRangeMin / KernelBaseAlignment, KernelBaseRangeEnd / KernelBaseAlignment);
|
||||||
const KVirtualAddress kernel_region_start = util::AlignDown(GetInteger(random_kaslr_slide), KernelBaseAlignment);
|
const KVirtualAddress kernel_region_start = random_kaslr_slide * KernelBaseAlignment;
|
||||||
const KVirtualAddress kernel_region_end = util::AlignUp(GetInteger(kernel_region_start) + kernel_offset + kernel_size, KernelBaseAlignment);
|
const KVirtualAddress kernel_region_end = kernel_region_start + util::AlignUp(kernel_offset + kernel_size, KernelBaseAlignment);
|
||||||
const size_t kernel_region_size = GetInteger(kernel_region_end) - GetInteger(kernel_region_start);
|
const size_t kernel_region_size = GetInteger(kernel_region_end) - GetInteger(kernel_region_start);
|
||||||
|
|
||||||
/* Make sure the region has not overflowed */
|
/* Make sure the region has not overflowed */
|
||||||
|
|
Loading…
Reference in a new issue