diff options
Diffstat (limited to 'arch/x86/kernel/ptrace_64.c')
-rw-r--r-- | arch/x86/kernel/ptrace_64.c | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/arch/x86/kernel/ptrace_64.c b/arch/x86/kernel/ptrace_64.c index 4ba66d8af717..bee20bb1a6c0 100644 --- a/arch/x86/kernel/ptrace_64.c +++ b/arch/x86/kernel/ptrace_64.c | |||
@@ -119,7 +119,7 @@ static int putreg(struct task_struct *child, | |||
119 | clear_tsk_thread_flag(child, TIF_FORCED_TF); | 119 | clear_tsk_thread_flag(child, TIF_FORCED_TF); |
120 | else if (test_tsk_thread_flag(child, TIF_FORCED_TF)) | 120 | else if (test_tsk_thread_flag(child, TIF_FORCED_TF)) |
121 | value |= X86_EFLAGS_TF; | 121 | value |= X86_EFLAGS_TF; |
122 | value |= regs->eflags & ~FLAG_MASK; | 122 | value |= regs->flags & ~FLAG_MASK; |
123 | break; | 123 | break; |
124 | case offsetof(struct user_regs_struct,cs): | 124 | case offsetof(struct user_regs_struct,cs): |
125 | if ((value & 3) != 3) | 125 | if ((value & 3) != 3) |
@@ -168,7 +168,7 @@ static unsigned long getreg(struct task_struct *child, unsigned long regno) | |||
168 | /* | 168 | /* |
169 | * If the debugger set TF, hide it from the readout. | 169 | * If the debugger set TF, hide it from the readout. |
170 | */ | 170 | */ |
171 | val = regs->eflags; | 171 | val = regs->flags; |
172 | if (test_tsk_thread_flag(child, TIF_IA32)) | 172 | if (test_tsk_thread_flag(child, TIF_IA32)) |
173 | val &= 0xffffffff; | 173 | val &= 0xffffffff; |
174 | if (test_tsk_thread_flag(child, TIF_FORCED_TF)) | 174 | if (test_tsk_thread_flag(child, TIF_FORCED_TF)) |
@@ -383,9 +383,9 @@ static void syscall_trace(struct pt_regs *regs) | |||
383 | { | 383 | { |
384 | 384 | ||
385 | #if 0 | 385 | #if 0 |
386 | printk("trace %s rip %lx rsp %lx rax %d origrax %d caller %lx tiflags %x ptrace %x\n", | 386 | printk("trace %s ip %lx sp %lx ax %d origrax %d caller %lx tiflags %x ptrace %x\n", |
387 | current->comm, | 387 | current->comm, |
388 | regs->rip, regs->rsp, regs->rax, regs->orig_rax, __builtin_return_address(0), | 388 | regs->ip, regs->sp, regs->ax, regs->orig_ax, __builtin_return_address(0), |
389 | current_thread_info()->flags, current->ptrace); | 389 | current_thread_info()->flags, current->ptrace); |
390 | #endif | 390 | #endif |
391 | 391 | ||
@@ -405,7 +405,7 @@ static void syscall_trace(struct pt_regs *regs) | |||
405 | asmlinkage void syscall_trace_enter(struct pt_regs *regs) | 405 | asmlinkage void syscall_trace_enter(struct pt_regs *regs) |
406 | { | 406 | { |
407 | /* do the secure computing check first */ | 407 | /* do the secure computing check first */ |
408 | secure_computing(regs->orig_rax); | 408 | secure_computing(regs->orig_ax); |
409 | 409 | ||
410 | if (test_thread_flag(TIF_SYSCALL_TRACE) | 410 | if (test_thread_flag(TIF_SYSCALL_TRACE) |
411 | && (current->ptrace & PT_PTRACED)) | 411 | && (current->ptrace & PT_PTRACED)) |
@@ -414,14 +414,14 @@ asmlinkage void syscall_trace_enter(struct pt_regs *regs) | |||
414 | if (unlikely(current->audit_context)) { | 414 | if (unlikely(current->audit_context)) { |
415 | if (test_thread_flag(TIF_IA32)) { | 415 | if (test_thread_flag(TIF_IA32)) { |
416 | audit_syscall_entry(AUDIT_ARCH_I386, | 416 | audit_syscall_entry(AUDIT_ARCH_I386, |
417 | regs->orig_rax, | 417 | regs->orig_ax, |
418 | regs->rbx, regs->rcx, | 418 | regs->bx, regs->cx, |
419 | regs->rdx, regs->rsi); | 419 | regs->dx, regs->si); |
420 | } else { | 420 | } else { |
421 | audit_syscall_entry(AUDIT_ARCH_X86_64, | 421 | audit_syscall_entry(AUDIT_ARCH_X86_64, |
422 | regs->orig_rax, | 422 | regs->orig_ax, |
423 | regs->rdi, regs->rsi, | 423 | regs->di, regs->si, |
424 | regs->rdx, regs->r10); | 424 | regs->dx, regs->r10); |
425 | } | 425 | } |
426 | } | 426 | } |
427 | } | 427 | } |
@@ -429,7 +429,7 @@ asmlinkage void syscall_trace_enter(struct pt_regs *regs) | |||
429 | asmlinkage void syscall_trace_leave(struct pt_regs *regs) | 429 | asmlinkage void syscall_trace_leave(struct pt_regs *regs) |
430 | { | 430 | { |
431 | if (unlikely(current->audit_context)) | 431 | if (unlikely(current->audit_context)) |
432 | audit_syscall_exit(AUDITSC_RESULT(regs->rax), regs->rax); | 432 | audit_syscall_exit(AUDITSC_RESULT(regs->ax), regs->ax); |
433 | 433 | ||
434 | if ((test_thread_flag(TIF_SYSCALL_TRACE) | 434 | if ((test_thread_flag(TIF_SYSCALL_TRACE) |
435 | || test_thread_flag(TIF_SINGLESTEP)) | 435 | || test_thread_flag(TIF_SINGLESTEP)) |