aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kernel/ptrace.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/x86/kernel/ptrace.c')
-rw-r--r--arch/x86/kernel/ptrace.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/arch/x86/kernel/ptrace.c b/arch/x86/kernel/ptrace.c
index 8f64abe699fd..d5904eef1d31 100644
--- a/arch/x86/kernel/ptrace.c
+++ b/arch/x86/kernel/ptrace.c
@@ -1055,10 +1055,17 @@ static int putreg32(struct task_struct *child, unsigned regno, u32 value)
1055 R32(esi, si); 1055 R32(esi, si);
1056 R32(ebp, bp); 1056 R32(ebp, bp);
1057 R32(eax, ax); 1057 R32(eax, ax);
1058 R32(orig_eax, orig_ax);
1059 R32(eip, ip); 1058 R32(eip, ip);
1060 R32(esp, sp); 1059 R32(esp, sp);
1061 1060
1061 case offsetof(struct user32, regs.orig_eax):
1062 /*
1063 * Sign-extend the value so that orig_eax = -1
1064 * causes (long)orig_ax < 0 tests to fire correctly.
1065 */
1066 regs->orig_ax = (long) (s32) value;
1067 break;
1068
1062 case offsetof(struct user32, regs.eflags): 1069 case offsetof(struct user32, regs.eflags):
1063 return set_flags(child, value); 1070 return set_flags(child, value);
1064 1071