From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757925Ab1FPMgO (ORCPT ); Thu, 16 Jun 2011 08:36:14 -0400 Received: from merlin.infradead.org ([205.233.59.134]:37360 "EHLO merlin.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756211Ab1FPMgL convert rfc822-to-8bit (ORCPT ); Thu, 16 Jun 2011 08:36:11 -0400 Subject: Re: [PATCH v4 3.0-rc2-tip 13/22] 13: uprobes: Handing int3 and singlestep exception. From: Peter Zijlstra To: Srikar Dronamraju Cc: Ingo Molnar , Steven Rostedt , Linux-mm , Arnaldo Carvalho de Melo , Linus Torvalds , Andi Kleen , Hugh Dickins , Christoph Hellwig , Jonathan Corbet , Thomas Gleixner , Masami Hiramatsu , Oleg Nesterov , LKML , Jim Keniston , Roland McGrath , Ananth N Mavinakayanahalli , Andrew Morton In-Reply-To: <20110616120442.GA4093@linux.vnet.ibm.com> References: <20110607125804.28590.92092.sendpatchset@localhost6.localdomain6> <20110607130051.28590.68088.sendpatchset@localhost6.localdomain6> <1308225141.13240.25.camel@twins> <20110616120442.GA4093@linux.vnet.ibm.com> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8BIT Date: Thu, 16 Jun 2011 14:35:24 +0200 Message-ID: <1308227724.13240.58.camel@twins> Mime-Version: 1.0 X-Mailer: Evolution 2.30.3 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 2011-06-16 at 17:34 +0530, Srikar Dronamraju wrote: > > > + > > > +cleanup_ret: > > > + if (u) { > > > + down_read(&mm->mmap_sem); > > > + if (!set_orig_insn(current, u, probept, true)) > > > > we try to undo the probe? That doesn't make any sense. I thought you > > meant to return to userspace, let it re-take the trap and try again > > until you do manage to allocate the user resource. > > I meant removing the probe itself > https://lkml.org/lkml/2011/4/21/279 > > We could try reseting and retrying the trap. Just that we might end up > looping under memory pressure. > > > > > This behaviour makes probes totally unreliable under memory pressure. > > Under memory pressure we could be unreliable. But that is total crap, there's nothing worse than unreliable debug tools. From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail138.messagelabs.com (mail138.messagelabs.com [216.82.249.35]) by kanga.kvack.org (Postfix) with ESMTP id 1F0706B0012 for ; Thu, 16 Jun 2011 08:36:05 -0400 (EDT) Subject: Re: [PATCH v4 3.0-rc2-tip 13/22] 13: uprobes: Handing int3 and singlestep exception. From: Peter Zijlstra In-Reply-To: <20110616120442.GA4093@linux.vnet.ibm.com> References: <20110607125804.28590.92092.sendpatchset@localhost6.localdomain6> <20110607130051.28590.68088.sendpatchset@localhost6.localdomain6> <1308225141.13240.25.camel@twins> <20110616120442.GA4093@linux.vnet.ibm.com> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Date: Thu, 16 Jun 2011 14:35:24 +0200 Message-ID: <1308227724.13240.58.camel@twins> Mime-Version: 1.0 Sender: owner-linux-mm@kvack.org List-ID: To: Srikar Dronamraju Cc: Ingo Molnar , Steven Rostedt , Linux-mm , Arnaldo Carvalho de Melo , Linus Torvalds , Andi Kleen , Hugh Dickins , Christoph Hellwig , Jonathan Corbet , Thomas Gleixner , Masami Hiramatsu , Oleg Nesterov , LKML , Jim Keniston , Roland McGrath , Ananth N Mavinakayanahalli , Andrew Morton On Thu, 2011-06-16 at 17:34 +0530, Srikar Dronamraju wrote: > > > + > > > +cleanup_ret: > > > + if (u) { > > > + down_read(&mm->mmap_sem); > > > + if (!set_orig_insn(current, u, probept, true)) > >=20 > > we try to undo the probe? That doesn't make any sense. I thought you > > meant to return to userspace, let it re-take the trap and try again > > until you do manage to allocate the user resource. >=20 > I meant removing the probe itself > https://lkml.org/lkml/2011/4/21/279 >=20 > We could try reseting and retrying the trap. Just that we might end up > looping under memory pressure. >=20 > >=20 > > This behaviour makes probes totally unreliable under memory pressure.= =20 >=20 > Under memory pressure we could be unreliable.=20 But that is total crap, there's nothing worse than unreliable debug tools. -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/ Don't email: email@kvack.org