• Steven Price's avatar
    arm64: mte: Enable swap of tagged pages · 36943aba
    Steven Price authored
    When swapping pages out to disk it is necessary to save any tags that
    have been set, and restore when swapping back in. Make use of the new
    page flag (PG_ARCH_2, locally named PG_mte_tagged) to identify pages
    with tags. When swapping out these pages the tags are stored in memory
    and later restored when the pages are brought back in. Because shmem can
    swap pages back in without restoring the userspace PTE it is also
    necessary to add a hook for shmem.
    Signed-off-by: default avatarSteven Price <steven.price@arm.com>
    [catalin.marinas@arm.com: move function prototypes to mte.h]
    [catalin.marinas@arm.com: drop '_tags' from arch_swap_restore_tags()]
    Signed-off-by: default avatarCatalin Marinas <catalin.marinas@arm.com>
    Cc: Andrew Morton <akpm@linux-foundation.org>
    Cc: Will Deacon <will@kernel.org>
    36943aba
mte.h 2.22 KB