Commit 2dbf12a
KVM: arm64: Simplify the sanitise_mte_tags() logic
Currently sanitise_mte_tags() checks if it's an online page before
attempting to sanitise the tags. Such detection should be done in the
caller via the VM_MTE_ALLOWED vma flag. Since kvm_set_spte_gfn() does
not have the vma, leave the page unmapped if not already tagged. Tag
initialisation will be done on a subsequent access fault in
user_mem_abort().
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
[pcc@google.com: fix the page initializer]
Signed-off-by: Peter Collingbourne <pcc@google.com>
Reviewed-by: Steven Price <steven.price@arm.com>
Cc: Will Deacon <will@kernel.org>
Cc: Marc Zyngier <maz@kernel.org>
Cc: Peter Collingbourne <pcc@google.com>
Reviewed-by: Cornelia Huck <cohuck@redhat.com>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20221104011041.290951-4-pcc@google.com1 parent e059853 commit 2dbf12a
1 file changed
Lines changed: 15 additions & 25 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1091 | 1091 | | |
1092 | 1092 | | |
1093 | 1093 | | |
1094 | | - | |
1095 | | - | |
| 1094 | + | |
| 1095 | + | |
1096 | 1096 | | |
1097 | 1097 | | |
1098 | | - | |
| 1098 | + | |
1099 | 1099 | | |
1100 | 1100 | | |
1101 | | - | |
1102 | | - | |
1103 | | - | |
1104 | | - | |
1105 | | - | |
1106 | | - | |
1107 | | - | |
1108 | | - | |
1109 | | - | |
1110 | | - | |
| 1101 | + | |
1111 | 1102 | | |
1112 | 1103 | | |
1113 | 1104 | | |
1114 | 1105 | | |
1115 | 1106 | | |
1116 | 1107 | | |
1117 | 1108 | | |
1118 | | - | |
1119 | | - | |
1120 | 1109 | | |
1121 | 1110 | | |
1122 | 1111 | | |
| |||
1127 | 1116 | | |
1128 | 1117 | | |
1129 | 1118 | | |
1130 | | - | |
1131 | 1119 | | |
1132 | 1120 | | |
1133 | 1121 | | |
| |||
1177 | 1165 | | |
1178 | 1166 | | |
1179 | 1167 | | |
1180 | | - | |
1181 | | - | |
1182 | 1168 | | |
1183 | 1169 | | |
1184 | 1170 | | |
| |||
1299 | 1285 | | |
1300 | 1286 | | |
1301 | 1287 | | |
1302 | | - | |
1303 | | - | |
1304 | | - | |
| 1288 | + | |
| 1289 | + | |
| 1290 | + | |
| 1291 | + | |
1305 | 1292 | | |
1306 | | - | |
1307 | 1293 | | |
| 1294 | + | |
1308 | 1295 | | |
1309 | 1296 | | |
1310 | 1297 | | |
| |||
1526 | 1513 | | |
1527 | 1514 | | |
1528 | 1515 | | |
1529 | | - | |
1530 | 1516 | | |
1531 | 1517 | | |
1532 | 1518 | | |
1533 | 1519 | | |
1534 | 1520 | | |
1535 | 1521 | | |
1536 | | - | |
1537 | | - | |
| 1522 | + | |
| 1523 | + | |
| 1524 | + | |
| 1525 | + | |
| 1526 | + | |
| 1527 | + | |
1538 | 1528 | | |
1539 | 1529 | | |
1540 | 1530 | | |
| |||
0 commit comments