public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Hemant <hkshaw@linux.vnet.ibm.com>
To: Oleg Nesterov <oleg@redhat.com>
Cc: Anton Arapov <anton@redhat.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: Thu, 12 Sep 2013 10:19:31 +0530	[thread overview]
Message-ID: <523147DB.9010500@linux.vnet.ibm.com> (raw)
In-Reply-To: <20130909145515.GA5855@redhat.com>

Hi Oleg,

On 09/09/2013 08:25 PM, Oleg Nesterov wrote:
> 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.

Hmm, agreed. Thanks for the description.

>
>> 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);
>>>   	}


-- 
Thanks
Hemant


      reply	other threads:[~2013-09-12  4:49 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
2013-09-12  4:49       ` Hemant [this message]

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=523147DB.9010500@linux.vnet.ibm.com \
    --to=hkshaw@linux.vnet.ibm.com \
    --cc=Mikhail.Kulemin@ru.ibm.com \
    --cc=anton@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=masami.hiramatsu.pt@hitachi.com \
    --cc=mingo@redhat.com \
    --cc=oleg@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox