1
0
Fork 0
alistair23-linux/arch/arm64/mm
Will Deacon d23c808c6f arm64: ptdump: Don't iterate kernel page tables using PTRS_PER_PXX
When 52-bit virtual addressing is enabled for userspace
(CONFIG_ARM64_USER_VA_BITS_52=y), the kernel continues to utilise 48-bit
virtual addressing in TTBR1. Consequently, PTRS_PER_PGD reflects the
larger page table size for userspace and the pgd pointer for kernel page
tables is offset before being written to TTBR1.

This means that we can't use PTRS_PER_PGD to iterate over kernel page
tables unless we apply the same offset, which is fiddly to get right and
leads to some non-idiomatic walking code. Instead, just follow the usual
pattern when walking page tables by using a while loop driven by
pXd_offset() and pXd_addr_end().

Reported-by: Qian Cai <cai@lca.pw>
Tested-by: Qian Cai <cai@lca.pw>
Acked-by: Steve Capper <steve.capper@arm.com>
Tested-by: Steve Capper <steve.capper@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
2019-02-04 14:37:38 +00:00
..
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
cache.S arm64: Fix minor issues with the dcache_by_line_op macro 2018-12-10 15:03:51 +00:00
context.c arm64: mm: Drop the unused cpu parameter 2018-10-09 17:17:23 +01:00
copypage.c arm64: Defer dcache flush in __cpu_copy_user_page 2015-12-17 11:07:13 +00:00
dma-mapping.c arm64/xen: fix xen-swiotlb cache flushing 2019-01-23 22:14:56 +01:00
dump.c arm64: ptdump: Don't iterate kernel page tables using PTRS_PER_PXX 2019-02-04 14:37:38 +00:00
extable.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
fault.c kasan, arm64: fix up fault handling logic 2018-12-28 12:11:43 -08:00
flush.c arm64: Do not issue IPIs for user executable ptes 2019-02-01 14:06:50 +00:00
hugetlbpage.c arm64: hugetlb: Register hugepages during arch init 2018-12-06 17:01:13 +00:00
init.c arm64 fixes for -rc1 2019-01-05 11:28:39 -08:00
ioremap.c arm64: use is_vmalloc_addr 2017-02-09 13:47:56 +00:00
kasan_init.c mm/memblock.c: skip kmemleak for kasan_init() 2018-12-28 12:11:49 -08:00
mmap.c exec: pass stack rlimit into mm layout functions 2018-04-11 10:28:37 -07:00
mmu.c lib/ioremap: ensure break-before-make is used for huge p4d mappings 2018-12-28 12:11:50 -08:00
numa.c arm64: Add memory hotplug support 2018-12-12 14:43:43 +00:00
pageattr.c arm64: mm: apply r/o permissions of VM areas to its linear alias as well 2018-11-20 11:38:26 +00:00
pgd.c arm64: handle 52-bit addresses in TTBR 2017-12-22 17:35:21 +00:00
physaddr.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
proc.S kasan, arm64: enable top byte ignore for the kernel 2018-12-28 12:11:43 -08:00
ptdump_debugfs.c ARM64: dump: Convert to use DEFINE_SHOW_ATTRIBUTE macro 2018-07-02 10:36:37 +01:00