aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/x86/kernel/ptrace.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/arch/x86/kernel/ptrace.c b/arch/x86/kernel/ptrace.c
index 52222fab99f4..7b058a2dc66a 100644
--- a/arch/x86/kernel/ptrace.c
+++ b/arch/x86/kernel/ptrace.c
@@ -1111,10 +1111,22 @@ static int putreg32(struct task_struct *child, unsigned regno, u32 value)
1111 R32(esi, si); 1111 R32(esi, si);
1112 R32(ebp, bp); 1112 R32(ebp, bp);
1113 R32(eax, ax); 1113 R32(eax, ax);
1114 R32(orig_eax, orig_ax);
1115 R32(eip, ip); 1114 R32(eip, ip);
1116 R32(esp, sp); 1115 R32(esp, sp);
1117 1116
1117 case offsetof(struct user32, regs.orig_eax):
1118 /*
1119 * A 32-bit debugger setting orig_eax means to restore
1120 * the state of the task restarting a 32-bit syscall.
1121 * Make sure we interpret the -ERESTART* codes correctly
1122 * in case the task is not actually still sitting at the
1123 * exit from a 32-bit syscall with TS_COMPAT still set.
1124 */
1125 regs->orig_ax = value;
1126 if (syscall_get_nr(child, regs) >= 0)
1127 task_thread_info(child)->status |= TS_COMPAT;
1128 break;
1129
1118 case offsetof(struct user32, regs.eflags): 1130 case offsetof(struct user32, regs.eflags):
1119 return set_flags(child, value); 1131 return set_flags(child, value);
1120 1132