Mark Rutland fd363bd417 arm64: avoid TLB conflict with CONFIG_RANDOMIZE_BASE
When CONFIG_RANDOMIZE_BASE is selected, we modify the page tables to remap the
kernel at a newly-chosen VA range. We do this with the MMU disabled, but do not
invalidate TLBs prior to re-enabling the MMU with the new tables. Thus the old
mappings entries may still live in TLBs, and we risk violating
Break-Before-Make requirements, leading to TLB conflicts and/or other issues.

We invalidate TLBs when we uninsall the idmap in early setup code, but prior to
this we are subject to issues relating to the Break-Before-Make violation.

Avoid these issues by invalidating the TLBs before the new mappings can be
used by the hardware.

Fixes: f80fb3a3d508 ("arm64: add support for kernel ASLR")
Cc: <stable@vger.kernel.org> # 4.6+
Acked-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Acked-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Mark Rutland <mark.rutland@arm.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
2016-08-25 11:11:32 +01:00
..
2016-07-27 11:16:05 -07:00
2016-07-27 11:16:05 -07:00
2016-06-27 16:31:25 +01:00
2016-06-27 16:31:25 +01:00
2016-03-04 18:19:17 +00:00
2016-06-27 16:31:25 +01:00
2016-05-16 17:17:24 -07:00
2016-07-19 15:03:20 +01:00
2016-07-27 11:16:05 -07:00
2016-02-24 14:57:27 +00:00
2016-02-24 14:57:24 +00:00
2016-08-01 12:23:44 -05:00
2016-05-20 17:58:30 -07:00
2016-07-30 11:32:01 -07:00
2016-03-02 15:49:28 +00:00
2016-04-20 12:22:42 +01:00