diff options
author | Zhenyu Ye <[email protected]> | 2021-06-23 15:05:22 +0800 |
---|---|---|
committer | Will Deacon <[email protected]> | 2021-06-23 14:52:57 +0100 |
commit | 52218fcd61cb42bde0d301db4acb3ffdf3463cc7 (patch) | |
tree | db154de45c558012caf4110960e8d59742339395 /tools/perf/scripts/python/export-to-sqlite.py | |
parent | 2062d44da3499eed3c7d005df8f0b54d300ac0b5 (diff) |
arm64: tlb: fix the TTL value of tlb_get_level
The TTL field indicates the level of page table walk holding the *leaf*
entry for the address being invalidated. But currently, the TTL field
may be set to an incorrent value in the following stack:
pte_free_tlb
__pte_free_tlb
tlb_remove_table
tlb_table_invalidate
tlb_flush_mmu_tlbonly
tlb_flush
In this case, we just want to flush a PTE page, but the tlb->cleared_pmds
is set and we get tlb_level = 2 in the tlb_get_level() function. This may
cause some unexpected problems.
This patch set the TTL field to 0 if tlb->freed_tables is set. The
tlb->freed_tables indicates page table pages are freed, not the leaf
entry.
Cc: <[email protected]> # 5.9.x
Fixes: c4ab2cbc1d87 ("arm64: tlb: Set the TTL field in flush_tlb_range")
Acked-by: Catalin Marinas <[email protected]>
Reported-by: ZhuRui <[email protected]>
Signed-off-by: Zhenyu Ye <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Will Deacon <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/export-to-sqlite.py')
0 files changed, 0 insertions, 0 deletions