]> git.baikalelectronics.ru Git - kernel.git/commit
arm64: tlbflush: Ensure start/end of address range are aligned to stride
authorWill Deacon <will.deacon@arm.com>
Tue, 11 Jun 2019 11:47:34 +0000 (12:47 +0100)
committerWill Deacon <will.deacon@arm.com>
Wed, 12 Jun 2019 15:19:45 +0000 (16:19 +0100)
commit7600be68252101415718be6a17894029aa1b6ecb
treee59acccd8a79ac64da328eafa2e93f5fb012d74c
parentae87b83e5560c48d77f035765ea7fd964f1ae7b0
arm64: tlbflush: Ensure start/end of address range are aligned to stride

Since commit ff602d254a55 ("arm64: tlbi: Set MAX_TLBI_OPS to
PTRS_PER_PTE"), we resort to per-ASID invalidation when attempting to
perform more than PTRS_PER_PTE invalidation instructions in a single
call to __flush_tlb_range(). Whilst this is beneficial, the mmu_gather
code does not ensure that the end address of the range is rounded-up
to the stride when freeing intermediate page tables in pXX_free_tlb(),
which defeats our range checking.

Align the bounds passed into __flush_tlb_range().

Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Reported-by: Hanjun Guo <guohanjun@huawei.com>
Tested-by: Hanjun Guo <guohanjun@huawei.com>
Reviewed-by: Hanjun Guo <guohanjun@huawei.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
arch/arm64/include/asm/tlbflush.h