linux-stable/arch/arm64/mm
Tong Tiangen 65d403a1df arm64: fix types in copy_highpage()
[ Upstream commit 921d161f15 ]

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:25:47 +02:00
..
cache.S arm64: remove __dma_*_area() aliases 2021-12-15 11:19:41 +00:00
context.c arm64: mm: Use asid feature macro for cheanup 2021-12-10 18:24:20 +00:00
copypage.c arm64: fix types in copy_highpage() 2022-06-09 10:25:47 +02:00
dma-mapping.c
extable.c arm64: extable: fix load_unaligned_zeropad() reg indices 2022-01-26 18:58:12 +00:00
fault.c Merge branch 'signal-for-v5.17' of git://git.kernel.org/pub/scm/linux/kernel/git/ebiederm/user-namespace 2022-01-17 05:49:30 +02:00
flush.c
hugetlbpage.c Merge branch 'for-next/fixes' into for-next/core 2021-10-29 12:27:53 +01:00
init.c arm64: mm: Drop 'const' from conditional arm64_dma_phys_limit definition 2022-04-08 13:58:59 +02:00
ioremap.c arm[64]/memremap: don't abuse pfn_valid() to ensure presence of linear map 2022-05-18 10:28:22 +02:00
kasan_init.c kasan: add kasan mode messages when kasan init 2021-11-11 09:34:35 -08:00
Makefile arm64: trans_pgd: hibernate: Add trans_pgd_copy_el2_vectors 2021-10-01 13:30:59 +01:00
mmap.c arm64: Ensure execute-only permissions are not allowed without EPAN 2022-03-08 10:03:51 +00:00
mmu.c arm64/mm: avoid fixmap race condition when create pud mapping 2022-04-08 13:57:34 +02:00
mteswap.c
pageattr.c set_memory: allow querying whether set_direct_map_*() is actually enabled 2021-07-08 11:48:20 -07:00
pgd.c
physaddr.c
proc.S arm64: kasan: mte: use a constant kernel GCR_EL1 value 2021-08-02 18:14:21 +01:00
ptdump.c arm64/bpf: Remove 128MB limit for BPF JIT programs 2021-11-08 22:16:26 +01:00
ptdump_debugfs.c
trans_pgd-asm.S arm64: kexec: configure EL2 vectors for kexec 2021-10-01 13:31:00 +01:00
trans_pgd.c arm64: trans_pgd: remove trans_pgd_map_page() 2021-10-01 13:31:01 +01:00