On 11/06, Roland McGrath wrote:
>
> All that part does is move all decisions about what to do into the
> tracehook/utrace/ptrace layers out of arch code.
> ...
> After the arch/tracehook cleanup we've been discussing, what happens here
> is consistent across machines.

Yes, agreed. Just I greatly misunderstood what you meant. In particular
I got it as if this change itself should somehow remove the need for
suppress_sigtrap() right now.


OK, how about these 2 simple patches for upstream? Then we can change
powerpc, etc.

Perhaps, instead of arch_has_fill_sigtrap_info we can start with the
patch below? Since tracehook_report_syscall_exit() is inline we can
can add the "if (step)" code without ifdef's.

Or something else instead?

Oleg.

---------------------------------------------------------------------
[PATCH] tracehook_report_syscall_exit: change callers to use step = 0

Preparation for the next patches.

Make sure every caller of tracehook_report_syscall_exit(step) uses
step == 0 argument.

This doesn't change the compiled code because currently this argument
is ignored.

---

 arch/parisc/kernel/ptrace.c     |    2 +-
 arch/powerpc/kernel/ptrace.c    |    2 +-
 arch/ia64/kernel/ptrace.c       |    2 +-
 arch/microblaze/kernel/ptrace.c |    2 +-
 arch/sh/kernel/ptrace_32.c      |    2 +-
 5 files changed, 5 insertions(+), 5 deletions(-)

--- TH/arch/parisc/kernel/ptrace.c~xxx_syscall_exit_desable_step        
2009-10-09 19:52:22.000000000 +0200
+++ TH/arch/parisc/kernel/ptrace.c      2009-11-08 21:33:19.000000000 +0100
@@ -280,5 +280,5 @@ void do_syscall_trace_exit(struct pt_reg
                test_thread_flag(TIF_BLOCKSTEP);
 
        if (stepping || test_thread_flag(TIF_SYSCALL_TRACE))
-               tracehook_report_syscall_exit(regs, stepping);
+               tracehook_report_syscall_exit(regs, 0);
 }
--- TH/arch/powerpc/kernel/ptrace.c~xxx_syscall_exit_desable_step       
2009-07-16 23:28:59.000000000 +0200
+++ TH/arch/powerpc/kernel/ptrace.c     2009-11-08 21:33:29.000000000 +0100
@@ -1082,5 +1082,5 @@ void do_syscall_trace_leave(struct pt_re
 
        step = test_thread_flag(TIF_SINGLESTEP);
        if (step || test_thread_flag(TIF_SYSCALL_TRACE))
-               tracehook_report_syscall_exit(regs, step);
+               tracehook_report_syscall_exit(regs, 0);
 }
--- TH/arch/ia64/kernel/ptrace.c~xxx_syscall_exit_desable_step  2009-07-13 
17:39:43.000000000 +0200
+++ TH/arch/ia64/kernel/ptrace.c        2009-11-08 21:33:39.000000000 +0100
@@ -1284,7 +1284,7 @@ syscall_trace_leave (long arg0, long arg
 
        step = test_thread_flag(TIF_SINGLESTEP);
        if (step || test_thread_flag(TIF_SYSCALL_TRACE))
-               tracehook_report_syscall_exit(&regs, step);
+               tracehook_report_syscall_exit(&regs, 0);
 
        /* copy user rbs to kernel rbs */
        if (test_thread_flag(TIF_RESTORE_RSE))
--- TH/arch/microblaze/kernel/ptrace.c~xxx_syscall_exit_desable_step    
2009-09-24 21:38:54.000000000 +0200
+++ TH/arch/microblaze/kernel/ptrace.c  2009-11-08 21:33:48.000000000 +0100
@@ -210,7 +210,7 @@ asmlinkage void do_syscall_trace_leave(s
 
        step = test_thread_flag(TIF_SINGLESTEP);
        if (step || test_thread_flag(TIF_SYSCALL_TRACE))
-               tracehook_report_syscall_exit(regs, step);
+               tracehook_report_syscall_exit(regs, 0);
 }
 
 #if 0
--- TH/arch/sh/kernel/ptrace_32.c~xxx_syscall_exit_desable_step 2009-09-19 
18:32:15.000000000 +0200
+++ TH/arch/sh/kernel/ptrace_32.c       2009-11-08 21:33:55.000000000 +0100
@@ -486,5 +486,5 @@ asmlinkage void do_syscall_trace_leave(s
 
        step = test_thread_flag(TIF_SINGLESTEP);
        if (step || test_thread_flag(TIF_SYSCALL_TRACE))
-               tracehook_report_syscall_exit(regs, step);
+               tracehook_report_syscall_exit(regs, 0);
 }

Reply via email to