[PATCH] arm64: alternatives: make clean_dcache_range_nopatch() noinstr-safe
Catalin Marinas
catalin.marinas at arm.com
Wed Jun 21 08:50:00 PDT 2023
On Fri, 16 Jun 2023 11:31:50 +0100, Mark Rutland wrote:
> When patching kernel alternatives, we need to be careful not to execute
> kernel code which is itself subject to patching. In general, if code is
> executed after the instructions in memory have been patched but prior to
> the cache maintenance and barriers completing, it could lead to
> UNPREDICTABLE results.
>
> As our regular cache maintenance routines are patched with alternatives,
> we have a clean_dcache_range_nopatch() function which is *intended* to
> avoid patchable code and therefore supposed to be safe in the middle of
> patching alternatives. Unfortunately, it's not marked as 'noinstr', and
> so can be instrumented with patchable code.
>
> [...]
Applied to arm64 (for-next/misc), thanks!
[1/1] arm64: alternatives: make clean_dcache_range_nopatch() noinstr-safe
https://git.kernel.org/arm64/c/39138093f139
--
Catalin
More information about the linux-arm-kernel
mailing list