diff options
Diffstat (limited to 'arch/x86/kernel/ptrace.c')
-rw-r--r-- | arch/x86/kernel/ptrace.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/arch/x86/kernel/ptrace.c b/arch/x86/kernel/ptrace.c index 3d9672e59c1..fe9345c967d 100644 --- a/arch/x86/kernel/ptrace.c +++ b/arch/x86/kernel/ptrace.c | |||
@@ -21,6 +21,7 @@ | |||
21 | #include <linux/audit.h> | 21 | #include <linux/audit.h> |
22 | #include <linux/seccomp.h> | 22 | #include <linux/seccomp.h> |
23 | #include <linux/signal.h> | 23 | #include <linux/signal.h> |
24 | #include <linux/ftrace.h> | ||
24 | 25 | ||
25 | #include <asm/uaccess.h> | 26 | #include <asm/uaccess.h> |
26 | #include <asm/pgtable.h> | 27 | #include <asm/pgtable.h> |
@@ -685,9 +686,8 @@ static int ptrace_bts_config(struct task_struct *child, | |||
685 | if (!cfg.signal) | 686 | if (!cfg.signal) |
686 | return -EINVAL; | 687 | return -EINVAL; |
687 | 688 | ||
688 | return -EOPNOTSUPP; | ||
689 | |||
690 | child->thread.bts_ovfl_signal = cfg.signal; | 689 | child->thread.bts_ovfl_signal = cfg.signal; |
690 | return -EOPNOTSUPP; | ||
691 | } | 691 | } |
692 | 692 | ||
693 | if ((cfg.flags & PTRACE_BTS_O_ALLOC) && | 693 | if ((cfg.flags & PTRACE_BTS_O_ALLOC) && |
@@ -1416,6 +1416,9 @@ asmregparm long syscall_trace_enter(struct pt_regs *regs) | |||
1416 | tracehook_report_syscall_entry(regs)) | 1416 | tracehook_report_syscall_entry(regs)) |
1417 | ret = -1L; | 1417 | ret = -1L; |
1418 | 1418 | ||
1419 | if (unlikely(test_thread_flag(TIF_SYSCALL_FTRACE))) | ||
1420 | ftrace_syscall_enter(regs); | ||
1421 | |||
1419 | if (unlikely(current->audit_context)) { | 1422 | if (unlikely(current->audit_context)) { |
1420 | if (IS_IA32) | 1423 | if (IS_IA32) |
1421 | audit_syscall_entry(AUDIT_ARCH_I386, | 1424 | audit_syscall_entry(AUDIT_ARCH_I386, |
@@ -1439,6 +1442,9 @@ asmregparm void syscall_trace_leave(struct pt_regs *regs) | |||
1439 | if (unlikely(current->audit_context)) | 1442 | if (unlikely(current->audit_context)) |
1440 | audit_syscall_exit(AUDITSC_RESULT(regs->ax), regs->ax); | 1443 | audit_syscall_exit(AUDITSC_RESULT(regs->ax), regs->ax); |
1441 | 1444 | ||
1445 | if (unlikely(test_thread_flag(TIF_SYSCALL_FTRACE))) | ||
1446 | ftrace_syscall_exit(regs); | ||
1447 | |||
1442 | if (test_thread_flag(TIF_SYSCALL_TRACE)) | 1448 | if (test_thread_flag(TIF_SYSCALL_TRACE)) |
1443 | tracehook_report_syscall_exit(regs, 0); | 1449 | tracehook_report_syscall_exit(regs, 0); |
1444 | 1450 | ||
@@ -1456,6 +1462,6 @@ asmregparm void syscall_trace_leave(struct pt_regs *regs) | |||
1456 | * system call instruction. | 1462 | * system call instruction. |
1457 | */ | 1463 | */ |
1458 | if (test_thread_flag(TIF_SINGLESTEP) && | 1464 | if (test_thread_flag(TIF_SINGLESTEP) && |
1459 | tracehook_consider_fatal_signal(current, SIGTRAP, SIG_DFL)) | 1465 | tracehook_consider_fatal_signal(current, SIGTRAP)) |
1460 | send_sigtrap(current, regs, 0, TRAP_BRKPT); | 1466 | send_sigtrap(current, regs, 0, TRAP_BRKPT); |
1461 | } | 1467 | } |