mirror-linux/arch/arm64/mm
Catalin Marinas b98c94eed4 arm64: mte: Do not warn if the page is already tagged in copy_highpage()
The arm64 copy_highpage() assumes that the destination page is newly
allocated and not MTE-tagged (PG_mte_tagged unset) and warns
accordingly. However, following commit 060913999d ("mm: migrate:
support poisoned recover from migrate folio"), folio_mc_copy() is called
before __folio_migrate_mapping(). If the latter fails (-EAGAIN), the
copy will be done again to the same destination page. Since
copy_highpage() already set the PG_mte_tagged flag, this second copy
will warn.

Replace the WARN_ON_ONCE(page already tagged) in the arm64
copy_highpage() with a comment.

Reported-by: syzbot+d1974fc28545a3e6218b@syzkaller.appspotmail.com
Link: https://lore.kernel.org/r/68dda1ae.a00a0220.102ee.0065.GAE@google.com
Reviewed-by: David Hildenbrand <david@redhat.com>
Cc: Will Deacon <will@kernel.org>
Cc: Kefeng Wang <wangkefeng.wang@huawei.com>
Cc: stable@vger.kernel.org # 6.12.x
Reviewed-by: Yang Shi <yang@os.amperecomputing.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
2025-10-23 17:34:58 +01:00
..
Makefile mm: rename GENERIC_PTDUMP and PTDUMP_CORE 2025-03-17 00:05:32 -07:00
cache.S
context.c arm64: Ensure bits ASID[15:8] are masked out when the kernel uses 8-bit ASIDs 2024-12-05 11:24:38 +00:00
contpte.c Merge branches 'for-next/livepatch', 'for-next/user-contig-bbml2', 'for-next/misc', 'for-next/acpi', 'for-next/debug-entry', 'for-next/feat_mte_tagged_far', 'for-next/kselftest', 'for-next/mdscr-cleanup' and 'for-next/vmap-stack', remote-tracking branch 'arm64/for-next/perf' into for-next/core 2025-07-24 16:01:22 +01:00
copypage.c arm64: mte: Do not warn if the page is already tagged in copy_highpage() 2025-10-23 17:34:58 +01:00
dma-mapping.c arm64: Properly clean up iommu-dma remnants 2024-05-10 09:04:25 +02:00
extable.c arm64: mm: Handle PAN faults on uaccess CPY* instructions 2025-03-07 18:28:29 +00:00
fault.c Summary of significant series in this pull request: 2025-07-31 14:57:54 -07:00
fixmap.c arm64: Add support for FEAT_HAFT 2024-11-05 13:18:35 +00:00
flush.c mm: introduce memdesc_flags_t 2025-09-13 16:55:07 -07:00
gcs.c arm64/gcs: Don't call gcs_free() when releasing task_struct 2025-07-15 14:58:23 +01:00
hugetlbpage.c arm64/mm: Drop redundant addr increment in set_huge_pte_at() 2025-07-17 11:08:56 +01:00
init.c arm64: map [_text, _stext) virtual address range non-executable+read-only 2025-09-22 11:58:17 +01:00
ioremap.c mm/ioremap: pass pgprot_t to ioremap_prot() instead of unsigned long 2025-03-16 22:06:23 -07:00
kasan_init.c kasan: call kasan_init_generic in kasan_init 2025-09-21 14:21:58 -07:00
mem_encrypt.c arm64: mm: Add top-level dispatcher for internal mem_encrypt API 2024-08-30 16:30:41 +01:00
mmap.c mm: change vm_get_page_prot() to accept vm_flags_t argument 2025-07-09 22:42:13 -07:00
mmu.c arm64 fixes for -rc1 2025-10-07 08:59:25 -07:00
mteswap.c arm64: mm: swap: support THP_SWAP on hardware with MTE 2024-04-25 20:56:07 -07:00
pageattr.c arm64: mm: support large block mapping when rodata=full 2025-09-18 21:36:37 +01:00
pgd.c asm-generic: pgalloc: provide generic __pgd_{alloc,free} 2025-01-25 20:22:24 -08:00
physaddr.c arm64: mm: Don't use %pK through printk 2025-03-20 15:34:53 +00:00
proc.S arm64: mm: split linear mapping if BBML2 unsupported on secondary CPUs 2025-09-19 19:13:54 +01:00
ptdump.c arm64: Enable vmalloc-huge with ptdump 2025-09-22 11:53:24 +01:00
ptdump_debugfs.c mm/ptdump: take the memory hotplug lock inside ptdump_walk_pgd() 2025-07-09 22:42:20 -07:00
trans_pgd-asm.S
trans_pgd.c arm64: Fix 5-level paging support in kexec/hibernate trampoline 2025-02-04 12:23:09 +00:00