summaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorMark Brown <broonie@kernel.org>2022-12-27 17:12:05 +0000
committerWill Deacon <will@kernel.org>2023-01-05 15:31:18 +0000
commit7dde62f0687c8856b6c0660066c7ee83a6a6f033 (patch)
tree6c731b6c09145bb1f536d1d0038ca17a2055546d /arch
parent0cab5b4964c7064893e6ff5e81087a9206c63908 (diff)
downloadlinux-stable-7dde62f0687c8856b6c0660066c7ee83a6a6f033.tar.gz
linux-stable-7dde62f0687c8856b6c0660066c7ee83a6a6f033.tar.bz2
linux-stable-7dde62f0687c8856b6c0660066c7ee83a6a6f033.zip
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: 85ed24dad290 ("arm64/sme: Implement streaming SVE signal handling") Signed-off-by: Mark Brown <broonie@kernel.org> Link: https://lore.kernel.org/r/20221223-arm64-fix-sme-only-v1-2-938d663f69e5@kernel.org Signed-off-by: Will Deacon <will@kernel.org>
Diffstat (limited to 'arch')
-rw-r--r--arch/arm64/kernel/signal.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/arch/arm64/kernel/signal.c b/arch/arm64/kernel/signal.c
index e0d09bf5b01b..f90ee2dc413c 100644
--- a/arch/arm64/kernel/signal.c
+++ b/arch/arm64/kernel/signal.c
@@ -281,7 +281,12 @@ static int restore_sve_fpsimd_context(struct user_ctxs *user)
vl = task_get_sme_vl(current);
} else {
- if (!system_supports_sve())
+ /*
+ * A SME only system use SVE for streaming mode so can
+ * have a SVE formatted context with a zero VL and no
+ * payload data.
+ */
+ if (!system_supports_sve() && !system_supports_sme())
return -EINVAL;
vl = task_get_sve_vl(current);