ARM: fix PTRACE_SETVFPREGS on SMP systems
Subsystems (2)
PATCH 1/1 ARM: fix PTRACE_SETVFPREGS on SMP systems
PTRACE_SETVFPREGS fails to properly mark the VFP register set to be reloaded, because it undoes one of the effects of vfp_flush_hwstate().
Specifically vfp_flush_hwstate() sets thread->vfpstate.hard.cpu to an invalid CPU number, but vfp_set() overwrites this with the original CPU number, thereby rendering the hardware state as apparently "valid", even though the software state is more recent.
Fix this by reverting the previous change.
---
Will, please ack this.
arch/arm/kernel/ptrace.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/kernel/ptrace.c +1 -1
@@ -733,8 +733,8 @@ static int vfp_set(struct task_struct *target,if (ret)return ret; -vfp_flush_hwstate (thread); thread->vfpstate.hard = new_vfp; +vfp_flush_hwstate (thread);return 0 ; }
Signature · 1 line
2.1.0
PATCH 1/1 ARM: fix PTRACE_SETVFPREGS on SMP systems
Quoted 8 lines · Russell King
PTRACE_SETVFPREGSfails to properly mark the VFP register set to be reloaded, because it undoes one of the effects ofvfp_flush_hwstate().Specifically
vfp_flush_hwstate()setsthread->vfpstate.hard.cputo an invalid CPU number, butvfp_set()overwrites this with the original CPU number, thereby rendering the hardware state as apparently "valid", even though the software state is more recent.
Quoted 7 lines
Fix this by reverting the previous change.
Cc <[email protected]>Fixes 8130b9d7b9d8 ("ARM: 7308/1: vfp: flush thread hwstate before copying ptrace registers")Signed-off-by Russell King <[email protected]>---
Will, please ack this.
Will
Quoted 27 lines
arch/arm/kernel/ptrace.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)arch/arm/kernel/ptrace.c +1
-1@@ -733,8 +733,8 @@ static int vfp_set(struct task_struct *target,if (ret)return ret; -vfp_flush_hwstate (thread); thread->vfpstate.hard = new_vfp; +vfp_flush_hwstate (thread);return 0 ; }Signature · 7 lines
2.1.0 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel at lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel