[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <201105200048.07942.vda.linux@googlemail.com>
Date: Fri, 20 May 2011 00:48:07 +0200
From: Denys Vlasenko <vda.linux@...glemail.com>
To: Oleg Nesterov <oleg@...hat.com>
Cc: Tejun Heo <tj@...nel.org>, jan.kratochvil@...hat.com,
linux-kernel@...r.kernel.org, torvalds@...ux-foundation.org,
akpm@...ux-foundation.org, indan@....nu, bdonlan@...il.com
Subject: Re: [PATCH 10/10] ptrace: implement group stop notification for ptracer
On Thursday 19 May 2011 19:13, Oleg Nesterov wrote:
> On 05/19, Tejun Heo wrote:
> > On Thu, May 19, 2011 at 06:32:46PM +0200, Oleg Nesterov wrote:
> > > > +static void ptrace_trap_notify(struct task_struct *t)
> > > > +{
> > > > + siginfo_t *si = t->last_siginfo;
> > > > +
> > > > + WARN_ON_ONCE(!(t->ptrace & PT_SEIZED));
> > > > + assert_spin_locked(&t->sighand->siglock);
> > > > +
> > > > + /*
> > > > + * @t is being ptraced and new SEIZE behavior is in effect.
> > > > + * Schedule sticky trap which will clear on the next GETSIGINFO.
> > > > + */
> > > > + t->jobctl |= JOBCTL_TRAP_NOTIFY;
> > >
> > > This is also set by do_signal_stop(). Cleared by PTRACE_GETSIGINFO.
> > >
> > > How can this work? Doesn't this mean PTRACE_GETSIGINFO becomes mandatory
> > > before PTRACE_CONT? IOW, unless the tracee does PTRACE_GETSIGINFO to clear
> > > this bit, PTRACE_CONT just leads to another trap, no?
> >
> > Yes, group stop state change raises a sticky trap condition which is
> > cleared by GETSIGINFO.
>
> Hmm. At least now I understand the meaining what "sticky" means in
> this discussion ;) I was confused.
I still don't see why is it needed. Userspace API doesn't require it.
Are you trying to solve/simplify something on the kernel side with it?
--
vda
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists