]> git.baikalelectronics.ru Git - kernel.git/commit
arm64: mm: Reserve enough pages for the initial ID map
authorArd Biesheuvel <ardb@kernel.org>
Fri, 26 Aug 2022 16:48:00 +0000 (18:48 +0200)
committerWill Deacon <will@kernel.org>
Thu, 1 Sep 2022 11:02:39 +0000 (12:02 +0100)
commitfc81e96d7b11840a06edc6259eca39cb727808ab
tree6330fdc85832cfe957ae1ccce93822e589b3846f
parent132c818c0320a600890ee7a2652a0174b5013c5e
arm64: mm: Reserve enough pages for the initial ID map

The logic that conditionally allocates one additional page at each
swapper page table level if KASLR is enabled is also applied to the
initial ID map, now that we have started using the same set of macros
to allocate the space for it.

However, the placement of the kernel in physical memory might result in
additional pages being needed at any level, even if KASLR is disabled in
the build. So account for this in the computation.

Fixes: 5507de725cfd ("arm64: head: cover entire kernel image in initial ID map")
Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
Link: https://lore.kernel.org/r/20220826164800.2059148-1-ardb@kernel.org
Signed-off-by: Will Deacon <will@kernel.org>
arch/arm64/include/asm/kernel-pgtable.h