Skip to content

Commit c783023

Browse files
committed
Merge tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux
Pull arm64 fix from Catalin Marinas: "arm64/ptrace fix to use the correct SVE layout based on the saved floating point state rather than the TIF_SVE flag. The latter may be left on during syscalls even if the SVE state is discarded" * tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux: arm64/ptrace: Use saved floating point state type to determine SVE layout
2 parents 261b8e8 + b017a0c commit c783023

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

arch/arm64/kernel/ptrace.c

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -761,7 +761,6 @@ static void sve_init_header_from_task(struct user_sve_header *header,
761761
{
762762
unsigned int vq;
763763
bool active;
764-
bool fpsimd_only;
765764
enum vec_type task_type;
766765

767766
memset(header, 0, sizeof(*header));
@@ -777,20 +776,18 @@ static void sve_init_header_from_task(struct user_sve_header *header,
777776
case ARM64_VEC_SVE:
778777
if (test_tsk_thread_flag(target, TIF_SVE_VL_INHERIT))
779778
header->flags |= SVE_PT_VL_INHERIT;
780-
fpsimd_only = !test_tsk_thread_flag(target, TIF_SVE);
781779
break;
782780
case ARM64_VEC_SME:
783781
if (test_tsk_thread_flag(target, TIF_SME_VL_INHERIT))
784782
header->flags |= SVE_PT_VL_INHERIT;
785-
fpsimd_only = false;
786783
break;
787784
default:
788785
WARN_ON_ONCE(1);
789786
return;
790787
}
791788

792789
if (active) {
793-
if (fpsimd_only) {
790+
if (target->thread.fp_type == FP_STATE_FPSIMD) {
794791
header->flags |= SVE_PT_REGS_FPSIMD;
795792
} else {
796793
header->flags |= SVE_PT_REGS_SVE;

0 commit comments

Comments
 (0)