Commit 2f43f54
arm64/ptrace: Ensure that the task sees ZT writes on first use
When the value of ZT is set via ptrace we don't disable traps for SME.
This means that when a the task has never used SME before then the value
set via ptrace will never be seen by the target task since it will
trigger a SME access trap which will flush the register state.
Disable SME traps when setting ZT, this means we also need to allocate
storage for SVE if it is not already allocated, for the benefit of
streaming SVE.
Fixes: f90b529 ("arm64/sme: Implement ZT0 ptrace support")
Signed-off-by: Mark Brown <broonie@kernel.org>
Cc: <stable@vger.kernel.org> # 6.3.x
Link: https://lore.kernel.org/r/20230816-arm64-zt-ptrace-first-use-v2-1-00aa82847e28@kernel.org
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>1 parent 5d0a8d2 commit 2f43f54
1 file changed
Lines changed: 8 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1177 | 1177 | | |
1178 | 1178 | | |
1179 | 1179 | | |
| 1180 | + | |
| 1181 | + | |
| 1182 | + | |
| 1183 | + | |
| 1184 | + | |
1180 | 1185 | | |
1181 | 1186 | | |
1182 | 1187 | | |
| |||
1186 | 1191 | | |
1187 | 1192 | | |
1188 | 1193 | | |
1189 | | - | |
| 1194 | + | |
1190 | 1195 | | |
| 1196 | + | |
| 1197 | + | |
1191 | 1198 | | |
1192 | 1199 | | |
1193 | 1200 | | |
| |||
0 commit comments