Re: [PATCH] cleanup ptrace stops and remove notify_parent

From: Roland McGrath
Date: Tue Aug 31 2004 - 19:09:04 EST


>
> > Just about every architecture hasa line
> >
> > + ptrace_notify(SIGTRAP | ((current->ptrace & PT_TRACESYSGOOD) ? 0x80 : 0));
> >
> > you probably want a one-liner inline wrapper with a descriptive name
> > around this
>
> Yep, and it looks like only some architectures got this recent change:
>
> ptrace_notify(SIGTRAP | ((current->ptrace & PT_TRACESYSGOOD) &&
> !test_thread_flag(TIF_SINGLESTEP) ? 0x80 : 0));
>
> Is there a reason this shouldnt be propogated to all architectures?

It ought to produce the the same result on all, certainly. TIF_SINGLESTEP
is an implementation detail specific to i386 and x86_64. The new test here
makes sure that PTRACE_SINGLESTEP never produces an 0x80|SIGTRAP
notification, only PTRACE_SYSCALL, to be consistent with previous behavior.
This i386/x86_64 code path can now be entered for the single-step case, due
to changes that just went in to make single-stepping the system call
instruction work nicely. If other machines require similar fixes and the
implementation overloads their syscall_trace functions in the same way,
then they will have a change similar to this one to make.


Thanks,
Roland
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/