arm64: mte: Tags-aware copy_{user_,}highpage() implementations
authorVincenzo Frascino <vincenzo.frascino@arm.com>
Tue, 6 Aug 2019 10:37:53 +0000 (11:37 +0100)
committerCatalin Marinas <catalin.marinas@arm.com>
Fri, 4 Sep 2020 11:46:06 +0000 (12:46 +0100)
commit2563776b41c3190849c6b011c72b47bff314963d
treee2ae176783c6a2d18fccf3e6927ec01289534ed8
parent34bfeea4a9e9cdae713637541f240c3adfdfede3
arm64: mte: Tags-aware copy_{user_,}highpage() implementations

When the Memory Tagging Extension is enabled, the tags need to be
preserved across page copy (e.g. for copy-on-write, page migration).

Introduce MTE-aware copy_{user_,}highpage() functions to copy tags to
the destination if the source page has the PG_mte_tagged flag set.
copy_user_page() does not need to handle tag copying since, with this
patch, it is only called by the DAX code where there is no source page
structure (and no source tags).

Signed-off-by: Vincenzo Frascino <vincenzo.frascino@arm.com>
Co-developed-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Cc: Will Deacon <will@kernel.org>
arch/arm64/include/asm/mte.h
arch/arm64/include/asm/page.h
arch/arm64/lib/mte.S
arch/arm64/mm/copypage.c