summaryrefslogtreecommitdiff
path: root/fs
diff options
context:
space:
mode:
authorWill Deacon <will.deacon@arm.com>2017-12-06 10:51:12 +0000
committerGreg Kroah-Hartman <gregkh@google.com>2020-11-15 15:30:54 +0000
commit84b1f69b83c7509a57d2de9efc83f7f0338952cd (patch)
treedad4ee1d70c2e60a7ea920c1b477bc87a3237c85 /fs
parent71b05dd1da3c6eeba74892acc9f584d08ab2defd (diff)
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: 39bc88e5e38e9b21 ("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 d96cc49bff5a7735576cc6f6f111f875d101cec8) Signed-off-by: Greg Kroah-Hartman <gregkh@google.com> Change-Id: I2fd386129dccd7f03a95b5337d4b4f2a1253f56d Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Diffstat (limited to 'fs')
0 files changed, 0 insertions, 0 deletions