No functional changes.
Move the code which can be shared with utrace-ptrace up, before
__ptrace_link().
---
kernel/ptrace.c | 556
1 file changed, 278 insertions(+), 278 deletions(-)
--- UTRACE-PTRACE/kernel/ptrace.c~136_REORDER_FUNCS
If I understand correctly, we are not going to have CONFIG_UTRACE_PTRACE,
CONFIG_UTRACE should use utrace-ptrace unconditionally.
Remove CONFIG_UTRACE_PTRACE. I do not know where is the right place for
CONFIG_UTRACE option and what the help text should say, I assume you can
fix this patch or make
(already in mm: ptrace-introduce-user_single_step_siginfo-helper.patch)
Suggested by Roland.
Currently there is no way to synthesize a single-stepping trap in the
arch-independent manner. This patch adds the default helper which fills
siginfo_t, arch/ can can override it.
Architetures which
(already in mm:
ptrace-x86-change-syscall_trace_leave-to-rely-on-tracehook-when-stepping.patch)
Suggested by Roland.
Unlike powepc, x86 always calls tracehook_report_syscall_exit(step)
with step = 0, and sends the trap by hand.
This results in unnecessary SIGTRAP when PTRACE_SINGLESTEP follows
No functional changes, preparation for utrace-ptrace.
task_ptrace() != 0 if and only if PT_PTRACED bit is set, kill
some PT_PTRACED checks in tracehook.h to ensure the result is
the same with or without utrace which doesn't set PT_PTRACED.
Signed-off-by: Oleg Nesterov o...@redhat.com
---
Export __ptrace_detach() and do_notify_parent_cldstop() for
ptrace-utrace.
Signed-off-by: Oleg Nesterov o...@redhat.com
---
include/linux/ptrace.h |1 +
include/linux/sched.h |1 +
kernel/ptrace.c|2 +-
kernel/signal.c|2 +-
4 files changed, 4 insertions(+), 2
+#ifdef ARCH_HAS_USER_SINGLE_STEP_INFO
+extern void user_single_step_siginfo(struct task_struct *tsk,
+ struct pt_regs *regs, siginfo_t *info);
+#else
+static inline void user_single_step_siginfo(struct task_struct *tsk,
+ struct
Is it possible to add si_code and si_addr info
info-si_code = TRAP_TRACE;
info-si_addr = instruction_pointer(regs);
This is exactly what arch-specific versions should do here.
The choice