Skip to content

Commit 507ea5d

Browse files
brooniectmarinas
authored andcommitted
arm64/fpsimd: Sync FPSIMD state with SVE for SME only systems
Currently we guard FPSIMD/SVE state conversions with a check for the system supporting SVE but SME only systems may need to sync streaming mode SVE state so add a check for SME support too. These functions are only used by the ptrace code. Fixes: e12310a ("arm64/sme: Implement ptrace support for streaming mode SVE registers") Signed-off-by: Mark Brown <broonie@kernel.org> Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20230803-arm64-fix-ptrace-ssve-no-sve-v1-2-49df214bfb3e@kernel.org Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
1 parent 045aecd commit 507ea5d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

arch/arm64/kernel/fpsimd.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -679,7 +679,7 @@ static void fpsimd_to_sve(struct task_struct *task)
679679
void *sst = task->thread.sve_state;
680680
struct user_fpsimd_state const *fst = &task->thread.uw.fpsimd_state;
681681

682-
if (!system_supports_sve())
682+
if (!system_supports_sve() && !system_supports_sme())
683683
return;
684684

685685
vq = sve_vq_from_vl(thread_get_cur_vl(&task->thread));
@@ -705,7 +705,7 @@ static void sve_to_fpsimd(struct task_struct *task)
705705
unsigned int i;
706706
__uint128_t const *p;
707707

708-
if (!system_supports_sve())
708+
if (!system_supports_sve() && !system_supports_sme())
709709
return;
710710

711711
vl = thread_get_cur_vl(&task->thread);

0 commit comments

Comments
 (0)