This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
Re: [PATCH v3 2.6.39-rc1-tip 15/26] 15: uprobes: Handing int3 and singlestep exception.
- From: Peter Zijlstra <peterz at infradead dot org>
- To: Srikar Dronamraju <srikar at linux dot vnet dot ibm dot com>
- Cc: Ingo Molnar <mingo at elte dot hu>, Steven Rostedt <rostedt at goodmis dot org>, Linux-mm <linux-mm at kvack dot org>, Arnaldo Carvalho de Melo <acme at infradead dot org>, Linus Torvalds <torvalds at linux-foundation dot org>, Jonathan Corbet <corbet at lwn dot net>, Christoph Hellwig <hch at infradead dot org>, Masami Hiramatsu <masami dot hiramatsu dot pt at hitachi dot com>, Thomas Gleixner <tglx at linutronix dot de>, Ananth N Mavinakayanahalli <ananth at in dot ibm dot com>, Oleg Nesterov <oleg at redhat dot com>, LKML <linux-kernel at vger dot kernel dot org>, SystemTap <systemtap at sources dot redhat dot com>, Jim Keniston <jkenisto at linux dot vnet dot ibm dot com>, Roland McGrath <roland at hack dot frob dot com>, Andi Kleen <andi at firstfloor dot org>, Andrew Morton <akpm at linux-foundation dot org>
- Date: Thu, 21 Apr 2011 19:41:38 +0200
- Subject: Re: [PATCH v3 2.6.39-rc1-tip 15/26] 15: uprobes: Handing int3 and singlestep exception.
- References: <20110401143223.15455.19844.sendpatchset@localhost6.localdomain6> <20110401143527.15455.32854.sendpatchset@localhost6.localdomain6> <1303218185.8345.0.camel@twins> <20110421171042.GI10698@linux.vnet.ibm.com>
On Thu, 2011-04-21 at 22:40 +0530, Srikar Dronamraju wrote:
> * Peter Zijlstra <peterz@infradead.org> [2011-04-19 15:03:05]:
>
> > On Fri, 2011-04-01 at 20:05 +0530, Srikar Dronamraju wrote:
> > > + if (unlikely(!utask)) {
> > > + utask = add_utask();
> > > +
> > > + /* Failed to allocate utask for the current task. */
> > > + BUG_ON(!utask);
> >
> > That's not really nice is it ;-) means I can make the kernel go BUG by
> > simply applying memory pressure.
> >
>
> The other option would be remove the probe and set the ip to
> the breakpoint address and restart the thread.
While its better than GFP_NOFAIL since its a return to userspace and
hence cannot be holding locks etc.. it's still not pretty. But heaps
better than simply bailing the kernel.