Commit 054d627
arm64/fpsimd: ptrace: Save task state before generating SVE header
As sve_init_header_from_task() consumes the saved value of PSTATE.SM and
the saved fp_type, both must be saved before the header is generated.
When generating a coredump for the current task, sve_get_common() calls
sve_init_header_from_task() before saving the task's state. Consequently
the header may be bogus, and the contents of the regset may be
misleading.
Fix this by saving the task's state before generting the header.
Fixes: e12310a ("arm64/sme: Implement ptrace support for streaming mode SVE registers")
Fixes: b017a0c ("arm64/ptrace: Use saved floating point state type to determine SVE layout")
Signed-off-by: Mark Rutland <[email protected]>
Cc: Catalin Marinas <[email protected]>
Cc: David Spickett <[email protected]>
Cc: Luis Machado <[email protected]>
Cc: Marc Zyngier <[email protected]>
Cc: Mark Brown <[email protected]>
Cc: Will Deacon <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Will Deacon <[email protected]>1 parent b87c8c4 commit 054d627
1 file changed
+3
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
820 | 820 | | |
821 | 821 | | |
822 | 822 | | |
| 823 | + | |
| 824 | + | |
| 825 | + | |
823 | 826 | | |
824 | 827 | | |
825 | 828 | | |
826 | 829 | | |
827 | 830 | | |
828 | 831 | | |
829 | | - | |
830 | | - | |
831 | | - | |
832 | 832 | | |
833 | 833 | | |
834 | 834 | | |
| |||
0 commit comments