arm64: mte: Fix tag migration for pages without tag storage reserved
If a tagged page is replaced by a page without tag storage, two things happen: * The tags are saved in an array indexed by the pfn of the destination page, to be restored when tag storage is restored for the destination page. * The destination page is mapped as invalid, to trigger a page fault on access which will reserve tag storage. However, if the destination page of the first migration is migrated before tag storage is reserved (and, therefore, is never mapped as tagged), the tags will be lost and never be restored for the page that will be replacing it. Fix this by having copy_highpage() check if there are tags saved for the source page, even if the source page is not tagged.
Loading
Please register or sign in to comment