Commit 98db725
Marc Zyngier
KVM: arm64: Set the MTE tag bit before releasing the page
Setting a page flag without holding a reference to the page
is living dangerously. In the tag-writing path, we drop the
reference to the page by calling kvm_release_pfn_dirty(),
and only then set the PG_mte_tagged bit.
It would be safer to do it the other way round.
Fixes: f0376ed ("KVM: arm64: Add ioctl to fetch/store tags in a guest")
Cc: Catalin Marinas <catalin.marinas@arm.com>
Reviewed-by: Steven Price <steven.price@arm.com>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/87k0mjidwb.wl-maz@kernel.org1 parent 04c02c2 commit 98db725
1 file changed
Lines changed: 8 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1053 | 1053 | | |
1054 | 1054 | | |
1055 | 1055 | | |
| 1056 | + | |
| 1057 | + | |
| 1058 | + | |
| 1059 | + | |
| 1060 | + | |
| 1061 | + | |
| 1062 | + | |
| 1063 | + | |
1056 | 1064 | | |
1057 | 1065 | | |
1058 | 1066 | | |
| |||
1061 | 1069 | | |
1062 | 1070 | | |
1063 | 1071 | | |
1064 | | - | |
1065 | | - | |
1066 | | - | |
1067 | | - | |
1068 | 1072 | | |
1069 | 1073 | | |
1070 | 1074 | | |
| |||
0 commit comments