kernel_optimize_test/arch/arm64/mm
Tong Tiangen 018ebe4c18 arm64: fix types in copy_highpage()
[ Upstream commit 921d161f15d6b090599f6a8c23f131969edbd1fa ]

In copy_highpage() the `kto` and `kfrom` local variables are pointers to
struct page, but these are used to hold arbitrary pointers to kernel memory
. Each call to page_address() returns a void pointer to memory associated
with the relevant page, and copy_page() expects void pointers to this
memory.

This inconsistency was introduced in commit 2563776b41 ("arm64: mte:
Tags-aware copy_{user_,}highpage() implementations") and while this
doesn't appear to be harmful in practice it is clearly wrong.

Correct this by making `kto` and `kfrom` void pointers.

Fixes: 2563776b41 ("arm64: mte: Tags-aware copy_{user_,}highpage() implementations")
Signed-off-by: Tong Tiangen <tongtiangen@huawei.com>
Acked-by: Mark Rutland <mark.rutland@arm.com>
Reviewed-by: Kefeng Wang <wangkefeng.wang@huawei.com>
Link: https://lore.kernel.org/r/20220420030418.3189040-3-tongtiangen@huawei.com
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2022-06-09 10:21:06 +02:00
..
cache.S
context.c
copypage.c arm64: fix types in copy_highpage() 2022-06-09 10:21:06 +02:00
dma-mapping.c
extable.c
fault.c arm64: entry: fix EL1 debug transitions 2020-11-30 12:11:38 +00:00
flush.c arm64: Fix race condition on PG_dcache_clean in __sync_icache_dcache() 2021-05-19 10:13:11 +02:00
hugetlbpage.c arm64/hugetlb: fix CMA gigantic page order for non-4K PAGE_SIZE 2021-10-20 11:44:58 +02:00
init.c arm64: Do not defer reserve_crashkernel() for platforms with no DMA memory zones 2022-04-08 14:40:45 +02:00
ioremap.c arm[64]/memremap: don't abuse pfn_valid() to ensure presence of linear map 2022-05-18 10:23:48 +02:00
kasan_init.c arch, drivers: replace for_each_membock() with for_each_mem_range() 2020-10-13 18:38:35 -07:00
Makefile
mmap.c
mmu.c arm64: Do not defer reserve_crashkernel() for platforms with no DMA memory zones 2022-04-08 14:40:45 +02:00
mteswap.c
numa.c memblock: use separate iterators for memory and reserved regions 2020-10-13 18:38:35 -07:00
pageattr.c
pgd.c
physaddr.c arm64: Do not pass tagged addresses to __is_lm_address() 2021-02-07 15:37:13 +01:00
proc.S arm64: consistently use reserved_pg_dir 2021-07-14 16:56:06 +02:00
ptdump_debugfs.c
ptdump.c