lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <1218436344.30464.46.camel@caritas-dev.intel.com>
Date:	Mon, 11 Aug 2008 14:32:24 +0800
From:	Huang Ying <ying.huang@...el.com>
To:	Peter Zijlstra <peterz@...radead.org>
Cc:	"Eric W. Biederman" <ebiederm@...ssion.com>,
	Pavel Machek <pavel@....cz>, nigel@...el.suspend2.net,
	"Rafael J. Wysocki" <rjw@...k.pl>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Vivek Goyal <vgoyal@...hat.com>, mingo@...e.hu,
	Linus Torvalds <torvalds@...ux-foundation.org>,
	linux-kernel@...r.kernel.org,
	Kexec Mailing List <kexec@...ts.infradead.org>
Subject: Re: [PATCH -v2 6/8] kexec jump: fix for lockdep

On Mon, 2008-08-11 at 08:09 +0200, Peter Zijlstra wrote:
> On Mon, 2008-08-11 at 08:59 +0800, Huang Ying wrote:
> > On Fri, 2008-08-08 at 12:13 +0200, Peter Zijlstra wrote:
> > > On Fri, 2008-08-08 at 14:52 +0800, Huang Ying wrote:
> > > > Replace local_irq_disable() with raw_local_irq_disable() to prevent
> > > > lockdep complain.
> > > Uhhm, please provide more information - just using raw_* to silence
> > > lockdep is generally the wrong thing to do.
> > 
> > In traditional kexec, the new kernel will replace current one, so the
> > irq is simply disabled. But now jumping back from kexeced kernel is
> > supported, so the irq should be enabled again.
> > 
> > The code sequence of irq during kexec jump is as follow:
> > 
> > local_irq_disable(); /* in kernel_kexec() */
> > local_irq_disable(); /* in machine_kexec() */
> > local_irq_enable(); /* in kernel_kexec() */
> > 
> > The disable and enable is not match. Maybe another method is to use
> > local_irq_save(), local_irq_restore() pair in machine_kexec(), so the
> > disable and enable is matched.
> 
> And its the machine kernel's lockdep instance that goes complain?
> 
> whichever annotation gets used - and I think I can agree that raw_*
> might be approriate there, this should be accompanied with a rather
> elaborate changelog and preferably a comment in the code too. Without
> such we'll be wondering in the years to come WTH happens here.

Sorry, I find there is no complain from lockdep. Un-paired irq
disable/enable has no problem with lockdep, just increase something such
as "redundant_hardirqs_off". Please ignore this thread.

Best Regards,
Huang Ying


--
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

Powered by Openwall GNU/*/Linux Powered by OpenVZ