[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <54BCC8C0.40706@hitachi.com>
Date: Mon, 19 Jan 2015 18:05:04 +0900
From: Masami Hiramatsu <masami.hiramatsu.pt@...achi.com>
To: Wang Nan <wangnan0@...wei.com>
Cc: tixy@...aro.org, linux@....linux.org.uk,
linux-kernel@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
lizefan@...wei.com
Subject: Re: [PATCH] kprobes: bugfix: checks kprobes_all_disarmed in unoptimized_kprobe().
Hi Wang,
I've found a problem on this patch, since kprobes calls unoptioize_kprobe
with kprobes_all_disarmed=true when trying to disable all kprobes, this
cause a serious problem.
Moreover, I couldn't reproduce your reported bug on my 3.19-rc4 kernel.
Could you test it again?
Unless I could reproduce this bug, I'd like to keep this uncommitted.
Thank you,
(2015/01/19 12:04), Wang Nan wrote:
> Hi Masami Hiramatsu,
>
> I can't find this patch and '[PATCH] kprobes: bugfix: checks kprobes_all_disarmed
> in unoptimized_kprobe().' in current mainline. How do these patches get there?
> Should they be merged into Russell King's tree first?
>
> Thank you!
>
> On 2015/1/12 20:52, Masami Hiramatsu wrote:
>> (2015/01/12 21:09), Wang Nan wrote:
>>> Original code failed to disarm the probed instruction after
>>>
>>> echo 0 > /sys/kernel/debug/kprobes/enabled
>>>
>>> if OPTPROBE is enabled.
>>>
>>> This patch checks kprobes_all_disarmed in unoptimized_kprobe().
>>>
>>
>> Looks good :)
>>
>> Acked-by: Masami Hiramatsu <masami.hiramatsu.pt@...achi.com>
>>
>> Thank you!
>>
>>> Signed-off-by: Wang Nan <wangnan0@...wei.com>
>>> ---
>>> kernel/kprobes.c | 3 +++
>>> 1 file changed, 3 insertions(+)
>>>
>>> diff --git a/kernel/kprobes.c b/kernel/kprobes.c
>>> index 9471710..f16936b 100644
>>> --- a/kernel/kprobes.c
>>> +++ b/kernel/kprobes.c
>>> @@ -630,6 +630,9 @@ static void unoptimize_kprobe(struct kprobe *p, bool force)
>>> {
>>> struct optimized_kprobe *op;
>>>
>>> + if (kprobes_all_disarmed)
>>> + return;
>>> +
>>> if (!kprobe_aggrprobe(p) || kprobe_disarmed(p))
>>> return; /* This is not an optprobe nor optimized */
>>>
>>>
>>
>>
>
>
>
--
Masami HIRAMATSU
Software Platform Research Dept. Linux Technology Research Center
Hitachi, Ltd., Yokohama Research Laboratory
E-mail: masami.hiramatsu.pt@...achi.com
--
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