]> git.baikalelectronics.ru Git - kernel.git/commit
arm64: kernel: drop unnecessary PoC cache clean+invalidate
authorArd Biesheuvel <ardb@kernel.org>
Fri, 24 Jun 2022 15:06:38 +0000 (17:06 +0200)
committerWill Deacon <will@kernel.org>
Fri, 24 Jun 2022 16:18:09 +0000 (17:18 +0100)
commitbcfe7d8d9d3aab29365616e0bc002e5c15180cd3
treedb39357d8ef57627e68d0add5e21b148124dda0f
parente54e231104c3fbd9f02cc038b13804e729246e94
arm64: kernel: drop unnecessary PoC cache clean+invalidate

Some early boot code runs before the virtual placement of the kernel is
finalized, and we used to go back to the very start and recreate the ID
map along with the page tables describing the virtual kernel mapping,
and this involved setting some global variables with the caches off.

In order to ensure that global state created by the KASLR code is not
corrupted by the cache invalidation that occurs in that case, we needed
to clean those global variables to the PoC explicitly.

This is no longer needed now that the ID map is created only once (and
the associated global variable updates are no longer repeated). So drop
the cache maintenance that is no longer necessary.

Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
Reviewed-by: Anshuman Khandual <anshuman.khandual@arm.com>
Link: https://lore.kernel.org/r/20220624150651.1358849-9-ardb@kernel.org
Signed-off-by: Will Deacon <will@kernel.org>
arch/arm64/kernel/kaslr.c