Skip to content

Commit 7dde62f

Browse files
brooniewilldeacon
authored andcommitted
arm64/signal: Always accept SVE signal frames on SME only systems
Currently we reject an attempt to restore a SVE signal frame on a system with SME but not SVE supported. This means that it is not possible to disable streaming mode via signal return as this is configured via the flags in the SVE signal context. Instead accept the signal frame, we will require it to have a vector length of 0 specified and no payload since the task will have no SVE vector length configured. Fixes: 85ed24d ("arm64/sme: Implement streaming SVE signal handling") Signed-off-by: Mark Brown <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Will Deacon <[email protected]>
1 parent 0cab5b4 commit 7dde62f

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

arch/arm64/kernel/signal.c

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -281,7 +281,12 @@ static int restore_sve_fpsimd_context(struct user_ctxs *user)
281281

282282
vl = task_get_sme_vl(current);
283283
} else {
284-
if (!system_supports_sve())
284+
/*
285+
* A SME only system use SVE for streaming mode so can
286+
* have a SVE formatted context with a zero VL and no
287+
* payload data.
288+
*/
289+
if (!system_supports_sve() && !system_supports_sme())
285290
return -EINVAL;
286291

287292
vl = task_get_sve_vl(current);

0 commit comments

Comments
 (0)