Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 317582 Details for
Bug 162774
strace ignores int3 SIGTRAP
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
Kernel patch to make ALL ptrace SIGTRAPs to be affected by PTRACE_O_TRACESYSGOOD
ku1.patch (text/plain), 17.98 KB, created by
Denys Vlasenko
on 2008-09-24 13:05:15 UTC
(
hide
)
Description:
Kernel patch to make ALL ptrace SIGTRAPs to be affected by PTRACE_O_TRACESYSGOOD
Filename:
MIME Type:
Creator:
Denys Vlasenko
Created:
2008-09-24 13:05:15 UTC
Size:
17.98 KB
patch
obsolete
>diff -d -urp linux-2.6u.org/arch/alpha/kernel/ptrace.c linux-2.6u.patched/arch/alpha/kernel/ptrace.c >--- linux-2.6u.org/arch/alpha/kernel/ptrace.c 2008-09-15 16:29:19.000000000 +0200 >+++ linux-2.6u.patched/arch/alpha/kernel/ptrace.c 2008-09-22 18:12:10.000000000 +0200 >@@ -356,10 +356,7 @@ syscall_trace(void) > return; > if (!(current->ptrace & PT_PTRACED)) > return; >- /* The 0x80 provides a way for the tracing parent to distinguish >- between a syscall stop and SIGTRAP delivery */ >- ptrace_notify(SIGTRAP | ((current->ptrace & PT_TRACESYSGOOD) >- ? 0x80 : 0)); >+ ptrace_notify_SIGTRAP80(); > > /* > * This isn't the same as continuing with a signal, but it will do >diff -d -urp linux-2.6u.org/arch/arm/kernel/ptrace.c linux-2.6u.patched/arch/arm/kernel/ptrace.c >--- linux-2.6u.org/arch/arm/kernel/ptrace.c 2008-09-15 16:29:20.000000000 +0200 >+++ linux-2.6u.patched/arch/arm/kernel/ptrace.c 2008-09-22 18:12:18.000000000 +0200 >@@ -803,10 +803,8 @@ asmlinkage int syscall_trace(int why, st > > current_thread_info()->syscall = scno; > >- /* the 0x80 provides a way for the tracing parent to distinguish >- between a syscall stop and SIGTRAP delivery */ >- ptrace_notify(SIGTRAP | ((current->ptrace & PT_TRACESYSGOOD) >- ? 0x80 : 0)); >+ ptrace_notify_SIGTRAP80(); >+ > /* > * this isn't the same as continuing with a signal, but it will do > * for normal use. strace only continues with a signal if the >diff -d -urp linux-2.6u.org/arch/avr32/kernel/ptrace.c linux-2.6u.patched/arch/avr32/kernel/ptrace.c >--- linux-2.6u.org/arch/avr32/kernel/ptrace.c 2008-09-15 16:29:23.000000000 +0200 >+++ linux-2.6u.patched/arch/avr32/kernel/ptrace.c 2008-09-22 18:13:17.000000000 +0200 >@@ -234,10 +234,7 @@ asmlinkage void syscall_trace(void) > if (!(current->ptrace & PT_PTRACED)) > return; > >- /* The 0x80 provides a way for the tracing parent to >- * distinguish between a syscall stop and SIGTRAP delivery */ >- ptrace_notify(SIGTRAP | ((current->ptrace & PT_TRACESYSGOOD) >- ? 0x80 : 0)); >+ ptrace_notify_SIGTRAP80(); > > /* > * this isn't the same as continuing with a signal, but it >diff -d -urp linux-2.6u.org/arch/blackfin/kernel/ptrace.c linux-2.6u.patched/arch/blackfin/kernel/ptrace.c >--- linux-2.6u.org/arch/blackfin/kernel/ptrace.c 2008-09-15 16:29:23.000000000 +0200 >+++ linux-2.6u.patched/arch/blackfin/kernel/ptrace.c 2008-09-22 18:07:05.000000000 +0200 >@@ -447,11 +447,7 @@ asmlinkage void syscall_trace(void) > if (!(current->ptrace & PT_PTRACED)) > return; > >- /* the 0x80 provides a way for the tracing parent to distinguish >- * between a syscall stop and SIGTRAP delivery >- */ >- ptrace_notify(SIGTRAP | ((current->ptrace & PT_TRACESYSGOOD) >- ? 0x80 : 0)); >+ ptrace_notify_SIGTRAP80(); > > /* > * this isn't the same as continuing with a signal, but it will do >diff -d -urp linux-2.6u.org/arch/blackfin/kernel/signal.c linux-2.6u.patched/arch/blackfin/kernel/signal.c >--- linux-2.6u.org/arch/blackfin/kernel/signal.c 2008-09-15 16:29:23.000000000 +0200 >+++ linux-2.6u.patched/arch/blackfin/kernel/signal.c 2008-09-22 18:07:40.000000000 +0200 >@@ -235,7 +235,7 @@ setup_rt_frame(int sig, struct k_sigacti > */ > if (regs->syscfg & TRACE_BITS) { > regs->syscfg &= ~TRACE_BITS; >- ptrace_notify(SIGTRAP); >+ ptrace_notify_SIGTRAP80(); > } > > return 0; >diff -d -urp linux-2.6u.org/arch/cris/arch-v10/kernel/ptrace.c linux-2.6u.patched/arch/cris/arch-v10/kernel/ptrace.c >--- linux-2.6u.org/arch/cris/arch-v10/kernel/ptrace.c 2008-09-15 16:29:23.000000000 +0200 >+++ linux-2.6u.patched/arch/cris/arch-v10/kernel/ptrace.c 2008-09-22 18:13:30.000000000 +0200 >@@ -238,10 +238,7 @@ void do_syscall_trace(void) > if (!(current->ptrace & PT_PTRACED)) > return; > >- /* the 0x80 provides a way for the tracing parent to distinguish >- between a syscall stop and SIGTRAP delivery */ >- ptrace_notify(SIGTRAP | ((current->ptrace & PT_TRACESYSGOOD) >- ? 0x80 : 0)); >+ ptrace_notify_SIGTRAP80(); > > /* > * This isn't the same as continuing with a signal, but it will do for >diff -d -urp linux-2.6u.org/arch/cris/arch-v32/kernel/ptrace.c linux-2.6u.patched/arch/cris/arch-v32/kernel/ptrace.c >--- linux-2.6u.org/arch/cris/arch-v32/kernel/ptrace.c 2008-09-15 16:29:23.000000000 +0200 >+++ linux-2.6u.patched/arch/cris/arch-v32/kernel/ptrace.c 2008-09-22 18:13:23.000000000 +0200 >@@ -307,10 +307,7 @@ void do_syscall_trace(void) > if (!(current->ptrace & PT_PTRACED)) > return; > >- /* the 0x80 provides a way for the tracing parent to distinguish >- between a syscall stop and SIGTRAP delivery */ >- ptrace_notify(SIGTRAP | ((current->ptrace & PT_TRACESYSGOOD) >- ? 0x80 : 0)); >+ ptrace_notify_SIGTRAP80(); > > /* > * This isn't the same as continuing with a signal, but it will do for >diff -d -urp linux-2.6u.org/arch/frv/kernel/ptrace.c linux-2.6u.patched/arch/frv/kernel/ptrace.c >--- linux-2.6u.org/arch/frv/kernel/ptrace.c 2008-09-15 16:29:23.000000000 +0200 >+++ linux-2.6u.patched/arch/frv/kernel/ptrace.c 2008-09-22 18:13:01.000000000 +0200 >@@ -698,7 +698,7 @@ asmlinkage void do_syscall_trace(int lea > else > __frame->__status |= REG__STATUS_SYSC_ENTRY; > >- ptrace_notify(SIGTRAP); >+ ptrace_notify_SIGTRAP80(); > > /* > * this isn't the same as continuing with a signal, but it will do >diff -d -urp linux-2.6u.org/arch/frv/kernel/signal.c linux-2.6u.patched/arch/frv/kernel/signal.c >--- linux-2.6u.org/arch/frv/kernel/signal.c 2008-09-15 16:29:23.000000000 +0200 >+++ linux-2.6u.patched/arch/frv/kernel/signal.c 2008-09-22 18:14:03.000000000 +0200 >@@ -311,7 +311,7 @@ static int setup_frame(int sig, struct k > > /* the tracer may want to single-step inside the handler */ > if (test_thread_flag(TIF_SINGLESTEP)) >- ptrace_notify(SIGTRAP); >+ ptrace_notify_SIGTRAP80(); > > #if DEBUG_SIG > printk("SIG deliver %d (%s:%d): sp=%p pc=%lx ra=%p\n", >@@ -410,7 +410,7 @@ static int setup_rt_frame(int sig, struc > > /* the tracer may want to single-step inside the handler */ > if (test_thread_flag(TIF_SINGLESTEP)) >- ptrace_notify(SIGTRAP); >+ ptrace_notify_SIGTRAP80(); > > #if DEBUG_SIG > printk("SIG deliver %d (%s:%d): sp=%p pc=%lx ra=%p\n", >diff -d -urp linux-2.6u.org/arch/h8300/kernel/ptrace.c linux-2.6u.patched/arch/h8300/kernel/ptrace.c >--- linux-2.6u.org/arch/h8300/kernel/ptrace.c 2008-09-15 16:29:24.000000000 +0200 >+++ linux-2.6u.patched/arch/h8300/kernel/ptrace.c 2008-09-22 18:09:05.000000000 +0200 >@@ -222,8 +222,7 @@ asmlinkage void do_syscall_trace(void) > return; > if (!(current->ptrace & PT_PTRACED)) > return; >- ptrace_notify(SIGTRAP | ((current->ptrace & PT_TRACESYSGOOD) >- ? 0x80 : 0)); >+ ptrace_notify_SIGTRAP80(); > /* > * this isn't the same as continuing with a signal, but it will do > * for normal use. strace only continues with a signal if the >diff -d -urp linux-2.6u.org/arch/ia64/kernel/ptrace.c linux-2.6u.patched/arch/ia64/kernel/ptrace.c >--- linux-2.6u.org/arch/ia64/kernel/ptrace.c 2008-09-15 16:29:24.000000000 +0200 >+++ linux-2.6u.patched/arch/ia64/kernel/ptrace.c 2008-09-22 18:11:44.000000000 +0200 >@@ -1235,12 +1235,7 @@ arch_ptrace (struct task_struct *child, > static void > syscall_trace (void) > { >- /* >- * The 0x80 provides a way for the tracing parent to >- * distinguish between a syscall stop and SIGTRAP delivery. >- */ >- ptrace_notify(SIGTRAP >- | ((current->ptrace & PT_TRACESYSGOOD) ? 0x80 : 0)); >+ ptrace_notify_SIGTRAP80(); > > /* > * This isn't the same as continuing with a signal, but it >diff -d -urp linux-2.6u.org/arch/m32r/kernel/ptrace.c linux-2.6u.patched/arch/m32r/kernel/ptrace.c >--- linux-2.6u.org/arch/m32r/kernel/ptrace.c 2008-09-15 16:29:25.000000000 +0200 >+++ linux-2.6u.patched/arch/m32r/kernel/ptrace.c 2008-09-22 18:11:15.000000000 +0200 >@@ -729,10 +729,7 @@ void do_syscall_trace(void) > return; > if (!(current->ptrace & PT_PTRACED)) > return; >- /* the 0x80 provides a way for the tracing parent to distinguish >- between a syscall stop and SIGTRAP delivery */ >- ptrace_notify(SIGTRAP | ((current->ptrace & PT_TRACESYSGOOD) >- ? 0x80 : 0)); >+ ptrace_notify_SIGTRAP80(); > > /* > * this isn't the same as continuing with a signal, but it will do >diff -d -urp linux-2.6u.org/arch/m68k/kernel/ptrace.c linux-2.6u.patched/arch/m68k/kernel/ptrace.c >--- linux-2.6u.org/arch/m68k/kernel/ptrace.c 2008-09-15 16:29:25.000000000 +0200 >+++ linux-2.6u.patched/arch/m68k/kernel/ptrace.c 2008-09-22 18:11:32.000000000 +0200 >@@ -277,8 +277,7 @@ out_eio: > > asmlinkage void syscall_trace(void) > { >- ptrace_notify(SIGTRAP | ((current->ptrace & PT_TRACESYSGOOD) >- ? 0x80 : 0)); >+ ptrace_notify_SIGTRAP80(); > /* > * this isn't the same as continuing with a signal, but it will do > * for normal use. strace only continues with a signal if the >diff -d -urp linux-2.6u.org/arch/m68knommu/kernel/ptrace.c linux-2.6u.patched/arch/m68knommu/kernel/ptrace.c >--- linux-2.6u.org/arch/m68knommu/kernel/ptrace.c 2008-09-15 16:29:26.000000000 +0200 >+++ linux-2.6u.patched/arch/m68knommu/kernel/ptrace.c 2008-09-22 18:11:22.000000000 +0200 >@@ -320,8 +320,7 @@ asmlinkage void syscall_trace(void) > return; > if (!(current->ptrace & PT_PTRACED)) > return; >- ptrace_notify(SIGTRAP | ((current->ptrace & PT_TRACESYSGOOD) >- ? 0x80 : 0)); >+ ptrace_notify_SIGTRAP80(); > /* > * this isn't the same as continuing with a signal, but it will do > * for normal use. strace only continues with a signal if the >diff -d -urp linux-2.6u.org/arch/mips/kernel/ptrace.c linux-2.6u.patched/arch/mips/kernel/ptrace.c >--- linux-2.6u.org/arch/mips/kernel/ptrace.c 2008-09-15 16:29:27.000000000 +0200 >+++ linux-2.6u.patched/arch/mips/kernel/ptrace.c 2008-09-22 18:13:10.000000000 +0200 >@@ -480,10 +480,7 @@ asmlinkage void do_syscall_trace(struct > if (!test_thread_flag(TIF_SYSCALL_TRACE)) > goto out; > >- /* The 0x80 provides a way for the tracing parent to distinguish >- between a syscall stop and SIGTRAP delivery */ >- ptrace_notify(SIGTRAP | ((current->ptrace & PT_TRACESYSGOOD) ? >- 0x80 : 0)); >+ ptrace_notify_SIGTRAP80(); > > /* > * this isn't the same as continuing with a signal, but it will do >diff -d -urp linux-2.6u.org/arch/mn10300/kernel/ptrace.c linux-2.6u.patched/arch/mn10300/kernel/ptrace.c >--- linux-2.6u.org/arch/mn10300/kernel/ptrace.c 2008-09-15 16:29:27.000000000 +0200 >+++ linux-2.6u.patched/arch/mn10300/kernel/ptrace.c 2008-09-22 18:10:10.000000000 +0200 >@@ -361,11 +361,7 @@ asmlinkage void do_syscall_trace(struct > if (!(current->ptrace & PT_PTRACED)) > return; > >- /* the 0x80 provides a way for the tracing parent to distinguish >- between a syscall stop and SIGTRAP delivery */ >- ptrace_notify(SIGTRAP | >- ((current->ptrace & PT_TRACESYSGOOD) && >- !test_thread_flag(TIF_SINGLESTEP) ? 0x80 : 0)); >+ ptrace_notify_SIGTRAP80(); > > /* > * this isn't the same as continuing with a signal, but it will do >diff -d -urp linux-2.6u.org/arch/mn10300/kernel/signal.c linux-2.6u.patched/arch/mn10300/kernel/signal.c >--- linux-2.6u.org/arch/mn10300/kernel/signal.c 2008-09-15 16:29:27.000000000 +0200 >+++ linux-2.6u.patched/arch/mn10300/kernel/signal.c 2008-09-22 18:10:37.000000000 +0200 >@@ -334,7 +334,7 @@ static int setup_frame(int sig, struct k > > /* the tracer may want to single-step inside the handler */ > if (test_thread_flag(TIF_SINGLESTEP)) >- ptrace_notify(SIGTRAP); >+ ptrace_notify_SIGTRAP80(); > > #if DEBUG_SIG > printk(KERN_DEBUG "SIG deliver %d (%s:%d): sp=%p pc=%lx ra=%p\n", >@@ -417,7 +417,7 @@ static int setup_rt_frame(int sig, struc > > /* the tracer may want to single-step inside the handler */ > if (test_thread_flag(TIF_SINGLESTEP)) >- ptrace_notify(SIGTRAP); >+ ptrace_notify_SIGTRAP80(); > > #if DEBUG_SIG > printk(KERN_DEBUG "SIG deliver %d (%s:%d): sp=%p pc=%lx ra=%p\n", >diff -d -urp linux-2.6u.org/arch/parisc/kernel/ptrace.c linux-2.6u.patched/arch/parisc/kernel/ptrace.c >--- linux-2.6u.org/arch/parisc/kernel/ptrace.c 2008-09-15 16:29:27.000000000 +0200 >+++ linux-2.6u.patched/arch/parisc/kernel/ptrace.c 2008-09-22 18:11:51.000000000 +0200 >@@ -355,8 +355,8 @@ void syscall_trace(void) > return; > if (!(current->ptrace & PT_PTRACED)) > return; >- ptrace_notify(SIGTRAP | ((current->ptrace & PT_TRACESYSGOOD) >- ? 0x80 : 0)); >+ ptrace_notify_SIGTRAP80(); >+ > /* > * this isn't the same as continuing with a signal, but it will do > * for normal use. strace only continues with a signal if the >diff -d -urp linux-2.6u.org/arch/s390/kernel/ptrace.c linux-2.6u.patched/arch/s390/kernel/ptrace.c >--- linux-2.6u.org/arch/s390/kernel/ptrace.c 2008-09-15 16:29:29.000000000 +0200 >+++ linux-2.6u.patched/arch/s390/kernel/ptrace.c 2008-09-22 18:10:53.000000000 +0200 >@@ -649,8 +649,7 @@ syscall_trace(struct pt_regs *regs, int > goto out; > if (!(current->ptrace & PT_PTRACED)) > goto out; >- ptrace_notify(SIGTRAP | ((current->ptrace & PT_TRACESYSGOOD) >- ? 0x80 : 0)); >+ ptrace_notify_SIGTRAP80(); > > /* > * If the debuffer has set an invalid system call number, >diff -d -urp linux-2.6u.org/arch/um/kernel/ptrace.c linux-2.6u.patched/arch/um/kernel/ptrace.c >--- linux-2.6u.org/arch/um/kernel/ptrace.c 2008-09-15 16:29:30.000000000 +0200 >+++ linux-2.6u.patched/arch/um/kernel/ptrace.c 2008-09-22 18:08:46.000000000 +0200 >@@ -248,7 +248,6 @@ static void send_sigtrap(struct task_str > void syscall_trace(struct uml_pt_regs *regs, int entryexit) > { > int is_singlestep = (current->ptrace & PT_DTRACE) && entryexit; >- int tracesysgood; > > if (unlikely(current->audit_context)) { > if (!entryexit) >@@ -276,8 +275,7 @@ void syscall_trace(struct uml_pt_regs *r > * the 0x80 provides a way for the tracing parent to distinguish > * between a syscall stop and SIGTRAP delivery > */ >- tracesysgood = (current->ptrace & PT_TRACESYSGOOD); >- ptrace_notify(SIGTRAP | (tracesysgood ? 0x80 : 0)); >+ ptrace_notify_SIGTRAP80(); > > if (entryexit) /* force do_signal() --> is_syscall() */ > set_thread_flag(TIF_SIGPENDING); >diff -d -urp linux-2.6u.org/arch/um/sys-i386/signal.c linux-2.6u.patched/arch/um/sys-i386/signal.c >--- linux-2.6u.org/arch/um/sys-i386/signal.c 2008-09-15 16:29:31.000000000 +0200 >+++ linux-2.6u.patched/arch/um/sys-i386/signal.c 2008-09-22 18:08:12.000000000 +0200 >@@ -377,7 +377,7 @@ int setup_signal_stack_sc(unsigned long > PT_REGS_ECX(regs) = (unsigned long) 0; > > if ((current->ptrace & PT_DTRACE) && (current->ptrace & PT_PTRACED)) >- ptrace_notify(SIGTRAP); >+ ptrace_notify_SIGTRAP80(); > return 0; > > err: >@@ -434,7 +434,7 @@ int setup_signal_stack_si(unsigned long > PT_REGS_ECX(regs) = (unsigned long) &frame->uc; > > if ((current->ptrace & PT_DTRACE) && (current->ptrace & PT_PTRACED)) >- ptrace_notify(SIGTRAP); >+ ptrace_notify_SIGTRAP80(); > return 0; > > err: >diff -d -urp linux-2.6u.org/arch/xtensa/kernel/ptrace.c linux-2.6u.patched/arch/xtensa/kernel/ptrace.c >--- linux-2.6u.org/arch/xtensa/kernel/ptrace.c 2008-09-15 16:29:31.000000000 +0200 >+++ linux-2.6u.patched/arch/xtensa/kernel/ptrace.c 2008-09-22 18:12:00.000000000 +0200 >@@ -339,11 +339,7 @@ long arch_ptrace(struct task_struct *chi > > void do_syscall_trace(void) > { >- /* >- * The 0x80 provides a way for the tracing parent to distinguish >- * between a syscall stop and SIGTRAP delivery >- */ >- ptrace_notify(SIGTRAP|((current->ptrace & PT_TRACESYSGOOD) ? 0x80 : 0)); >+ ptrace_notify_SIGTRAP80(); > > /* > * this isn't the same as continuing with a signal, but it will do >diff -d -urp linux-2.6u.org/include/linux/ptrace.h linux-2.6u.patched/include/linux/ptrace.h >--- linux-2.6u.org/include/linux/ptrace.h 2008-09-22 16:10:20.000000000 +0200 >+++ linux-2.6u.patched/include/linux/ptrace.h 2008-09-22 16:23:17.000000000 +0200 >@@ -91,6 +91,7 @@ extern void ptrace_disable(struct task_s > extern int ptrace_check_attach(struct task_struct *task, int kill); > extern int ptrace_request(struct task_struct *child, long request, long addr, long data); > extern void ptrace_notify(int exit_code); >+extern void ptrace_notify_SIGTRAP80(void); > extern void __ptrace_link(struct task_struct *child, > struct task_struct *new_parent); > extern void __ptrace_unlink(struct task_struct *child); >diff -d -urp linux-2.6u.org/include/linux/tracehook.h linux-2.6u.patched/include/linux/tracehook.h >--- linux-2.6u.org/include/linux/tracehook.h 2008-09-22 16:10:20.000000000 +0200 >+++ linux-2.6u.patched/include/linux/tracehook.h 2008-09-24 14:18:43.000000000 +0200 >@@ -79,7 +79,7 @@ static inline void ptrace_report_syscall > if (!(ptrace & PT_PTRACED)) > return; > >- ptrace_notify(SIGTRAP | ((ptrace & PT_TRACESYSGOOD) ? 0x80 : 0)); >+ ptrace_notify_SIGTRAP80(); > > /* > * this isn't the same as continuing with a signal, but it will do >@@ -208,9 +208,12 @@ static inline void tracehook_report_exec > { > if (unlikely(task_utrace_flags(current) & UTRACE_EVENT(EXEC))) > utrace_report_exec(fmt, bprm, regs); >- if (!ptrace_event(PT_TRACE_EXEC, PTRACE_EVENT_EXEC, 0) && >- unlikely(task_ptrace(current) & PT_PTRACED)) >- send_sig(SIGTRAP, current, 0); >+ /* if PTRACE_O_TRACEEXEC option is active */ >+ if (ptrace_event(PT_TRACE_EXEC, PTRACE_EVENT_EXEC, 0)) >+ return; >+ if (unlikely(task_ptrace(current) & PT_PTRACED)) { >+ ptrace_notify_SIGTRAP80(); >+ } > } > > /** >@@ -422,7 +425,7 @@ static inline void tracehook_signal_hand > utrace_signal_handler(current, stepping); > #ifndef CONFIG_UTRACE_PTRACE > if (stepping) >- ptrace_notify(SIGTRAP); >+ ptrace_notify_SIGTRAP80(); > #endif > } > >diff -d -urp linux-2.6u.org/kernel/ptrace.c linux-2.6u.patched/kernel/ptrace.c >--- linux-2.6u.org/kernel/ptrace.c 2008-09-22 16:10:20.000000000 +0200 >+++ linux-2.6u.patched/kernel/ptrace.c 2008-09-24 14:17:11.000000000 +0200 >@@ -292,7 +292,8 @@ static u32 ptrace_report_exec(enum utrac > /* > * Old-fashioned ptrace'd exec just posts a plain signal. > */ >- send_sig(SIGTRAP, task, 0); >+ send_sig(SIGTRAP | ((current->ptrace & PT_TRACESYSGOOD) ? 0x80 : 0), >+ task, 0); > return UTRACE_RESUME; > } > >diff -d -urp linux-2.6u.org/kernel/signal.c linux-2.6u.patched/kernel/signal.c >--- linux-2.6u.org/kernel/signal.c 2008-09-22 16:10:20.000000000 +0200 >+++ linux-2.6u.patched/kernel/signal.c 2008-09-22 18:16:41.000000000 +0200 >@@ -1604,6 +1604,16 @@ void ptrace_notify(int exit_code) > spin_unlock_irq(¤t->sighand->siglock); > } > >+void ptrace_notify_SIGTRAP80(void) >+{ >+ /* >+ * The 0x80 provides a way for the tracing parent to distinguish >+ * between a ptrace-related stop and SIGTRAP delivery >+ */ >+ ptrace_notify(SIGTRAP | ((current->ptrace & PT_TRACESYSGOOD) >+ ? 0x80 : 0)); >+} >+ > #endif /* !CONFIG_UTRACE_PTRACE */ > > static void
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 162774
:
316309
| 317582 |
327158