diff options
author | Dan Williams <dan.j.williams@intel.com> | 2009-09-08 20:55:21 -0400 |
---|---|---|
committer | Dan Williams <dan.j.williams@intel.com> | 2009-09-08 20:55:21 -0400 |
commit | bbb20089a3275a19e475dbc21320c3742e3ca423 (patch) | |
tree | 216fdc1cbef450ca688135c5b8969169482d9a48 /arch/s390/kernel/ptrace.c | |
parent | 3e48e656903e9fd8bc805c6a2c4264d7808d315b (diff) | |
parent | 657a77fa7284d8ae28dfa48f1dc5d919bf5b2843 (diff) |
Merge branch 'dmaengine' into async-tx-next
Conflicts:
crypto/async_tx/async_xor.c
drivers/dma/ioat/dma_v2.h
drivers/dma/ioat/pci.c
drivers/md/raid5.c
Diffstat (limited to 'arch/s390/kernel/ptrace.c')
-rw-r--r-- | arch/s390/kernel/ptrace.c | 23 |
1 files changed, 16 insertions, 7 deletions
diff --git a/arch/s390/kernel/ptrace.c b/arch/s390/kernel/ptrace.c index 75c496f4f16d..490b39934d65 100644 --- a/arch/s390/kernel/ptrace.c +++ b/arch/s390/kernel/ptrace.c | |||
@@ -36,7 +36,9 @@ | |||
36 | #include <linux/elf.h> | 36 | #include <linux/elf.h> |
37 | #include <linux/regset.h> | 37 | #include <linux/regset.h> |
38 | #include <linux/tracehook.h> | 38 | #include <linux/tracehook.h> |
39 | 39 | #include <linux/seccomp.h> | |
40 | #include <trace/syscall.h> | ||
41 | #include <asm/compat.h> | ||
40 | #include <asm/segment.h> | 42 | #include <asm/segment.h> |
41 | #include <asm/page.h> | 43 | #include <asm/page.h> |
42 | #include <asm/pgtable.h> | 44 | #include <asm/pgtable.h> |
@@ -69,7 +71,7 @@ FixPerRegisters(struct task_struct *task) | |||
69 | if (per_info->single_step) { | 71 | if (per_info->single_step) { |
70 | per_info->control_regs.bits.starting_addr = 0; | 72 | per_info->control_regs.bits.starting_addr = 0; |
71 | #ifdef CONFIG_COMPAT | 73 | #ifdef CONFIG_COMPAT |
72 | if (test_thread_flag(TIF_31BIT)) | 74 | if (is_compat_task()) |
73 | per_info->control_regs.bits.ending_addr = 0x7fffffffUL; | 75 | per_info->control_regs.bits.ending_addr = 0x7fffffffUL; |
74 | else | 76 | else |
75 | #endif | 77 | #endif |
@@ -482,8 +484,7 @@ static int peek_user_compat(struct task_struct *child, | |||
482 | { | 484 | { |
483 | __u32 tmp; | 485 | __u32 tmp; |
484 | 486 | ||
485 | if (!test_thread_flag(TIF_31BIT) || | 487 | if (!is_compat_task() || (addr & 3) || addr > sizeof(struct user) - 3) |
486 | (addr & 3) || addr > sizeof(struct user) - 3) | ||
487 | return -EIO; | 488 | return -EIO; |
488 | 489 | ||
489 | tmp = __peek_user_compat(child, addr); | 490 | tmp = __peek_user_compat(child, addr); |
@@ -584,8 +585,7 @@ static int __poke_user_compat(struct task_struct *child, | |||
584 | static int poke_user_compat(struct task_struct *child, | 585 | static int poke_user_compat(struct task_struct *child, |
585 | addr_t addr, addr_t data) | 586 | addr_t addr, addr_t data) |
586 | { | 587 | { |
587 | if (!test_thread_flag(TIF_31BIT) || | 588 | if (!is_compat_task() || (addr & 3) || addr > sizeof(struct user32) - 3) |
588 | (addr & 3) || addr > sizeof(struct user32) - 3) | ||
589 | return -EIO; | 589 | return -EIO; |
590 | 590 | ||
591 | return __poke_user_compat(child, addr, data); | 591 | return __poke_user_compat(child, addr, data); |
@@ -642,6 +642,9 @@ asmlinkage long do_syscall_trace_enter(struct pt_regs *regs) | |||
642 | { | 642 | { |
643 | long ret; | 643 | long ret; |
644 | 644 | ||
645 | /* Do the secure computing check first. */ | ||
646 | secure_computing(regs->gprs[2]); | ||
647 | |||
645 | /* | 648 | /* |
646 | * The sysc_tracesys code in entry.S stored the system | 649 | * The sysc_tracesys code in entry.S stored the system |
647 | * call number to gprs[2]. | 650 | * call number to gprs[2]. |
@@ -659,8 +662,11 @@ asmlinkage long do_syscall_trace_enter(struct pt_regs *regs) | |||
659 | ret = -1; | 662 | ret = -1; |
660 | } | 663 | } |
661 | 664 | ||
665 | if (unlikely(test_thread_flag(TIF_SYSCALL_FTRACE))) | ||
666 | ftrace_syscall_enter(regs); | ||
667 | |||
662 | if (unlikely(current->audit_context)) | 668 | if (unlikely(current->audit_context)) |
663 | audit_syscall_entry(test_thread_flag(TIF_31BIT) ? | 669 | audit_syscall_entry(is_compat_task() ? |
664 | AUDIT_ARCH_S390 : AUDIT_ARCH_S390X, | 670 | AUDIT_ARCH_S390 : AUDIT_ARCH_S390X, |
665 | regs->gprs[2], regs->orig_gpr2, | 671 | regs->gprs[2], regs->orig_gpr2, |
666 | regs->gprs[3], regs->gprs[4], | 672 | regs->gprs[3], regs->gprs[4], |
@@ -674,6 +680,9 @@ asmlinkage void do_syscall_trace_exit(struct pt_regs *regs) | |||
674 | audit_syscall_exit(AUDITSC_RESULT(regs->gprs[2]), | 680 | audit_syscall_exit(AUDITSC_RESULT(regs->gprs[2]), |
675 | regs->gprs[2]); | 681 | regs->gprs[2]); |
676 | 682 | ||
683 | if (unlikely(test_thread_flag(TIF_SYSCALL_FTRACE))) | ||
684 | ftrace_syscall_exit(regs); | ||
685 | |||
677 | if (test_thread_flag(TIF_SYSCALL_TRACE)) | 686 | if (test_thread_flag(TIF_SYSCALL_TRACE)) |
678 | tracehook_report_syscall_exit(regs, 0); | 687 | tracehook_report_syscall_exit(regs, 0); |
679 | } | 688 | } |