1
0
Fork 0
alistair23-linux/arch/arm64/mm
Andrey Konovalov 3ed86b9a71 kasan, arm64: fix pointer tags in KASAN reports
As of the "arm64: expose FAR_EL1 tag bits in siginfo" patch, the address
that is passed to report_tag_fault has pointer tags in the format of 0x0X,
while KASAN uses 0xFX format (note the difference in the top 4 bits).

Fix up the pointer tag for kernel pointers in do_tag_check_fault by
setting them to the same value as bit 55. Explicitly use __untagged_addr()
instead of untagged_addr(), as the latter doesn't affect TTBR1 addresses.

Fixes: dceec3ff78 ("arm64: expose FAR_EL1 tag bits in siginfo")
Fixes: 4291e9ee61 ("kasan, arm64: print report from tag fault handler")
Signed-off-by: Andrey Konovalov <andreyknvl@google.com>
Reviewed-by: Catalin Marinas <catalin.marinas@arm.com>
Reviewed-by: Vincenzo Frascino <vincenzo.frascino@arm.com>
Link: https://linux-review.googlesource.com/id/I9ced973866036d8679e8f4ae325de547eb969649
Link: https://lore.kernel.org/r/ff30b0afe6005fd046f9ac72bfb71822aedccd89.1610731872.git.andreyknvl@google.com
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
2021-01-18 18:15:49 +00:00
..
Makefile Merge branch 'for-next/mte' into for-next/core 2020-10-02 12:16:11 +01:00
cache.S arm64: mm: Use modern annotations for assembly functions 2020-01-08 12:23:38 +00:00
context.c arm64: mm: Pin down ASIDs for sharing mm with devices 2020-09-28 22:15:38 +01:00
copypage.c arm64: mte: reset the page tag in page->flags 2020-12-22 12:55:07 -08:00
dma-mapping.c dma-mapping: merge <linux/dma-noncoherent.h> into <linux/dma-map-ops.h> 2020-10-06 07:07:06 +02:00
extable.c arm64: Improve diagnostics when trapping BRK with FAULT_BRK_IMM 2020-09-18 16:35:54 +01:00
fault.c kasan, arm64: fix pointer tags in KASAN reports 2021-01-18 18:15:49 +00:00
flush.c mm: introduce page_size() 2019-09-24 15:54:08 -07:00
hugetlbpage.c mm: remove unneeded includes of <asm/pgalloc.h> 2020-08-07 11:33:26 -07:00
init.c arm64: Remove arm64_dma32_phys_limit and its uses 2021-01-12 17:49:25 +00:00
ioremap.c mm: remove unneeded includes of <asm/pgalloc.h> 2020-08-07 11:33:26 -07:00
kasan_init.c kasan, arm64: rename kasan_init_tags and mark as __init 2020-12-22 12:55:07 -08:00
mmap.c arm64: Use the generic devmem_is_allowed() 2020-12-11 12:28:35 -08:00
mmu.c Merge remote-tracking branch 'arm64/for-next/fixes' into for-next/core 2020-12-09 18:04:55 +00:00
mteswap.c arm64: mte: reset the page tag in page->flags 2020-12-22 12:55:07 -08:00
numa.c memblock: use separate iterators for memory and reserved regions 2020-10-13 18:38:35 -07:00
pageattr.c arch, mm: make kernel_page_present() always available 2020-12-15 12:13:43 -08:00
pgd.c mm: consolidate pgtable_cache_init() and pgd_cache_init() 2019-09-24 15:54:09 -07: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 arm64: kasan: Set TCR_EL1.TBID1 when KASAN_HW_TAGS is enabled 2021-01-05 17:52:19 +00:00
ptdump.c kasan, arm64: expand CONFIG_KASAN checks 2020-12-22 12:55:08 -08:00
ptdump_debugfs.c arm64/mm: Hold memory hotplug lock while walking for kernel page table dump 2020-03-04 15:35:22 +00:00