Commit dfd73e5
arm64: kfence: Avoid NOMAP tricks when mapping the early pool
Now that the map_mem() routines respect existing page mappings and
contiguous granule sized blocks with the contiguous bit cleared, there
is no longer a reason to play tricks with the memblock NOMAP attribute.
Instead, the kfence pool can be allocated and mapped with page
granularity first, and this granularity will be respected when the rest
of DRAM is mapped later, even if block and contiguous mappings are
allowed for the remainder of those mappings.
Add the NO_EXEC_MAPPINGS flag to ensure that hierarchical XN attributes
are set on the intermediate page tables that are allocated when mapping
the pool.
Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
Reviewed-by: Kevin Brodsky <kevin.brodsky@arm.com>
Signed-off-by: Will Deacon <will@kernel.org>1 parent 05c5c31 commit dfd73e5
1 file changed
Lines changed: 6 additions & 21 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1083 | 1083 | | |
1084 | 1084 | | |
1085 | 1085 | | |
1086 | | - | |
| 1086 | + | |
1087 | 1087 | | |
1088 | 1088 | | |
1089 | 1089 | | |
1090 | 1090 | | |
1091 | | - | |
| 1091 | + | |
1092 | 1092 | | |
1093 | 1093 | | |
1094 | 1094 | | |
1095 | 1095 | | |
1096 | 1096 | | |
1097 | | - | |
1098 | | - | |
1099 | | - | |
1100 | | - | |
1101 | | - | |
1102 | | - | |
1103 | | - | |
1104 | | - | |
1105 | | - | |
1106 | | - | |
1107 | | - | |
1108 | | - | |
1109 | 1097 | | |
| 1098 | + | |
1110 | 1099 | | |
1111 | 1100 | | |
1112 | 1101 | | |
1113 | 1102 | | |
1114 | | - | |
1115 | | - | |
| 1103 | + | |
1116 | 1104 | | |
1117 | 1105 | | |
1118 | 1106 | | |
| |||
1144 | 1132 | | |
1145 | 1133 | | |
1146 | 1134 | | |
1147 | | - | |
1148 | | - | |
| 1135 | + | |
1149 | 1136 | | |
1150 | 1137 | | |
1151 | 1138 | | |
| |||
1155 | 1142 | | |
1156 | 1143 | | |
1157 | 1144 | | |
1158 | | - | |
1159 | 1145 | | |
1160 | 1146 | | |
1161 | 1147 | | |
| |||
1172 | 1158 | | |
1173 | 1159 | | |
1174 | 1160 | | |
1175 | | - | |
| 1161 | + | |
1176 | 1162 | | |
1177 | 1163 | | |
1178 | 1164 | | |
| |||
1210 | 1196 | | |
1211 | 1197 | | |
1212 | 1198 | | |
1213 | | - | |
1214 | 1199 | | |
1215 | 1200 | | |
1216 | 1201 | | |
| |||
0 commit comments