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

arm64: mte: Perform CMOs on tag blocks on tagged page freeing/allocation

Make sure that the contents of the tag storage page is not corrupted by
performing:

1. A tag dcache clean+inval when the associated tagged page is freed, to
   avoid dirty tag cache lines being evicted and corrupting the tag
   storage page if it's being used to store data.

2. A data dcache clean+inval when the tag storage page is being
   reserved, to ensure that no dirty data cache lines are present, which
   would trigger a writeback that could corrupt the tags stored in the
   tag storage block.

At boot, there is no policy that the kernel currently enforces wrt dirty
tag cache lines. As such, to prevent dirty tag cache lines from
corrupting tag blocks when used to store data, Linux performs a dcache
clean+inval on the entire memory before un-reserving the tag blocks.
parent e9b9c277
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