Files
linux/arch/arm64/include/asm
Will Deacon 1ae84ffe6a UPSTREAM: arm64: SW PAN: Update saved ttbr0 value on enter_lazy_tlb
enter_lazy_tlb is called when a kernel thread rides on the back of
another mm, due to a context switch or an explicit call to unuse_mm
where a call to switch_mm is elided.

In these cases, it's important to keep the saved ttbr value up to date
with the active mm, otherwise we can end up with a stale value which
points to a potentially freed page table.

This patch implements enter_lazy_tlb for arm64, so that the saved ttbr0
is kept up-to-date with the active mm for kernel threads.

Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: Vinayak Menon <vinmenon@codeaurora.org>
Cc: <stable@vger.kernel.org>
Fixes: 39bc88e5e3 ("arm64: Disable TTBR0_EL1 during normal kernel execution")
Reviewed-by: Catalin Marinas <catalin.marinas@arm.com>
Reviewed-by: Mark Rutland <mark.rutland@arm.com>
Reported-by: Vinayak Menon <vinmenon@codeaurora.org>
Signed-off-by: Will Deacon <will.deacon@arm.com>
(cherry picked from commit d96cc49bff)
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: If0767d971045d94adfb3e665de6180480e8af4a3
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2023-05-16 09:46:38 +09:00
..
2014-04-18 11:40:33 +02:00
2012-09-17 13:42:21 +01:00
2023-05-12 16:30:53 +09:00
2016-09-09 11:41:13 +01:00
2014-11-05 09:03:25 +01:00
2012-09-17 13:42:04 +01:00
2016-03-04 18:19:17 +00:00
2016-06-27 16:31:25 +01:00
2012-09-17 13:41:56 +01:00
2018-06-06 18:34:12 +02:00
2014-11-28 10:24:59 +00:00
2015-10-12 17:46:36 +01:00
2014-07-10 11:06:00 +01:00
2012-09-17 13:42:09 +01:00
2016-09-09 11:42:27 +01:00