All of lore.kernel.org
 help / color / mirror / Atom feed
From: Oleg Nesterov <oleg@redhat.com>
To: Anton Arapov <anton@redhat.com>
Cc: Hemant Kumar Shaw <hkshaw@linux.vnet.ibm.com>,
	linux-kernel@vger.kernel.org, Mikhail.Kulemin@ru.ibm.com,
	srikar@linux.vnet.ibm.com, peterz@infradead.org,
	mingo@redhat.com, systemtap@sourceware.org,
	masami.hiramatsu.pt@hitachi.com
Subject: Re: [PATCH] uprobes: Fix limiting un-nested return probes
Date: Mon, 9 Sep 2013 16:55:15 +0200	[thread overview]
Message-ID: <20130909145515.GA5855@redhat.com> (raw)
In-Reply-To: <20130909083635.GA3270@bandura.laptop>

On 09/09, Anton Arapov wrote:
>
> On Sun, Sep 08, 2013 at 06:32:32PM +0200, Oleg Nesterov wrote:
> >
> > Not sure, but I can be easily wrong... afaics we need something like below, no?
> > Anton?
>
> Oleg, your guess is correct.
>
> My original intention was to limit by depth the chained only probes. But later,
> after your review, we've decided /based on safety concerns/ to limit it hard.

Chained or not, we allocate return_instance every time, so we certainly
need to account to limit the depth unconditionally. Unless we reuse the
same return_instance if chained, but this is another story.

> The decrement 'utask->depth--;' in my own tree is above the 'if (!chained)'
> check. I think it got mangled somehow when I rebased the code before I sent it
> to lkml.

OK, thanks, I'll write the changelog and re-send the patch below.

> Anton.
>
>
> > Oleg.
> >
> > --- x/kernel/events/uprobes.c
> > +++ x/kernel/events/uprobes.c
> > @@ -1682,12 +1682,10 @@ static bool handle_trampoline(struct pt_
> >  		tmp = ri;
> >  		ri = ri->next;
> >  		kfree(tmp);
> > +		utask->depth--;
> >
> >  		if (!chained)
> >  			break;
> > -
> > -		utask->depth--;
> > -
> >  		BUG_ON(!ri);
> >  	}


  reply	other threads:[~2013-09-09 15:01 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-09-03  6:14 [PATCH] uprobes: Fix limiting un-nested return probes Hemant Kumar Shaw
2013-09-08 16:32 ` Oleg Nesterov
2013-09-09  8:36   ` Anton Arapov
2013-09-09 14:55     ` Oleg Nesterov [this message]
2013-09-12  4:49       ` Hemant

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20130909145515.GA5855@redhat.com \
    --to=oleg@redhat.com \
    --cc=Mikhail.Kulemin@ru.ibm.com \
    --cc=anton@redhat.com \
    --cc=hkshaw@linux.vnet.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=masami.hiramatsu.pt@hitachi.com \
    --cc=mingo@redhat.com \
    --cc=peterz@infradead.org \
    --cc=srikar@linux.vnet.ibm.com \
    --cc=systemtap@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.