[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <480E10FA.3050401@redhat.com>
Date: Tue, 22 Apr 2008 12:23:22 -0400
From: Masami Hiramatsu <mhiramat@...hat.com>
To: Peter Zijlstra <peterz@...radead.org>
CC: Adrian Bunk <bunk@...nel.org>, ananth@...ibm.com,
anil.s.keshavamurthy@...el.com, davem@...emloft.net,
bugme-daemon@...zilla.kernel.org,
jean-marc LACROIX <jeanmarc.lacroix@...e.Fr>,
linux-kernel@...r.kernel.org, Ingo Molnar <mingo@...e.hu>,
Arjan van de Ven <arjan@...ux.intel.com>
Subject: Re: [Bug 10489] Kprobe smoke test lockdep warning
Peter Zijlstra wrote:
> On Tue, 2008-04-22 at 11:25 -0400, Masami Hiramatsu wrote:
>> Peter Zijlstra wrote:
>>> On Tue, 2008-04-22 at 15:09 +0200, Peter Zijlstra wrote:
>>>> On Mon, 2008-04-21 at 18:54 -0400, Masami Hiramatsu wrote:
>>>>> Thank you for reporting.
>>>>>
>>>>> Actually, kprobes tries to fixup thread's flags in post_kprobe_handler
>>>>> (which is called from kprobe_exceptions_notify) by
>>>>> trace_hardirqs_fixup_flags(pt_regs->flags). However, even the irq flag
>>>>> is set in pt_regs->flags, true hardirq is still off until returning
>>>>> from do_debug. Thus, lockdep assumes that hardirq is off without annotation.
>>> Ah, can you clarrify? pt_regs->flags will only be set when returning to
>>> the original trap site? in that case we should not need a lockdep
>>> annotation I guess, unless its allowed and exptected for the int3 site
>>> to change IRQ state.
>> As far as I took a look at the lockdep, your suggestion is correct.
>> post_kprobe_handler should not set a lockdep annotation, because
>> processor's IF is not changed yet in that time.
>
> That much was clear; but when _will_ it be changed?
processor's IF bit is changed when an iret(q) is issued.
In other words, when returning from a debug/int3 exception.
--
Masami Hiramatsu
Software Engineer
Hitachi Computer Products (America) Inc.
Software Solutions Division
e-mail: mhiramat@...hat.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