aboutsummaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python
diff options
context:
space:
mode:
authorMark Rutland <[email protected]>2016-01-25 11:45:02 +0000
committerCatalin Marinas <[email protected]>2016-02-16 15:10:45 +0000
commitc1a88e9124a499939ebd8069d5e4d3937f019157 (patch)
treeaa1d0c2f64f275ea2d18e8bf1d7feac6b3af4e7a /tools/perf/scripts/python
parent50e1881ddde2a986c7d0d2150985239e5e3d7d96 (diff)
arm64: kasan: avoid TLB conflicts
The page table modification performed during the KASAN init risks the allocation of conflicting TLB entries, as it swaps a set of valid global entries for another without suitable TLB maintenance. The presence of conflicting TLB entries can result in the delivery of synchronous TLB conflict aborts, or may result in the use of erroneous data being returned in response to a TLB lookup. This can affect explicit data accesses from software as well as translations performed asynchronously (e.g. as part of page table walks or speculative I-cache fetches), and can therefore result in a wide variety of problems. To avoid this, use cpu_replace_ttbr1 to swap the page tables. This ensures that when the new tables are installed there are no stale entries from the old tables which may conflict. As all updates are made to the tables while they are not active, the updates themselves are safe. At the same time, add the missing barrier to ensure that the tmp_pg_dir entries updated via memcpy are visible to the page table walkers at the point the tmp_pg_dir is installed. All other page table updates made as part of KASAN initialisation have the requisite barriers due to the use of the standard page table accessors. Signed-off-by: Mark Rutland <[email protected]> Reviewed-by: Catalin Marinas <[email protected]> Cc: Andrey Ryabinin <[email protected]> Tested-by: Ard Biesheuvel <[email protected]> Reviewed-by: Ard Biesheuvel <[email protected]> Tested-by: Jeremy Linton <[email protected]> Cc: Laura Abbott <[email protected]> Cc: Will Deacon <[email protected]> Signed-off-by: Catalin Marinas <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions