]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
arm64: kfence: Avoid NOMAP tricks when mapping the early pool
authorArd Biesheuvel <ardb@kernel.org>
Fri, 29 May 2026 15:01:58 +0000 (17:01 +0200)
committerWill Deacon <will@kernel.org>
Tue, 2 Jun 2026 15:29:15 +0000 (16:29 +0100)
commitdfd73e574d389f3df4e6e39157b22e71a978db34
tree46cddc578b76a3fd5edc3489edc6f1290c509e63
parent05c5c31e9d8d3930d3852018de154bcdb9eeb817
arm64: kfence: Avoid NOMAP tricks when mapping the early pool

Now that the map_mem() routines respect existing page mappings and
contiguous granule sized blocks with the contiguous bit cleared, there
is no longer a reason to play tricks with the memblock NOMAP attribute.

Instead, the kfence pool can be allocated and mapped with page
granularity first, and this granularity will be respected when the rest
of DRAM is mapped later, even if block and contiguous mappings are
allowed for the remainder of those mappings.

Add the NO_EXEC_MAPPINGS flag to ensure that hierarchical XN attributes
are set on the intermediate page tables that are allocated when mapping
the pool.

Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
Reviewed-by: Kevin Brodsky <kevin.brodsky@arm.com>
Signed-off-by: Will Deacon <will@kernel.org>
arch/arm64/mm/mmu.c