Re: [RFC PATCH 6/9] arm64: Enable the execmem ROX cache for module text

From: Adrian Barnaś

Date: Sun Aug 23 2026 - 12:48:14 EST


On Sat, Aug 22, 2026 at 03:53:28PM +0200, Ard Biesheuvel wrote:
From: Ard Biesheuvel <ardb@xxxxxxxxxx>

Wire up the existing support for the execmem ROX cache on arm64, so that
it will be used for module .text and .init.text regions. This will be
relied upon by a subsequent patch in order to allocate those regions
from a single chunk of memory.


Until Mike lands his changes [1] on set_direct_map, enabling ROX_CACHE on ARM64 would cause a permission fault when the same part of the direct map is
used again (the RO flag is not properly stripped off after an execmem cache
clean). [1]: https://lore.kernel.org/all/20260823-execmem-set-vm-perms-v0-2-v2-0-b013a37d84b3@xxxxxxxxxx/
Best regards, Adrian