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: <201107031036.28186.rjw@sisk.pl>
Date:	Sun, 3 Jul 2011 10:36:27 +0200
From:	"Rafael J. Wysocki" <rjw@...k.pl>
To:	Florian Mickler <florian@...kler.org>
Cc:	Andrea Righi <andrea@...terlinux.com>, Len Brown <lenb@...nel.org>,
	Peter Zijlstra <peterz@...radead.org>,
	Ingo Molnar <mingo@...hat.com>, Borislav Petkov <bp@...en8.de>,
	Maciej Rutecki <maciej.rutecki@...il.com>,
	linux-acpi@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] ACPI: fix acpi_power_off lockdep splat

On Sunday, July 03, 2011, Florian Mickler wrote:
> On Sun, 3 Jul 2011 08:58:41 +0200
> "Rafael J. Wysocki" <rjw@...k.pl> wrote:
> 
> > On Saturday, July 02, 2011, Andrea Righi wrote:
> > > Implement acpi_os_create_lock() as a C-preprocessor macro to assign
> > > unique lock_class_key to dynamically allocated locks and suppress wrong
> > > lockdep warnings.
> > > 
> > > This fixes:
> > > https://bugzilla.kernel.org/show_bug.cgi?id=38152
> > > 
> > > Reported-by: Borislav Petkov <bp@...en8.de>
> > > Signed-off-by: Andrea Righi <andrea@...terlinux.com>
> > 
> > So, how exactly does it work?
> 
> The spin_lock_init macro stringifies it's argument and uses that as a
> name for the lock in the debugging.
> 
> By re-executing spin_lock_init (have not checked if that harms
> anything, but it should be ok) in the _macro_ the key changes from
> "lock" for all three locks to the actual argument
> "&acpi_gbl_global_lock_pending_lock", "&acpi_gbl_gpe_lock" or
> "&acpi_gbl_hardware_lock". 

OK, thanks for the explanation.

The proposed solution doesn't seem to be extremely straightforward,
but perhaps it's the simplest one.  I need to think about it a bit more.

Thanks,
Rafael
--
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