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.
Loading
Please register or sign in to comment