[PATCH v4] arm64: kasan: mte: move GCR_EL1 switch to task switch when KASAN disabled
Catalin Marinas
catalin.marinas at arm.com
Fri Sep 24 04:35:04 PDT 2021
On Thu, Sep 23, 2021 at 06:06:55PM -0700, Peter Collingbourne wrote:
> It is not necessary to write to GCR_EL1 on every kernel entry and
> exit when HW tag-based KASAN is disabled because the kernel will not
> execute any IRG instructions in that mode. Since accessing GCR_EL1
> can be expensive on some microarchitectures, avoid doing so by moving
> the access to task switch when HW tag-based KASAN is disabled.
>
> Signed-off-by: Peter Collingbourne <pcc at google.com>
> Acked-by: Andrey Konovalov <andreyknvl at gmail.com>
> Link: https://linux-review.googlesource.com/id/I78e90d60612a94c24344526f476ac4ff216e10d2
Reviewed-by: Catalin Marinas <catalin.marinas at arm.com>
More information about the linux-arm-kernel
mailing list