Skip to content
Commit fddbc7ef authored by Alexandru Elisei's avatar Alexandru Elisei
Browse files

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.
parent 8721634d
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment