diff options
author | Will Deacon <will.deacon@arm.com> | 2017-12-12 05:48:54 -0500 |
---|---|---|
committer | Will Deacon <will.deacon@arm.com> | 2017-12-12 06:42:24 -0500 |
commit | 86c9e8126e9fbcbf06c36e285168b880369a537c (patch) | |
tree | 91889a0eaf4e732fa83a17f9d9e55c192c25574a /tools/perf/scripts/python/export-to-sqlite.py | |
parent | 8781bcbc5e69d7da69e84c7044ca0284848d5d01 (diff) |
arm64: mm: Fix false positives in set_pte_at access/dirty race detection
Jiankang reports that our race detection in set_pte_at is firing when
copying the page tables in dup_mmap as a result of a fork(). In this
situation, the page table isn't actually live and so there is no way
that we can race with a concurrent update from the hardware page table
walker.
This patch reworks the race detection so that we require either the
mm to match the current active_mm (i.e. currently installed in our TTBR0)
or the mm_users count to be greater than 1, implying that the page table
could be live in another CPU. The mm_users check might still be racy,
but we'll avoid false positives and it's not realistic to validate that
all the necessary locks are held as part of this assertion.
Cc: Yisheng Xie <xieyisheng1@huawei.com>
Reported-by: Jiankang Chen <chenjiankang1@huawei.com>
Tested-by: Jiankang Chen <chenjiankang1@huawei.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
Diffstat (limited to 'tools/perf/scripts/python/export-to-sqlite.py')
0 files changed, 0 insertions, 0 deletions