Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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 <[email protected]> Cc: Ard Biesheuvel <[email protected]> Cc: Vinayak Menon <[email protected]> Cc: <[email protected]> Fixes: 39bc88e ("arm64: Disable TTBR0_EL1 during normal kernel execution") Reviewed-by: Catalin Marinas <[email protected]> Reviewed-by: Mark Rutland <[email protected]> Reported-by: Vinayak Menon <[email protected]> Signed-off-by: Will Deacon <[email protected]>
- Loading branch information